OpenAI Format

Grok Video Generation

Use `POST /v1/videos` to invoke the Grok video series models and submit asynchronous generation tasks.

POSThttps://zx1.deepwl.net/v1/videos
Request
curl -X POST https://zx1.deepwl.net/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=grok-video-3" \
  -F "prompt=猫咪听歌摇头晃脑,下大雨" \
  -F "aspect_ratio=2:3" \
  -F "seconds=6" \
  -F "size=720P" \
  -F "input_reference=@reference.png"
Response
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-video-3",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "size": "720P"
}

OpenAI-format entry point. If you need to use the unified video POST /v1/video/create, see Create Video.

The Grok video generation API uses multipart/form-data for submission. Please organize the request according to the fields here.

  • The endpoint path is POST /v1/videos.
  • input_reference is the reference image field and supports uploading multiple images repeatedly.
  • grok-video-3-pro will be automatically fixed to 10 seconds, and grok-video-3-max will be automatically fixed to 15 seconds.
  • The base version grok-video-3 has no additional fixed-seconds logic and is processed according to the actual parameters passed.

Currently Available Models

  • grok-video-3
  • grok-video-3-pro
  • grok-video-3-max

Request Headers

Authorizationstring必填

Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.

Request Body

modelstring必填

Model name. The currently available Grok series values are grok-video-3, grok-video-3-pro, and grok-video-3-max.

promptstring必填

Prompt.

aspect_ratiostring

Video aspect ratio. Optional values are 16:9, 9:16, 2:3, 3:2, and 1:1.

secondsinteger

Target duration in seconds. For grok-video-3-pro and grok-video-3-max, this will be automatically corrected to a fixed value.

sizestring

Resolution tier. Common values are 720P or 1080P.

input_referencefile

Reference image file. Can be passed multiple times, corresponding to multiple input_reference uploads.

Request Examples

Response Examples

Response Fields

idstring

Task ID.

objectstring

Fixed as video.

modelstring

The actual submitted model name.

statusstring

Task status. Common values include queued, processing, completed, failed, and cancelled.

progressinteger

Progress percentage.

created_atinteger

Creation timestamp.

sizestring

Output resolution tier.

Use Cases

Text-to-Video

Just pass the fields model, prompt, seconds, and size.

Image-to-Video

On top of text-to-video, add one or more input_reference files.

Fixed-Duration Models

If you pass grok-video-3-pro or grok-video-3-max, expect the server to process them with a fixed duration.