Grok Video Generator
POST /api/v1/grok-video-generator/submit
prompt is required.
Required inputs
promptstring- Text prompt describing the video to generate (max 20000 chars).
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/grok-video-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A handheld documentary shot of street musicians performing in a busy evening plaza","duration":"6","aspectRatio":"16:9","resolution":"720p"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules6 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the video to generate (max 20000 chars). Minimum length: 1 · Maximum length: 20000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image-to-video mode. No additional field constraint listed. |
imageUrls | string[] | No | Not specified | Ordered input image URLs for reference-to-video mode. The prompt can reference them by their one-based order. Minimum items: 1 · Maximum items: 7 |
duration | string | No | "6" | Video duration in seconds. Values: "6", "10", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" · Default: "6" |
aspectRatio | string | No | "16:9" | Output aspect ratio. Values: "16:9", "9:16", "1:1", "2:3", "3:2" · Default: "16:9" |
resolution | string | No | "720p" | Output resolution tier. Values: "480p", "720p" · Default: "720p" |
Mode-specific fields & media limits
Text To Video rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 5 characters; maximum 800 characters |
duration | Values: "6", "10"; mode default: "6" |
aspectRatio | Values: "16:9", "9:16", "1:1"; mode default: "16:9" |
resolution | Values: "480p", "720p"; mode default: "720p" |
Image To Video rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 20000 characters |
duration | Values: "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"; mode default: "6" |
aspectRatio | Values: "2:3", "3:2", "1:1", "16:9", "9:16"; mode default: "16:9" |
resolution | Values: "480p", "720p"; mode default: "480p" |
imageUrls | Image input; up to 7 items |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/grok-video-generator/query
Use the same Bearer API key. On completion, read the videoUrl result field.
curl -X POST "https://vidmage.ai/api/v1/grok-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://..." } }