Replicate / Generate a video
Replicate HTTP API tool replicate-video-generate on looot: input fields, $0.5 per result, output shape, and code to run it with curl, JavaScript or Python.
Generates a short video from a prompt with MiniMax video-01 on Replicate. Send model_owner minimax, model_name video-01 and input with prompt. The run is asynchronous and can take a few minutes; the result is the finished prediction with the video URL in output.
- Tool id:
replicate-video-generate - Provider: Replicate HTTP API
- Job: Generate a video from a prompt (
video.generate) - Price: $0.5 per result. A call that fails at the provider costs $0.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
input |
object | yes | The model’s input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the “API” tab on the model you are running or get the model version and look at its openapi_schema property. For example, stability-ai/sdxl takes prompt as an input. Files should be passed as HTTP URLs or data URLs. Use an HTTP URL when: - you have a large file > 256kb - you want to be able to use… |
stream |
boolean | no | This field is deprecated. Request a URL to receive streaming output using server-sent events (SSE). This field is no longer needed as the returned prediction will always have a stream entry in its urls property if the model supports streaming. |
webhook |
string | no | An HTTPS URL for receiving a webhook when the prediction has new output. The webhook will be a POST request where the request body is the same as the response body of the get prediction operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once. Replicate will not follow redirects when sending webhook requests to your service, so be sure to specify a… |
webhook_events_filter |
array | no | By default, we will send requests to your webhook URL whenever there are new outputs or the prediction has finished. You can change which events trigger webhook requests by specifying webhook_events_filter in the prediction request: - start: immediately on prediction start - output: each time a prediction generates an output (note that predictions can generate multiple outputs) - logs: each time log output is generated by a prediction - completed: when the prediction reaches a termi… |
model_name |
string | yes | Official model to run: minimax/video-01 ($0.5 per output video). |
model_owner |
string | yes | Owner of the official model. |
Output
The run’s result holds the provider’s answer. Signed in, looot inspect replicate-video-generate prints its fields.
Run it
Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.
Example input with placeholder values:
curl -X POST "https://api.looot.ai/v1/runs" \
-H "Authorization: Bearer $LOOOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"endpointId":"replicate-video-generate","input":{"model_owner":"<model_owner>","model_name":"<model_name>","input":{"prompt":"Tell me a joke","system_prompt":"You are a helpful assistant"},"webhook":"https://example.com/webhook","webhook_events_filter":["https://example.com/webhook","https://example.com/webhook"]},"wait":30}'const response = await fetch("https://api.looot.ai/v1/runs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
endpointId: "replicate-video-generate",
input: {
model_owner: "<model_owner>",
model_name: "<model_name>",
input: {
prompt: "Tell me a joke",
system_prompt: "You are a helpful assistant",
},
webhook: "https://example.com/webhook",
webhook_events_filter: ["https://example.com/webhook", "https://example.com/webhook"],
},
wait: 30,
}),
});
const run = await response.json();
console.log(run.status, run.result);import os
import uuid
import requests
response = requests.post(
"https://api.looot.ai/v1/runs",
headers={
"Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"endpointId": "replicate-video-generate",
"input": {
"model_owner": "<model_owner>",
"model_name": "<model_name>",
"input": {
"prompt": "Tell me a joke",
"system_prompt": "You are a helpful assistant",
},
"webhook": "https://example.com/webhook",
"webhook_events_filter": ["https://example.com/webhook", "https://example.com/webhook"],
},
"wait": 30,
},
timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))To let looot pick among every provider of this job instead, send job:video.generate as endpointId; see the job page.