Skip to content

Grok Video ​

MoonNexAI is currently open to public.

  • grok-video-1.5: single-reference image-to-video; the current API requires exactly 1 image reference.
  • grok-imagine-video-1.5-preview: single-reference image-to-video, up to 15 seconds at 480P or 720P.
  • grok-image-video: Fits for additional reference images videos, up to 5 reference images.

Both models use the common OpenAI-compatible video-task API. Save id or task_id after submission, then query status and results.

The final picture of grok-imagine-video-1.5-preview is based on the actual results of the actual detection in the form media; some of the official results may have kept the original reference images.

Method and Path ​

http
POST /v1/videos
GET /v1/videos/{task_id}
GET /v1/videos/{task_id}/content

request head:

http
Authorization: Bearer <MOONNEXAI_API_KEY>
Content-Type: application/json

Model capabilities ​

ModelsInput Modedurationaspect ratioClarityreference images
grok-video-1.5Single Figure image-to-videoMaximum 15 seconds16:9, 9:16, 1:1, 4:3, 3:4480P, 720P1 must be recommended input_reference
grok-image-videoMultiple reference imagesUp to 15 seconds16:9, 9:16, 1:1, 4:3, 3:4720P, 1080PUp to 5 images; prefer reference_image_urls or references[]

Field definitions ​

fieldAnnotations
modelFill in grok-video-1.5 or grok-image-video.
promptVideo description, with recommendations for subject, action, lens, scene and style.
seconds / durationVideo duration. Current suggests a string, e. g. "15"; maximum 15 seconds.
aspect_ratio / ratioVideo aspect ratio, e.g. 16:9, 9:16, 1:1, 4:3, 3:4.
size / resolutionClarity: grok-video-1.5 supports 480P / 720P, grok-image-video supports 720P / 1080P.
input_referenceSingle reference images or first frame diagram input, suitable for grok-video-1.5.
reference_image_urlsMulti-reference images input, fit grok-image-video.
references[]MoonNexAI standard media assets arrays; Grok video is currently receiving only photo references and not video or independent audio references.
content[]Compatible multimedia content writing; graphic entries suggest visible entries role=reference_image or role=first_frame.
callback_urlOptional. Receive a MoonNexAI callback when the task completes.

Single Figure image-to-video ​

json
{
  "model": "grok-video-1.5",
  "prompt": "保留人物服装和场景一致性,加入轻微运镜和环境光变化。",
  "input_reference": "https://example.com/first-frame.jpg",
  "seconds": "15",
  "aspect_ratio": "9:16",
  "size": "720P"
}

Multiple reference images ​

grok-image-video accepts up to 5 reference images. Prefer public or MoonNexAI-hosted URLs. Ready image assets created through the asset API may also use Asset://asset_xxx where the model supports it.

json
{
  "model": "grok-image-video",
  "prompt": "综合多张参考图的角色特征和场景质感,输出一段稳定的镜头运动视频。",
  "reference_image_urls": [
    "https://example.com/ref-1.jpg",
    "https://example.com/ref-2.jpg",
    "https://example.com/ref-3.jpg"
  ],
  "seconds": "15",
  "aspect_ratio": "3:4",
  "size": "1080P"
}

Use references[] also:

json
{
  "model": "grok-image-video",
  "prompt": "让 @hero 站在 @scene 的环境中,保持主体外观稳定,镜头缓慢推进。",
  "seconds": "15",
  "aspect_ratio": "16:9",
  "size": "720P",
  "references": [
    {
      "media_type": "image",
      "role": "reference_image",
      "url": "https://example.com/hero.png",
      "alias": "hero"
    },
    {
      "media_type": "image",
      "role": "style_reference",
      "url": "https://example.com/scene.png",
      "alias": "scene"
    }
  ]
}

When content[] is used for reference images, it is suggested that a visible picture should be filled for:

json
{
  "model": "grok-image-video",
  "prompt": "保持角色外观稳定,加入轻微动作和景深变化。",
  "seconds": "15",
  "aspect_ratio": "1:1",
  "size": "720P",
  "content": [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/ref-1.jpg"
      },
      "role": "reference_image"
    }
  ]
}

Submit response ​

Save id or task_id: after successful submission

json
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "video",
  "model": "grok-video-1.5",
  "status": "submitted",
  "progress": 0,
  "created_at": 1730000000
}

Query Results ​

bash
curl https://moonnexai.com/v1/videos/task_xxx \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

The client should first judge status. Video URLs are read only when succeeded is used; if failed, read error:

json
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "status": "succeeded",
  "progress": 100,
  "model": "grok-video-1.5",
  "size": "720P",
  "seconds": "15",
  "url": "https://example.com/result.mp4",
  "video_url": "https://example.com/result.mp4",
  "result_url": "https://example.com/result.mp4",
  "created_at": 1730000000,
  "completed_at": 1730000040
}

If the client wants to download video content, it can also return request after task has succeeded. This compatible download entry first returns 302 and jumps to MoonNexAI media URL; the client should start a re-direction. If the hosting medium is not available, API may return to proxy stream:

bash
curl -L https://moonnexai.com/v1/videos/task_xxx/content \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -o result.mp4

Grok Imagine Video Model ​

The following Grok Imagine video models remain available for compatibility. Their durations, sizes and image-reference fields differ; choose fields from this table before submission:

ModelsCurrent field caliberAnnotations
grok-imagine-1.0-videovideo_config.video_length, video_config.aspect_ratio, video_config.resolution, reference_imagesGrok Imagine 1.0 video model.
grok-imagine-video-previewseconds, size, resolution, reference_imagesGrok Imagine 1.5 preview compatible video model.
grok-imagine-video-1.5-previewinput_reference, seconds, aspect_ratio, sizeGrok Imagine 1.5 Preview single-graph video model; supports 4/6/8/10/12/15 seconds, 480P/720P and common painting, does not support video reference or independent audio.
grok-imagine-1.5-video-super-720pinput_reference, sizeGrok Imagine 1.5 720p single-figure video model.

Access, attention. ​

  • grok-video-1.5 The current API behaviour requires 1 Chang reference images; do not submit a plain text request, please use grok-image-video for more drawings.
  • grok-imagine-video-1.5-preview accepts one image URL in input_reference. Send seconds as a string, such as "15", and size as 480P or 720P. Video references and standalone audio are not supported.
  • grok-image-video is currently using a maximum of 5 photo references and does not support reference video, last frame and independent audio.
  • Do not mix first frame, last frame, video reference and independent audio field in Grok Video request; if complex multiple media assets videos are needed, give priority to Video Model Matrix for other models.
  • Business code should not read only one result, field; it is recommended that it be read in the order video_url, result_url, url.

Relevant Pages ​