How to Use Grok Imagine Extend Video in Codex
Grok Imagine Extend Video adds a prompted continuation to an existing clip, useful for finishing an action or extending a camera move. It returns the original and continuation together, preserving the source proportions with output capped at 720p.
Prompts to try with Grok Imagine Extend Video in Codex
Copy an example into Codex, or ask in your own words.
Use Grok Imagine Extend Video on public/media/product.mp4 if it is 2 to 15 seconds long. Add 4 seconds in which the camera pulls back to show the full product, then holds.
Use Grok Imagine Extend Video to add 3 seconds to assets/character.mp4. Continue from the final pose: the character turns toward the doorway and pauses. Check that the source is 2 to 15 seconds long first.
Find the 8-second landscape clip in this project's media folder. Use Grok Imagine Extend Video to add 4 seconds of the existing camera movement, and save the result for review.
Use Grok Imagine Extend Video on the project's 6-second city shot. Make two separate 4-second continuations from that source: a slow pullback and a gentle pan to the right.
Use Grok Imagine Extend Video to extend assets/closing-shot.mp4 by 5 seconds, provided the source is 2 to 15 seconds long. Request gentle movement in the scene with a stationary camera, then make a preview around the join.
How to set up Grok Imagine Extend Video in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Grok Imagine Extend Video
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "fal", "model": "xai/grok-imagine-video/extend-video", "input": { "prompt": "The camera slowly zooms out to reveal the city skyline at sunset", "video_url": "https://v3b.fal.media/files/b/0a8b9112/V5Z_NIPE3ppMDWivNo6_q_video_019.mp4" } }'
Then paste one of the prompts above: Codex finds Grok Imagine Extend Video on Spiral, shows the price and runs it.
Grok Imagine Extend Video providers and prices
Spiral runs Grok Imagine Extend Video through fal. Open a card for today's price, with every fee included.
Settings you can ask for
Grok Imagine Extend Video works from your prompt and video URL. Ask Codex for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Duration | 2 to 10 | 6 | Length of the extension in seconds. |
Every API field of Grok Imagine Extend Video is on its tool page: open its card above.
What can you do with Grok Imagine Extend Video in Codex?
Extend project video assets with a requested next action or camera move. A coding agent can inspect clip lengths and prepare continuations for review alongside the project's existing media.
Finish a product reveal
Continue an existing product shot as the camera pulls back to show the full object. Request a short pause at the end for a closing edit.
Complete a character action
Extend an animated scene so a character can finish turning, sit down, or react to something already visible.
Add room for narration
Request a few more seconds of motion in an existing landscape shot, then place narration over the longer sequence in an editor.
Continue an establishing shot
Extend a camera move across a city, room, or landscape to give the location more screen time.
Try different story endings
Start each attempt from the same short clip and request a different next action. Compare the endings before choosing one for the edit.
Lengthen presentation footage
Continue an existing background clip with restrained motion to give a presentation's closing slide more time on screen.
More on Grok Imagine Extend Video and Codex
Overview
Grok Imagine Extend Video in other agents
Questions about Grok Imagine Extend Video in Codex
Can Codex use Grok Imagine Extend Video?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Grok Imagine Extend Video like any built-in tool.
How much does Grok Imagine Extend Video cost in Codex?
$0.065 per second. Billed on `duration`, default 6. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.
Do I need a fal account to use Grok Imagine Extend Video in Codex?
No. Spiral runs Grok Imagine Extend Video on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up Grok Imagine Extend Video in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while Grok Imagine Extend Video runs?
Grok Imagine Extend Video runs in the background. Codex starts the run, checks on it and gives you the video when it's ready.
What is Grok Imagine Extend Video useful for?
Use it to add a next beat to an existing shot: finish a gesture, continue a camera move, or give a scene a longer ending. The continuation begins at the clip's last frame.
How long can the finished video be?
A source can be 2 to 15 seconds long, and an extension adds 2 to 10 seconds. A 15-second source with a 10-second extension produces a 25-second result.
Can Grok Imagine Extend Video produce 1080p output?
Output is capped at 720p. It otherwise follows the source video's resolution and proportions.
What should I put in the continuation prompt?
Describe what happens immediately after the final frame. For example, ask a walking subject to stop and turn, or ask the camera to continue pulling back.
Does the result include my original footage?
Yes. The result contains the original clip and the generated continuation stitched together.
Start using Grok Imagine Extend Video in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


