Skip to main content

XAI (Grok)

Image and video generation on https://api.mountsea.ai — async taskId, then poll GET /xai/tasks.

Models

Image

Video

Features

Text-to-Image

Prompt + model. Optional n (1–10), aspectRatio, resolution.

Image-to-Image

Up to 5 reference URLs. Omit aspectRatio to follow the first image.

Text-to-Video

Duration 6–20s, aspect ratio, 480P / 720P / 1080P (1.5 only).

Image-to-Video

Up to 5 reference URLs. Size follows the image — aspectRatio and resolution are ignored.

How a call works

1

Create a task

POST /xai/images or POST /xai/videos returns { "taskId": "..." }.
2

Poll until completed

Get Task ResultGET /xai/tasks?taskId=xxx.

Endpoints

Image parameters

Image aspect ratios

2:3 3:2 1:1 9:16 16:9 4:3 3:4 2:1 1:2 19.5:9 9:19.5 20:9 9:20 21:9 5:2 auto

Video parameters

1080P is only valid on grok-imagine-video-1.5. grok-imagine-video maxes out at 720P.

Task status

result is the upstream payload (shape depends on image vs video).