Theme
Grok Imagine 1.5 Preview
Submit a JSON video generation task with .
http
POST /v1/videosAvailable models
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Request authentication. Use a Bearer Token, for example: . | |
| string | Yes | Request content type. Must be set to . |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Model name. See Available models above. | |
| string | Yes | Video generation prompt. Max characters. | |
| string | No | Target duration in seconds. Minimum ; prefer a string, for example . | |
| string | No | Aspect ratio. Supports common presets ,,,,,,,,,,,,, and custom ratios. | |
| string | No | Output resolution. Supports and ; also accepts and . | |
| string | No | Single reference image as a data URI such as . | |
| array<string> | No | Multiple reference images. Array items use data URIs such as . Do not send at the same time when using multiple images. |
Request example
bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "grok-imagine-video-1.5-preview",
"prompt": "A neon street on a rainy night, a vintage sports car driving over wet pavement",
"seconds": "8",
"aspect_ratio": "16:9",
"resolution": "720P"
}'bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "grok-imagine-video-1.5-preview",
"prompt": "Let the person in the reference image turn slowly, with natural light flowing in the background",
"seconds": "6",
"aspect_ratio": "9:16",
"resolution": "720P",
"image": "data:image/png;base64,BASE64_IMAGE_DATA"
}'bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "grok-imagine-video-1.5-preview",
"prompt": "Keep the subject consistent and generate a video that transitions from the first image to the second",
"seconds": "10",
"aspect_ratio": "16:9",
"resolution": "720P",
"images": [
"data:image/png;base64,FIRST_IMAGE_BASE64",
"data:image/png;base64,SECOND_IMAGE_BASE64"
]
}'Response example
json
{
"id": "video_abc123",
"object": "video",
"model": "grok-imagine-video-1.5-preview",
"status": "queued",
"progress": 0,
"created_at": 1735689600,
"seconds": "6",
"size": "720P",
"video_url": ""
}Response fields
| Name | Type | Description |
|---|---|---|
| string | Task ID. Use it to query the task later. | |
| string | Object type, usually . | |
| string | Model name actually submitted. | |
| string | Task status. Common values: ,,,,. | |
| integer | Task progress percentage. | |
| string | Video URL when the task completes. You can also download the result directly. |