Theme
Grok video generation
Grok submits async video tasks through an OpenAI-style endpoint using multipart/form-data.
http
POST /v1/videosSubmission is async: after create succeeds, poll status and results with the returned task ID.
input_referenceis the reference-image field; you can upload multiple images by repeating it.grok-video-3-prois fixed to10seconds;grok-video-3-maxis fixed to15seconds.- Base model
grok-video-3has no fixed-duration logic and uses the value you send.
Available models
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Request authentication. Use a Bearer Token, for example: |
This endpoint uses
multipart/form-data(with curl-F, Content-Type is set by the client automatically). Do not set it manually.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Model name | |
| string | Yes | Prompt describing the video to generate | |
| string | No | Aspect ratio: ,,,, | |
| integer | No | Target duration in seconds. / are corrected to fixed values automatically | |
| string | No | Resolution tier, commonly or | |
| file | No | Reference image file; repeat to send multiple images |
Request example
bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-F "model=grok-video-3" \
-F "prompt=A cat nodding to music in heavy rain" \
-F "aspect_ratio=2:3" \
-F "seconds=6" \
-F "size=720P" \
-F "[email protected]"Use cases
| Scenario | Field notes |
|---|---|
| Text-to-video | + + + |
| Image-to-video | Text-to-video fields plus one or more |
| Fixed-duration models | / use server-fixed durations |
Response example
json
{
"id": "video_abc123",
"object": "video",
"model": "grok-video-3",
"status": "queued",
"progress": 0,
"created_at": 1735689600,
"size": "720P"
}Response fields
| Name | Type | Description |
|---|---|---|
| string | Task ID for later polling | |
| string | Always | |
| string | Model name actually submitted | |
| string | Task status: ,,,, | |
| integer | Progress percentage | |
| integer | Creation timestamp | |
| string | Output resolution tier |
Other formats and modes
Remix (/v1/videos/{video_id}/remix)
Create a variant from an existing Grok video task. Path parameter is the source task ID; the request body is JSON.
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Model name | |
| string | Yes | Prompt describing how to rewrite or continue the original video | |
| string | Yes | or | |
| string | Yes | ,, |
Extend (/v1/videos/{video_id}/extend)
Extend a video from a point in an existing task. Required: and ; optional: (start second in the source video) and (extra reference images).
Extensions (/v1/videos/extensions)
Extend a selected segment of an existing task. Required: ,,,; set to the source video task ID (for example ).