Skip to content

Grok video generation

Grok submits async video tasks through an OpenAI-style endpoint using multipart/form-data.

http
POST /v1/videos

Submission is async: after create succeeds, poll status and results with the returned task ID.

  • input_reference is the reference-image field; you can upload multiple images by repeating it.
  • grok-video-3-pro is fixed to 10 seconds; grok-video-3-max is fixed to 15 seconds.
  • Base model grok-video-3 has no fixed-duration logic and uses the value you send.

Available models

Headers

NameTypeRequiredDescription
stringYesRequest 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

NameTypeRequiredDescription
stringYesModel name
stringYesPrompt describing the video to generate
stringNoAspect ratio: ,,,,
integerNoTarget duration in seconds. / are corrected to fixed values automatically
stringNoResolution tier, commonly or
fileNoReference 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

ScenarioField notes
Text-to-video + + +
Image-to-videoText-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

NameTypeDescription
stringTask ID for later polling
stringAlways
stringModel name actually submitted
stringTask status: ,,,,
integerProgress percentage
integerCreation timestamp
stringOutput 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.

NameTypeRequiredDescription
stringYesModel name
stringYesPrompt describing how to rewrite or continue the original video
stringYes or
stringYes,,

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 ).