Veo 3.1 AI Video Generator API documentation
Generate videos with Veo 3.1 AI Video Generator (Google DeepMind). Supports both text and image input modes.
Endpoints
| Contract item | Value |
|---|---|
| Capability | veo-3-1-ai-video-generator |
| Submit | POST https://vidmage.ai/api/v1/veo-3-1-ai-video-generator/submit |
| Query | POST https://vidmage.ai/api/v1/veo-3-1-ai-video-generator/query |
| Task identifier | taskId |
| Result field | videoUrl |
Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.
Product guide: Veo 3.1 API
Parameters and input rules
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the video to generate (max 8000 chars). Minimum characters: 5Maximum characters: 8000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image-to-video mode. |
lastFrameUrl | string | No | Not specified | Optional public URL for the final frame in image-to-video mode. |
duration | string | No | "8" | Video duration in seconds. Values: "4", "6", "8" |
aspectRatio | string | No | "9:16" | Output aspect ratio. Values: "16:9", "9:16" |
resolution | string | No | "720p" | Output resolution tier. Values: "720p", "1080p", "4k" |
sound | boolean | No | true | Generate synchronized audio along with the video. No separate sound surcharge is configured. |
negativePrompt | string | No | Not specified | Describe unwanted video content or artifacts. |
seed | integer | No | Not specified | Random seed for reproducible generation. Multiple of: 1 |
text to video
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 5–8000 characters. |
duration | JSON string. Values: "4", "6", "8". Default: 8. |
aspectRatio | Values: "16:9", "9:16". Default: 9:16. |
resolution | Values: "720p", "1080p", "4k". Default: 720p. |
sound | Boolean. Default: true. |
negativePrompt | Describe unwanted video content or artifacts. |
seed | Random seed for reproducible generation. Multiple of: 1 |
image to video
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 5–8000 characters. |
duration | JSON string. Values: "4", "6", "8". Default: 8. |
aspectRatio | Values: "16:9", "9:16". Default: 9:16. |
resolution | Values: "720p", "1080p", "4k". Default: 720p. |
sound | Boolean. Default: false. |
imageUrl | Formats: jpg, png. |
lastFrameUrl | Optional final-frame image. |
negativePrompt | Describe unwanted video content or artifacts. |
seed | Random seed for reproducible generation. Multiple of: 1 |
Example request
{
"prompt": "Aerial shot gliding above turquoise ocean waves toward a remote tropical island at sunrise",
"duration": "8",
"aspectRatio": "9:16",
"resolution": "720p",
"sound": true
}# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/veo-3-1-ai-video-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"Aerial shot gliding above turquoise ocean waves toward a remote tropical island at sunrise","duration":"8","aspectRatio":"9:16","resolution":"720p","sound":true}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Task results and recovery
URL of the generated video. Read videoUrl from the completed query response. Preserve taskId while the task is running.
curl -X POST "https://vidmage.ai/api/v1/veo-3-1-ai-video-generator/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "videoUrl": "https://..." } }Submission and task queries report the available task and usage information. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.
For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.
Credits
| Component / option | Rate | Minimum |
|---|---|---|
| 720p | 20 credits / second | — |
| 1080p | 20 credits / second | — |
| 4k | 20 credits / second | — |
Base charge = duration × the selected resolution rate.
Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.
