Skip to content

Video Generation

Generate videos from text descriptions.

POST /v1/video/generations

Required capability: video-generation

Request Body

ParameterTypeRequiredDescription
modelstringYesVideo generation model identifier.
promptstringYesText description of the desired video (1-10,000 characters).
nintegerNoNumber of videos to generate (1-4).
durationnumberNoVideo duration in seconds (1-60).
aspect_ratiostringNoAspect ratio (e.g. "16:9", "9:16", "1:1").
resolutionstringNoOutput resolution (e.g. "1080p", "720p").
fpsintegerNoFrames 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

FieldTypeDescription
createdintegerUnix timestamp of generation.
dataarrayArray of generated video objects.
data[].urlstringURL to download the generated video.
data[].durationnumberDuration of the generated video in seconds.
data[].revised_promptstringThe prompt as interpreted by the model (if applicable).

Example

Terminal window
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"
}'