Grok Imagine Video

GrokVideo generationper-requestTiered pricing

Grok Imagine Video (xAI). Two uses: make a 1-15 second clip at 480p or 720p from text, from one picture as the first frame, or from 2-7 reference pictures (then at most 10 seconds); or edit a video you already have: send one mp4 of at most 8.7 seconds in videos with a prompt saying what to change, and get the same clip back with the change (same length and aspect ratio, up to 720p). Price: 480p $0.044 and 720p $0.0616 per output second, plus $0.00176 per picture; an edit is $0.0704 per second of the source video. For plain generation grok-imagine-1.5-video is 3-4 times cheaper but cannot take a video.

Price

$0.0392/s

Max

$0.03528/s

Endpoint

/videos

Delivery pattern

Async task lifecycle

Availability

Available now

API documentation

Build and copy the request

Choose the options this model accepts. The code below updates as you choose.

Step-by-step in the docs
POSThttps://apiking.ai/v1/videosBearer API keyAsync task

OptionsOnly options published for this model are shown.

# Requires curl and jq
API_KEY="${API_KEY:-YOUR_API_KEY}"

# 1. Submit once
SUBMITTED=$(curl --fail-with-body -sS https://apiking.ai/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: model-docs-$(date +%s)-$$" \\
  -d '{
  "model": "Grok Imagine Video",
  "prompt": "A cinematic scene with careful composition",
  "duration": 8,
  "resolution": "480p",
  "size": "auto",
  "nsfw_check": false
}')
TASK_ID=$(printf '%s' "$SUBMITTED" | jq -r '.task_id // .id // empty')
if [ -z "$TASK_ID" ]; then
  printf '%s\n' "$SUBMITTED" >&2
  exit 1
fi
echo "task_id=$TASK_ID"

# 2. Poll until terminal
while true; do
  STATUS_JSON=$(curl --fail-with-body -sS \
    "https://apiking.ai/v1/videos/$TASK_ID" \
    -H "Authorization: Bearer $API_KEY")
  STATUS=$(printf '%s' "$STATUS_JSON" | jq -r '.status // empty' | tr '[:upper:]' '[:lower:]')
  echo "status=$STATUS"
  case "$STATUS" in
    completed|succeeded|success) break ;;
    failed|failure|cancelled|canceled)
      printf '%s\n' "$STATUS_JSON" | jq .
      exit 1
      ;;
  esac
  sleep 5
done

# 3. Fetch the final result
curl --fail-with-body -sS \
  "https://apiking.ai/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer $API_KEY" | jq .
  1. 1Submit the task
  2. 2Poll the status
  3. 3Fetch the content

This model requires public media URLs. Upload a local file first, then put public_url into the model request. Avoid large Base64 bodies.

Read the upload guide

Parameter reference

model
stringrequired

Exact model identifier for this request.

grok-imagine-video
prompt
stringrequired

What to make; for an edit, what to change and what must stay the same. Up to 8000 characters.

duration
integeroptional

Output seconds, 1 to 15; at most 10 with 2 or more pictures. Not used for an edit: the output is as long as the source video.

resolution
stringoptional

480p ($0.044 per second) or 720p ($0.0616 per second). Not used for an edit: the output keeps the source video's resolution, up to 720p.

480p720p
size
stringoptional

Aspect ratio. With one picture the clip takes the picture's shape. Not used for an edit: the output keeps the source video's.

auto16:99:161:14:33:43:22:3
images
string[]optional

Up to 7 public picture URLs, $0.00176 each. One picture is the first frame; 2 to 7 are references for a clip of at most 10 seconds. Not together with videos.

videos
string[]optional

Edit a video: one public mp4 URL of at most 8.7 seconds. You get the same clip back with the change the prompt asks for, at $0.0704 per second of the source video. Not together with images.

Response lifecycle

Task status, terminal states, and result response examples.

Submit
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "video",
  "model": "Grok Imagine Video",
  "status": "queued"
}

Waiting

queued · submitted · in_progress · processing

Success

completed · succeeded · success

Failure

failed · failure · cancelled · canceled

Errors and production

Retry rules, idempotency, and the minimum production checklist.

400 / 422

Fix the request fields or unsupported option; do not retry unchanged.

401

Check that the API key is present, active, and sent as a Bearer token.

402

The account balance is insufficient.

409

The Idempotency-Key is processing or was reused with another body.

429

Back off according to Retry-After before retrying.

5xx

Retry with exponential backoff and keep the original Idempotency-Key.

  • Keep API keys on your server for public mobile and browser applications.
  • Set a unique Idempotency-Key for every billable async operation.
  • Persist task_id so polling can resume after a restart.
  • Use a timeout for every HTTP request and surface the request ID in support reports.
  • Read live model metadata instead of hard-coding prices and supported options.

Price and tiers

List price, for everyone.

Per-second price · 480p

$0.0392/s

Tiered pricing

Billed per second of generated output.

Each input picture adds $0.001568.

ResolutionPrice
480p$0.0392/s
720p$0.05488/s
Video edit, per second of the source videoPrice
  • Any source video$0.06272/s

The price shown here is exactly what you are billed — failed calls are refunded automatically.

Grok Imagine Video at a glance

Model ID
Grok Imagine Video
Type
Video generation
Vendor
Grok
Resolutions
480p · 720p
Aspect ratios
16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3
Duration
1–15 s
Reference inputs
Up to 7 images · Up to 1 videos
Endpoint
POST /v1/videos
Delivery
Async task: poll it or get a webhook
Billed by
Per second of output

Common questions

How much does the Grok Imagine Video API cost?

Grok Imagine Video costs $0.0392/s on APIKing. Pay as you go from your balance.

How do I call the Grok Imagine Video API?

Send a request to https://apiking.ai/v1/videos with your APIKing key as a Bearer token and set the model to Grok Imagine Video. The call returns a task. Poll it until it finishes, or set a webhook to be told when it does.

What is the model ID of Grok Imagine Video?

Set the model parameter to Grok Imagine Video.

Which resolutions and lengths does Grok Imagine Video support?

Resolutions: 480p, 720p. Length: 1 to 15 seconds.

Can Grok Imagine Video work from reference images or videos?

Yes. Reference inputs: Up to 7 images · Up to 1 videos.

Am I charged when a Grok Imagine Video call fails?

A failed call or a failed generation is not charged. Tasks are estimated first and settled at what they actually used.

Compare Grok Imagine Video with similar models

ModelVendorPriceSpec
Grok Imagine VideoGrokFrom $0.0392/sUp to 720p · up to 15 s
Wan 3.0WanFrom $0.028109/sUp to 1080P · up to 30 s
Grok Imagine 1.5 VideoGrokFrom $0.009996/sUp to 720p · up to 15 s
Muse Video ExtMeta$0.02305 / requestUp to 720p · up to 10 s
Seedance 2.0 MiniByteDanceFrom $0.016381/sUp to 720p · up to 15 s
Seedance 2.5ByteDanceFrom $0.086712/sUp to 1080p · up to 30 s