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
}'

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.

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. Billing uses the real provider-reported cost when available; the per-second rate below is the reservation and fallback estimate.

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. Veo supports 4-8 seconds. Grok Imagine supports 1-15 seconds.
resolution720P or 1080P for HappyHorse. 720p, 1080p, or 4k for Veo (Veo 3.1 Lite does not support 4k). 480p, 720p, or 1080p for Grok Imagine. Defaults to 720p.
aspect_ratioRatio value. Defaults to 16:9.
negative_promptDescription of elements to avoid in the video (Veo and HappyHorse).
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.
max_wait_secondsTimeout for the long-running job. Maximum 300 seconds.
max_budget_usdSpend cap checked before the gateway starts the request.
{
"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"
}
}

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

Model720p1080p4k
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-
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$0.40/s$0.40/s$0.40/s
google/veo-3.0-fast-generate-001$0.10/s$0.12/s$0.30/s
google/veo-2.0-generate-001$0.35/s$0.35/s-