VID
Video Generation API
Access top video generation models through a unified API -- text-to-video, motion control, and more.
Quick Start
1
Get your API key from Console2
Choose a video provider below3
POST to create a generation task4
Poll GET to retrieve the video URLAuthentication
Add Authorization header to all requests:
Authorization: Bearer YOUR_API_KEY
Endpoints
POST
/api/v1/video/generationsCreate a video generation task
GET
/api/v1/video/generations?task_id=xxxQuery task status and get video URL
API Reference
Select a provider to see its parameters and examples
xAI
Grok Video
High-quality text-to-video generation by xAI. Supports 5s/10s/15s video with natural motion.
Models
Grok Video 3
grok-video-3$0.08
5s · Standard
Grok Video 3 (10s)
grok-video-3-10s$0.08
10s · Audio+Video
Grok Video 3 (Official)
grok-video-3-official$0.08
6/10/15s · Official API, reference images
Parameters
modelrequired
stringgrok-video-3 / grok-video-3-10s / grok-video-3-officialpromptrequired
stringText description of the video to generateaspect_ratio
string"16:9" (default), "1:1", "9:16", "2:3", "3:2"size
string"720P" (default), "1080P"callback_url
stringWebhook URL called when task completesNotes
- -5s video ~30s, 10s ~60s generation time
- -Supports 16:9, 9:16, 1:1 aspect ratios
Code Example
# Step 1: Create task
curl -X POST https://apimodels.app/api/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-video-3",
"prompt": "A cat playing piano in a jazz club, cinematic lighting",
"aspect_ratio": "16:9"
}'
# Step 2: Poll status
curl "https://apimodels.app/api/v1/video/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Response Format
Create Task Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "pending"
}
}Success Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "completed",
"resultUrls": ["https://cdn.example.com/video.mp4"],
"createTime": 1705123450000,
"completeTime": 1705123500000
}
}Failed Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "failed",
"failMsg": "Content policy violation"
}
}Task States
pendingQueued, waiting to startprocessingVideo is being generatedcompletedDone -- video URL availablefailedGeneration failedError Codes
400Bad Request -- invalid or missing parameters401Unauthorized -- invalid API key402Payment Required -- insufficient credits404Not Found -- task ID not found500Internal Server ErrorImportant Notes
- -Video files are stored for 7 days -- download promptly
- -Poll every 5-10 seconds for status updates
- -Use callback_url for production workloads
- -Keep your API key secure