Video Generation
Generate videos from text descriptions.
POST /v1/video/generationsRequired capability: video-generation
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Video generation model identifier. |
prompt | string | Yes | Text description of the desired video (1-10,000 characters). |
n | integer | No | Number of videos to generate (1-4). |
duration | number | No | Video duration in seconds (1-60). |
aspect_ratio | string | No | Aspect ratio (e.g. "16:9", "9:16", "1:1"). |
resolution | string | No | Output resolution (e.g. "1080p", "720p"). |
fps | integer | No | Frames per second (1-120). |
Request size limit: 1 MB
Response
{ "created": 1709000000, "data": [ { "url": "https://cdn.example.com/generated-video.mp4", "duration": 5, "revised_prompt": "A cinematic aerial shot of a coastal city at sunset..." } ]}Response Fields
| Field | Type | Description |
|---|---|---|
created | integer | Unix timestamp of generation. |
data | array | Array of generated video objects. |
data[].url | string | URL to download the generated video. |
data[].duration | number | Duration of the generated video in seconds. |
data[].revised_prompt | string | The prompt as interpreted by the model (if applicable). |
Example
curl https://your-gateway.example.com/v1/video/generations \ -H "Authorization: Bearer aigw_sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "model": "runway-gen3", "prompt": "A slow-motion shot of a hummingbird hovering near a flower", "duration": 5, "aspect_ratio": "16:9", "resolution": "1080p" }'