Video generation
Same gateway auth as chat. Video jobs can take several minutes, use a long timeout.
https://api.rodiumai.io/v1/videos/generationsCall POST /v1/videos/generations with a Veo (google/veo-3.1, -fast, -lite) or Sora (openai/sora-2) model id. Text-to-video and image-to-video are supported; Veo also accepts a last_frame. The call is synchronous: the response arrives when the clip is ready.
Long-running jobs
When to use
- Product motion: animate a logo or packaging still.
- Short ads and social clips from a text storyboard.
- Controlled transitions between two keyframes (last_frame).
Recipes
Text → video
Send model + prompt + duration_seconds. No image field.
Note: Use cinematic prompts; keep duration within the model’s limits.
Image → video
Pass image as { b64_json }, a data: URL, or gs://. HTTP(S) image URLs are rejected by the gateway.
Note: Encode a local PNG/JPEG to base64; do not fetch remote URLs server-side in the request body.
last_frame transition
Provide image (start) and last_frame (end) with the same encodings to morph between two frames.
Note: Both frames should share aspect ratio when possible.
Text → video examples
…Image → video
…Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Video model id (e.g. google/veo-3.1, google/veo-3.1-fast, openai/sora-2). |
| prompt | string | Required | Text description of the video to generate or animate. |
| duration_seconds | number | Optional | Clip length in seconds (alias: seconds). Default 8. Sora snaps to 4, 8 or 12. Billed per second of the returned clip. |
| aspect_ratio | string | Optional | Aspect ratio, e.g. "16:9" or "9:16". On Sora it selects the size when size is absent. |
| size | string | Optional | Sora: output size "1280x720" (default) or "720x1280". |
| resolution | string | Optional | Veo: output resolution when the model supports it (e.g. "720p", "1080p"). |
| resize_mode | string | Optional | Veo image-to-video: how the first frame is fitted (e.g. "pad" or "crop"). |
| image | object | string | Optional | First frame (Veo) or reference image (Sora, resized to the output size). Accepts { b64_json }, a data URL, raw base64 or a gs:// URI; HTTP(S) URLs are rejected. Aliases: input_image, image_url. |
| last_frame | object | string | Optional | Veo only: optional end frame (same encodings as image) for start → end transitions. |
A synchronous call
POST /v1/videos/generationskeeps the connection open until the clip is ready, usually one to several minutes and up to about 10. There is no job id and nothing to poll: set a client timeout of at least 10 minutes.- Veo models (
google/veo-3.1,google/veo-3.1-fast,google/veo-3.1-lite) acceptaspect_ratio,resolution,resize_mode, a first frame (image) and alast_frame. - Sora (
openai/sora-2) acceptssize(oraspect_ratio),duration_secondssnapped to 4, 8 or 12, and an optional referenceimageresized to the output size. - Authenticate with
Authorization: Bearer(nox-api-key). Keep the request body under 10 MiB.
Response
The body has created, model and data[0] with b64_json (MP4, with mime_type) and/or url, plus duration_seconds when the provider reports it. Prefer b64_json when present.
Billing is per second: the hold uses duration_seconds (8 when omitted) and you pay the duration the provider returns. A generation that fails or is blocked by safety filters is not billed.