Documentation

API Reference
POST

Video Generation

/v1/video/generations

Generate short video clips from a text description using compatible models.

Interactive Example

Request & Response Example

curl https://api.a4f.co/v1/video/generations \
-H "Authorization: Bearer YOUR_A4F_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "provider-6/wan-2.1",
"prompt": "A cinematic shot of a futuristic city with flying cars",
"ratio": "16:9",
"quality": "720p",
"duration": 4
}'

Headers

Authorization

string
Required
Bearer token for authentication.

Content-Type

string
Required
The content type of the request body.

Default: application/json

Request Body

model

string
Required
ID of the video generation model to use. Must be of type video/generation.

prompt

string
Required
A text description of the desired video.

ratio

string
The aspect ratio of the generated video. Supported values: "1:1", "16:9", "9:16", "3:4", "4:3".

Default: 9:16

quality

string
Required
The quality of the generated video. Supported values (e.g., '480p', '720p') are dependent on the model and your subscription plan.

duration

integer
Required
The duration of the video in seconds. Must be an integer between 1 and 8. The maximum allowed duration may be restricted by your subscription plan.

Response Body (200 OK)

created

integer
The Unix timestamp of when the video generation was started.

data

array of objects
An array of video objects.

b64_json

string
The base64-encoded video data.

url

string
The URL where the generated video can be viewed or downloaded. URLs are temporary.

Was this page helpful?