VID
Video Generation API
Generate AI videos with text-to-video and motion control capabilities.
Quick Start
1
Get your API key from the Console2
Choose a video model3
Send POST request to create task4
Poll GET request for video resultAuthentication
Add Authorization header with Bearer token to all requests:
Authorization: Bearer YOUR_API_KEY
Available Models
| Model | API Name | Features | Price |
|---|---|---|---|
| Grok Video 3 | grok-video-3 | 5s video, Text-to-Video | $0.028 |
| Grok Video 3 (10s) | grok-video-3-10s | 10s video, Audio+Video | $0.056 |
| Grok Video 3 (15s) | grok-video-3-15s | 15s video, 720p/1080p | $0.070 |
| VEO 3.1 Fast | veo-3.1-fast | 8s 4K, Audio, First/Last Frame | $0.06 |
| VEO 3.1 | veo-3.1 | 8s 4K, First/Last Frame | $0.12 |
| Kling Motion Control | kling-motion-control | Motion Transfer, 720p/1080p | $0.03+ |
Endpoints
POST
/api/v1/video/generationsCreate a video generation task
GET
/api/v1/video/generations?task_id=xxxQuery task status and get video URL
Request Parameters
For Text-to-Video (Grok, VEO)
modelrequiredstring
Model name (e.g., "grok-video-3", "veo-3.1-fast")
promptrequiredstring
Text description of the video to generate
aspect_ratiostring
"1:1", "16:9", "9:16", "2:3", "3:2"
sizestring
"720P", "1080P", "4K"
durationnumber
Video duration: 5, 8, or 10 seconds
imagesarray
Reference image URLs (for VEO first/last frame)
generate_audioboolean
Generate audio track (VEO only)
callback_urlstring
Webhook URL for completion notification
For Motion Control (Kling)
modelrequiredstring
Must be "kling-motion-control"
input_urlsrequiredarray
Reference character image URLs
video_urlsrequiredarray
Motion reference video URLs
modestring
"720p" or "1080p". Default: "720p"
character_orientationstring
"image" or "video". Default: "video"
Code Examples
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"
}'Response Format
Create Task Response
{
"code": 200,
"msg": "success",
"data": {
"task_id": "clxxx...",
"status": "pending",
"model": "cloud-video/grok-video-3"
}
}Success Response
{
"code": 200,
"msg": "success",
"data": {
"task_id": "clxxx...",
"status": "completed",
"model": "cloud-video/grok-video-3",
"videos": ["https://...video.mp4"],
"created_at": 1705123450000,
"completed_at": 1705123500000
}
}Failed Response
{
"code": 200,
"msg": "success",
"data": {
"task_id": "clxxx...",
"status": "failed",
"model": "cloud-video/grok-video-3",
"error": "Content policy violation"
}
}Task States
pendingTask queued, waiting to processprocessingVideo is being generatedcompletedVideo generation successfulfailedVideo generation failedError Codes
400Bad Request - Missing or invalid parameters401Unauthorized - Invalid API key402Payment Required - Insufficient credits404Not Found - Task ID not found500Internal Server ErrorImportant Notes
- *Video files are stored for 7 days, download promptly
- *VEO generates 8-second videos with optional audio
- *Kling requires both character image and motion video
- *Use callback_url for long-running tasks
- *Poll every 5-10 seconds to check status