Video
POST /v1/video — generate video from a text prompt through the assigned route.
POST /v1/video generates video from a text prompt. The assigned route must include a model with the video_generation capability (for example xAI's grok-imagine-video on a connected route).
Request
curl https://ai.latentkit.com/v1/video \
-H "Authorization: Bearer $LATENTKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A short clip of waves rolling onto a beach at sunset",
"duration_seconds": 5,
"size": "1280x720"
}'Fields
| Field | Description |
|---|---|
prompt | Video description (required) |
duration_seconds | Requested clip length when the route model supports it |
size | Output resolution when supported (e.g. 1280x720) |
response_profile | fast, balanced, or deep when the route allows overrides |
Supported durations and sizes are provider-specific; unsupported values are ignored or rejected by the upstream model.
SDK
const video = await client.video.generate({
prompt: 'A short clip of waves rolling onto a beach at sunset',
duration_seconds: 5,
size: '1280x720',
});video = client.video.generate(
prompt="A short clip of waves rolling onto a beach at sunset",
duration_seconds=5,
size="1280x720",
)Response
Video responses use the unified runtime envelope (id, provider, model, policy_version_id, usage). Inspect the returned payload for URL or base64 content fields produced by the route's provider adapter.
Managed Billing
Platform Access video consumes workspace credits when the selected model is available for managed usage. BYOK video is charged by your provider account. Check current availability and pricing in the console.
Latency and timeouts
Video generation is the slowest modality. For long generations, prefer the async queue (endpoint: "video") over a synchronous call so your request is not bounded by the gateway's synchronous execution deadline.
Troubleshooting
NO_HEALTHY_PROVIDERmeans no route model has thevideo_generationcapability. Check the route's model list in the console.- Video generation requires an eligible Platform Access or BYOK route model.