Skip to main content
Back to API Platform

Grok Video API

xAI Grok Imagine video. Text-to-video or image-to-video, 1-15 seconds at 480p or 720p. Image-to-video can use the Grok Imagine 1.5 backbone for natively-synchronized audio. Integrate this model via REST with endpoint docs, parameters, and code examples.

Video Generation
Img2Vid
Credit Cost
10 credits
Type
Video

API Endpoint

POST
/api/v1/models/xai-video/run

Test This Model

Run a real request through the API pipeline and inspect the exact input and output your integration will handle. Uses your credits like any API call; failed runs are refunded automatically.

Parameters

Input parameters accepted by this model

ParameterTypeDefault
prompt
required
string
-
image_url
url
-
mode
enum
text-to-video
model_version
enum
standard
resolution
enum
720p
aspect_ratio
enum
16:9
duration
integer
5

Supported Aspect Ratios

16:9
4:3
1:1
9:16
3:4
3:2
2:3

See also

Related endpoints on this model — you may need a different apiId for a different operation (e.g. image edit vs generation).

Example Outputs

Real outputs generated by this model

View Details

northern lights shimmering over a snowy landscape, slow gentle pan across the sky

0 credits
0
View Details

a waterfall in a lush green valley, slow cinematic reveal, soft drifting mist

0 credits
0
View Details

desert sand dunes at sunset, slow sweeping aerial shot, long golden shadows

0 credits
0
View Details

a cozy cafe interior with steam rising from a coffee cup, soft rack focus

0 credits
0
View Details

a field of lavender swaying in the wind, cinematic slow motion, warm afternoon light

0 credits
0
View Details

city skyline at dusk, slow camera tilt up, glowing windows and passing clouds

0 credits
0
View Details

snow falling softly over a quiet pine forest, slow dolly forward, soft winter light

0 credits
0
View Details

golden autumn forest, gentle camera pan, leaves drifting in the breeze

0 credits
0
View Details

a calm ocean shoreline at golden hour, slow aerial glide over the rolling waves

0 credits
0
View Details

a serene mountain lake at sunrise, slow cinematic push-in, mist rising off the water

0 credits
0
View Details

a thrilling action sequence of a woman trying to find her favorite candy. The candy wrapper is purple with a pixelated dragon and reads "Pixel Dojo". The woman says "Gotta have that pixel dojo candy. with over 60 ai tools, it's basically zero calories."

0 credits
0
View Details

a thrilling action sequence of a woman trying to find her favorite candy. The candy wrapper is purple with a pixelated dragon and reads "Pixel Dojo". The woman says "Gotta have that pixel dojo candy. with over 60 ai tools, it's basically zero calories."

10 credits
14.5s

Code Examples

Image → video — copy and paste to get started

bash
curl -X POST "https://pixeldojo.ai/api/v1/models/xai-video/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "image-to-video",
    "image_url": "https://...",
    "prompt": "cinematic motion",
    "duration": 5
  }'

Response Format

Submit Response (202 Accepted)

json
{
  "jobId": "job_abc123...",
  "status": "pending",
  "statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123...",
  "creditCost": 10,
  "creditsRemaining": 95,
  "expiresAt": "2026-07-18T05:20:33Z"
}

Completed Response

json
{
  "jobId": "job_abc123...",
  "status": "completed",
  "output": {
    "video": "https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.mp4"
  },
  "creditCost": 10,
  "expiresAt": "2026-07-18T05:20:33Z"
}