Skip to content

Video Generation

/v1/video/generations turns text prompts into video generation jobs through LLMTR. The endpoint starts long-running provider tasks, polls until completion, and returns video URLs in the OpenAI-compatible response shape.

HappyHorse generates videos from text through Alibaba. The model passed a live 5-second 720P verification test before public catalog activation.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba/happyhorse-1.0-t2v",
"prompt": "A miniature city built from cardboard and bottle caps comes alive at night. A cardboard train rolls slowly by with tiny lights.",
"duration_seconds": 5,
"resolution": "720P",
"aspect_ratio": "16:9",
"max_wait_seconds": 180,
"max_budget_usd": 0.70
}'

alibaba/wan3.0-video-prime generates video from text and accepts reference media in the same request. Duration runs from 2 to 30 seconds; resolution may be 480P, 720P or 1080P. Accepted ratio values are 16:9, 4:3, 1:1, 3:4, 9:16 and adaptive. negative_prompt is supported.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba/wan3.0-video-prime",
"prompt": "A kitten running across a rooftop under the moonlight, city lights in the distance",
"duration_seconds": 5,
"resolution": "480P",
"ratio": "adaptive",
"max_wait_seconds": 180,
"max_budget_usd": 0.50
}'

The model takes several references in one request, and each reference is typed: first_frame and last_frame set the opening and closing frame, reference_image supplies a general visual reference, reference_video a source clip, and reference_audio an audio track.

last_frame cannot be used on its own. It is the far end of an interpolation, so the same request must also carry a first_frame; sent alone it returns 400 unsupported_input. References therefore go in the media array rather than the single image_url field, which returns 400 unsupported_input for these models.

media[].url accepts both an https:// link and a data:image/...;base64,... value.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba/wan3.0-video-prime",
"prompt": "Slow push-in, the character turns towards the camera",
"duration_seconds": 4,
"resolution": "720P",
"media": [
{ "type": "first_frame", "url": "https://example.com/frame.png" },
{ "type": "reference_audio", "url": "https://example.com/track.mp3" }
]
}'

When reference media is supplied, prompt is optional; the two cannot both be empty.

minimax/minimax-h3 generates video from text and accepts reference material in the same request: a first frame, a last frame, or a reference image. Duration runs from 5 to 15 seconds; resolution may only be 2K.

minimax/minimax-h3-max runs text-to-video and image-to-video only: it takes a first frame, a last frame, or both, and accepts no other reference kind. Duration runs from 5 to 15 seconds; resolution may be 480P or 768P.

prompt is required on both models and may be at most 7000 characters. negative_prompt is not supported; sending it returns 400 unsupported_input.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-h3",
"prompt": "A train moving through morning fog, camera slowly pushing in",
"duration_seconds": 5,
"resolution": "2K",
"aspect_ratio": "16:9",
"max_wait_seconds": 300,
"max_budget_usd": 0.70
}'

If max_budget_usd is below the request's estimated cost, the request returns 400 budget_too_low without reaching the upstream. The example above costs 5 seconds x $0.13 = $0.65, hence the $0.70 budget.

If you omit resolution the model's cheapest tier is used: 2K for minimax/minimax-h3 (its only tier) and 480P for minimax/minimax-h3-max.

References are sent in the media array rather than in the single image_url field; image_url returns 400 unsupported_input on these two models. Every reference is typed, and which types are available depends on the model:

Typeminimax/minimax-h3minimax/minimax-h3-max
first_frameUp to 1Up to 1
last_frameUp to 1Up to 1
reference_imageUp to 9Not supported

minimax/minimax-h3 accepts up to 11 files in total per request.

Frames and references cannot be sent in the same request. Combining first_frame/last_frame with reference_image returns 400 unsupported_input; the upstream refuses the combination. Send either the frames or the references.

media[].url takes both an https:// link and a data: URI, both verified. Links are recommended for large assets.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-h3",
"prompt": "The character turns toward the camera and smiles",
"duration_seconds": 5,
"resolution": "2K",
"max_budget_usd": 0.70,
"media": [
{ "type": "first_frame", "url": "https://example.com/frame.png" },
{ "type": "last_frame", "url": "https://example.com/last-frame.png" }
]
}'

first_frame pins the opening frame of the clip; reference_image carries the subject across without pinning a frame - same character, different scene. They are different jobs and cannot be combined in one request.

The first five reference images are free; the sixth and beyond are billed at $0.04 per image.

Reference audio (reference_audio) and reference video (reference_video) are not accepted; sending either returns 400 unsupported_input. They stay closed because they would be silently ignored: the video would still be billed while the reference had no effect on the generation.

aspect_ratio is optional. Omit it and the model picks the ratio; if you sent a starting frame, the ratio comes from that frame. Send it and it must be one of 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Any other value returns 400 invalid_request.

adaptive is not a valid value on these two models. If you want the ratio to follow your reference frame, omit aspect_ratio entirely.

Google Veo models use the same endpoint: google/veo-3.1-generate-001, google/veo-3.1-fast-generate-001, google/veo-3.1-lite-generate-001, google/veo-3.0-generate-001, google/veo-3.0-fast-generate-001, and google/veo-2.0-generate-001. Veo 3.x outputs include audio.

Google shuts down the pre-3.1 Veo endpoints on 28 August 2026. All three models keep working normally until then; after that, requests for these identifiers return 410 model_retired and the response body names the successor. There is no auto-forward: change the model id in your integration by hand before that date.

Discontinued idSuccessorPrice difference
google/veo-3.0-generate-001google/veo-3.1-generate-001720p/1080p unchanged ($0.40/s), 4k moves from $0.40 to $0.60/s
google/veo-3.0-fast-generate-001google/veo-3.1-fast-generate-001Identical ($0.10 / $0.12 / $0.30)
google/veo-2.0-generate-001google/veo-3.1-generate-001$0.35/s becomes $0.40/s, and the output now includes audio

If cost is the priority when migrating off Veo 2, google/veo-3.1-lite-generate-001 delivers the same audio output at $0.05 (720p) and $0.08 (1080p) per second; it does not support 4k.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1-fast-generate-001",
"prompt": "A cinematic drone shot over Cappadocia at sunrise",
"duration_seconds": 8,
"aspect_ratio": "16:9",
"resolution": "720p",
"max_wait_seconds": 180,
"max_budget_usd": 1.00
}'

Veo models can generate video from a reference frame provided as a base64 data URL in the image_url field. Remote URLs are not supported; the data:image/...;base64,... form is required, and remote URLs return 400 unsupported_input.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1-fast-generate-001",
"prompt": "The person smiles and looks around, subtle camera push-in.",
"image_url": "data:image/png;base64,iVBORw0KGgo...",
"duration_seconds": 4,
"resolution": "720p",
"max_wait_seconds": 180
}'

Veo responses return the video as base64 MP4 in data[].b64_json; the url field is null for these models.

xai/grok-imagine-video generates video from a text prompt. xai/grok-imagine-video-1.5 is image-to-video: a starting frame is required and the prompt describes the motion. Grok Imagine Video 1.5 also generates sound effects, ambience, and speech in the same pass. Supported durations are 1-15 seconds; resolutions are 480p, 720p, and 1080p (1080p only for image-to-video).

Pass the starting frame in image_url as a base64 data URL. Because the model is image-to-video only, a request without image_url returns 400 invalid_request; passing image_url to the text-to-video grok-imagine-video returns 400 unsupported_input.

Terminal window
curl "$LLMTR_BASE_URL/v1/video/generations" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "xai/grok-imagine-video-1.5",
"prompt": "Slow cinematic push-in, embers drift, subtle camera movement",
"image_url": "data:image/png;base64,iVBORw0KGgo...",
"duration_seconds": 6,
"resolution": "720p",
"aspect_ratio": "16:9",
"max_wait_seconds": 180,
"max_budget_usd": 1.00
}'

xAI responses return the video as a hosted data[].url MP4. When the provider reports the actual cost, billing follows that cost; when it does not, the per-second price below applies.

FieldDescription
modelCanonical ID of the video generation model.
promptText description of the video to generate.
duration_secondsGenerated video duration. Use a positive integer for HappyHorse. Wan3.0 supports 2-30 seconds. MiniMax H3 and MiniMax H3 Max support 5-15 seconds (whole seconds). Veo supports 4-8 seconds. Grok Imagine supports 1-15 seconds.
resolution720P or 1080P for HappyHorse. 480P, 720P or 1080P for Wan3.0. 2K only for MiniMax H3, 480P or 768P for MiniMax H3 Max. 720p, 1080p, or 4k for Veo (Veo 3.1 Lite does not support 4k). 480p, 720p, or 1080p for Grok Imagine.
aspect_ratioRatio value. Defaults to 16:9.
negative_promptDescription of elements to avoid in the video (Veo and Wan3.0). HappyHorse and the MiniMax H3 models do not support it.
image_urlImage-to-video reference frame as a base64 data URL. Supported by Google Veo (all Veo models) and required by xai/grok-imagine-video-1.5. The MiniMax H3 models do not accept it; send the frame in the media array instead.
mediaReference media array (alibaba/wan3.0-video-prime, minimax/minimax-h3, minimax/minimax-h3-max). Each entry carries type and url. Wan3.0 takes first_frame, last_frame, reference_image, reference_video or reference_audio; MiniMax H3 takes first_frame, last_frame or reference_image; MiniMax H3 Max takes first_frame and last_frame only. On Wan3.0, last_frame is valid only alongside a first_frame.
max_wait_secondsTimeout for the long-running job. Defaults to 300, maximum 600 seconds.
max_budget_usdSpend cap checked before the gateway starts the request.

Video generation takes minutes, not seconds. Measured for Wan3.0 on 2026-08-25: a 2-second 480P clip took 88s, a 3-second 480P clip 110s, a 2-second 720P clip 83s, and a 10-second 480P clip 83s. Generation time therefore scales with neither resolution nor clip length; the spread comes from load on the provider side.

If you omit max_wait_seconds the gateway waits 300 seconds, roughly three times the slowest measured run. Raise it up to 600 seconds when you know your job runs long.

If the wait is exceeded the request returns 504 provider_timeout and you are not charged, but the provider may still have finished the generation. Do not set the value shorter than necessary.

{
"id": "task_xxx",
"object": "video.generation",
"model": "alibaba/happyhorse-1.0-t2v",
"status": "completed",
"data": [
{
"url": "/media/generated-video.mp4",
"mime_type": "video/mp4",
"duration": 5
}
],
"usage": {
"duration": 5,
"resolution": "720P"
}
}

data[].url is always directly downloadable. On the MiniMax H3 rows it is served through LLMTR:

GET $LLMTR_BASE_URL/v1/video/generations/{id}/content

Call it with your API key. It opens only for the account that started the job; another account's job returns 404. The response body is the raw video bytes, so you can open it in a browser or download it with curl -L -o video.mp4:

Terminal window
curl -L "$LLMTR_BASE_URL/v1/video/generations/ePzVZ4WJzbTK1un5FiGx/content" -H "Authorization: Bearer llmtr-your_key" -o video.mp4

Generated videos are not guaranteed to be kept upstream, so download them once the job finishes. An expired link returns 404 not_found.

Video models are billed per generated second; no platform margin is added to model pricing.

Model480p720p768p1080p2K4k
xai/grok-imagine-video-$0.05/s-$0.05/s--
xai/grok-imagine-video-1.5-$0.08/s-$0.08/s--
alibaba/happyhorse-1.0-t2v-$0.14/s-$0.24/s--
alibaba/wan3.0-video-prime$0.068/s$0.14/s-$0.28/s--
minimax/minimax-h3----$0.13/s-
minimax/minimax-h3-max$0.05/s-$0.08/s---
google/veo-3.1-generate-001-$0.40/s-$0.40/s-$0.60/s
google/veo-3.1-fast-generate-001-$0.10/s-$0.12/s-$0.30/s
google/veo-3.1-lite-generate-001-$0.05/s-$0.08/s--
google/veo-3.0-generate-001 (discontinued 28 August 2026)-$0.40/s-$0.40/s-$0.40/s
google/veo-3.0-fast-generate-001 (discontinued 28 August 2026)-$0.10/s-$0.12/s-$0.30/s
google/veo-2.0-generate-001 (discontinued 28 August 2026)-$0.35/s-$0.35/s--