Run models
MLMux gives you pre-release image and video models behind one endpoint. Choose a model, send its inputs, and receive a consistent task response.
Explore modelsimport json
import os
import urllib.request
request = urllib.request.Request(
"https://api.mlmux.com/v1/images/generations",
data=json.dumps({
"model": "gpt-image-2",
"prompt": "a quiet city after rain"
}).encode(),
headers={"Authorization": "Bearer " + os.environ["MLMUX_API_KEY"]}
)
print(urllib.request.urlopen(request).read().decode())
Switch models with one API
Use the same authentication, task lifecycle, and error format everywhere. Move between image and video models by changing the model name and inputs.
Read the API docsconst response = await fetch("https://api.mlmux.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.MLMUX_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "seedance-2.5",
prompt: "a product film in soft morning light",
duration: 5,
ratio: "16:9",
async: true
})
});
Track every request
Follow generation with a task ID, inspect latency and cost in usage logs, or receive the completed asset automatically through a webhook.
Open the consoleTasktask_8J4C2P
Modelseedance-2.5
StatusSUCCEEDED
Duration24.9 s