Available now

Grok Imagine Video: video editing

By xAI

xAI's Grok Imagine Video makes clips with sound from a written scene, animates an image you upload or changes a short clip you already have.

Model ID
Maker
xAI

Model id

Use this in every request
xai/grok-imagine-video/edit-video

This model has other modes with their own ids: xai/grok-imagine-video/text-to-video, xai/grok-imagine-video/image-to-video.

Run it

Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "xai/grok-imagine-video/edit-video",
  "input": {
    "prompt": "Turn the daytime street into a snowy winter evening with warm light in the shop windows. Keep the people and the way they move as they are.",
    "video_url": "https://example.com/input.mp4"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "xai/grok-imagine-video/edit-video", "quote_id": "QUOTE_ID", "input": {"prompt":"Turn the daytime street into a snowy winter evening with warm light in the shop windows. Keep the people and the way they move as they are.","video_url":"https://example.com/input.mp4"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Input

Input fields for xai/grok-imagine-video/edit-video
NameTypeDescription
promptrequiredstring
Text description of the desired edit.
video_urlrequiredstring (URL)
URL of the input video to edit. The video will be resized to a maximum area of 854x480 pixels and truncated to 8 seconds.
resolutionstring (enum)
Resolution of the output video.

Default: 480p

One of: 480p, 720p

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"outputs": [
  { "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]

Pricing

  • 480p · per second$0.0951/ second
  • 720p · per second$0.1268/ second

The exact charge for your input comes from a quote. How charges settle

API docs

About this model

Overview

Grok Imagine Video renders 1 to 15 seconds at 480p or 720p, in seven aspect ratios from wide 16:9 to vertical 9:16. You set the length to the second.

The image mode starts from your picture and follows a prompt about what should move or change. Its aspect ratio can follow the image, so a portrait photo stays portrait. The edit mode changes a clip you upload by a written instruction, at 480p or 720p, using its first 8 seconds.

What you can build

  • One-second loops and short reaction clips
  • A still photo brought to life with movement and sound
  • Quick drafts of a scene at 480p before a 720p render
  • Portrait 2:3 and 3:4 clips for posts and stories
  • A clip you already have, restyled or changed by a written instruction

Prompting tips

  • Set the exact length you need; a 3 second clip for a loop, 15 seconds for a scene with a few beats.
  • Describe the sounds you want along with the picture: rain, footsteps, a crowd, a line of dialogue.
  • In the image mode, write what moves and leave out what the picture already shows.
  • In the edit mode, say what to change and what to keep; anything after the first 8 seconds of the clip is left out.

What to check

Watch the whole clip with sound; check timing, subject continuity and distracting background changes.

Inputs

  • Prompt (required): Text description of the desired edit.
  • Video (required): URL of the input video to edit. The video will be resized to a maximum area of 854x480 pixels and truncated to 8 seconds.
  • Resolution (optional): Resolution of the output video. Options: 480p, 720p.

Output and limits

  • Resolutions: 480p, 720p.
  • Readable text inside the video, especially small text, is unreliable.
  • Scenes with several interacting characters can lose consistency.
  • Longer clips can show more motion drift or scene changes.
  • Low-quality inputs cause glitches: heavy compression, collages, screenshots and text overlays.
  • Some prompts or outputs can be refused by safety checks.

Price guide

  • 480p · per second: $0.0951 / second
  • 720p · per second: $0.1268 / second
  • The total for your settings is rounded up to the next cent.