Video Generation API
Create asynchronous video generation tasks with POST /api/v1/videos.
Create a video task
POST /api/v1/videos creates an asynchronous video-generation task and consumes credits when accepted.
POST https://vidrush-ai.com/api/v1/videos
Authorization: Bearer sk-your-api-key
Content-Type: application/jsonRequest body
| Field | Required | Type | Description |
|---|---|---|---|
model | Yes | string | A current model ID from GET /api/v1/models |
prompt | Yes | string | Non-empty video instruction |
mode | No | string | text-to-video, image-to-video, video-to-video, frames-to-video, or reference-to-video; must be supported by the model |
image_urls | No | string[] | Public HTTP(S) image URLs; required by modes that need image input |
video_urls | No | string[] | Public HTTP(S) video URLs; required by video-to-video and Motion Control |
options | No | object | Model-specific generation controls |
If mode is omitted, it defaults to text-to-video, except a non-empty image_urls array infers image-to-video. Specify mode: "video-to-video" explicitly when using video_urls.
options
| Field | Type | Description |
|---|---|---|
duration | string | A supported duration such as 8s |
resolution | string | A supported resolution such as 720p, 1080p, or 4k |
aspect_ratio | string | A supported ratio such as 16:9, 9:16, or Auto |
audio | boolean | true only when the model/mode exposes an audio toggle |
source_video_duration_seconds | number | Positive source-video duration required when video_urls is used with a per-second-priced model |
Only send values advertised for the selected model and mode. The model reference lists the configured values; GET /api/v1/models is the live machine-readable source.
Example
curl -X POST https://vidrush-ai.com/api/v1/videos \
-H "Authorization: Bearer $VIDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"mode": "text-to-video",
"prompt": "A paper kite crossing a bright summer sky",
"options": {
"duration": "8s",
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true
}
}'Successful response
{
"code": 0,
"message": "ok",
"data": {
"id": "task_123",
"status": "pending",
"costCredits": 20
}
}The task record is sanitized before it is returned. Use data.id with GET /api/v1/tasks/{taskId}, polling every 5 seconds until a terminal status.
Legacy /api/ai/* endpoints
The legacy POST /api/ai/generate and POST /api/ai/query endpoints remain available for existing integrations. They retain their legacy request shapes and response behavior. New integrations should use the v1 resource endpoints documented here: POST /api/v1/videos and GET /api/v1/tasks/{taskId}.