API
POST /v1/videos/generations
Long-running video generation. Authenticate with the same Bearer rd_sk_* key as chat.
POST
https://api.rodiumai.io/v1/videos/generationsBody 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. |
Request examples
…SDK helpers
…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.