How to Use fal in Codex
Kling turns text briefs and still images into short videos. In Codex, use it through Spiral for website footage, product teasers, and scenes with multiple shots and generated audio.
Prompts to try with fal in Codex
Copy an example into Codex, or ask in your own words.
Read the homepage brief in this project. Use Kling 3.0 Pro text-to-video to create a 5-second 16:9 background clip: morning light moving across a ceramic workbench, a slow camera push, no people or lettering. Set generate_audio to false.
Use Kling 3.0 Pro image-to-video to animate public/images/coffee-bag.png into a 5-second product shot. Keep the bag upright while the camera moves gently closer and steam rises from a cup beside it. Turn generated audio off.
Read the campaign brief in this repository. Use Kling 3.0 Pro to create a 12-second 9:16 video with three custom shots: 4 seconds of a commuter entering a rainy station, 4 seconds of shoes splashing through a puddle, and 4 seconds of the train arriving. Generate rain, footsteps, and train sounds without dialogue.
Use Kling 3.0 Pro image-to-video with public/storyboard/opening.png as the start image and public/storyboard/closing.png as the end image. Create an 8-second transition with a slow camera pullback and no generated audio.
Estimate, then generate a 5-second 9:16 clip with fal: a paper boat drifting down a rainy street. Save the result in ./assets.
How to set up fal 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 fal
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": "fal-ai/kling-video/v3/pro/text-to-video", "input": { "prompt": "Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in…" } }'
Then paste one of the prompts above: Codex finds fal on Spiral, shows the price and runs it.
fal tools you can run in Codex
3Ready to run from Codex: today's price, with every fee included.
$0.0475 per 4:3 image at high quality ($0.0225 low, $0.0393 medium, $0.084 xhigh, $0.188 max). At high: $0.0605 square, $0.069 square HD, $0.0342 16:9. Auto quality or size: the price of the one chosen for the request. Prompt: $6.50 per 1M tokens. Input images: $0.0106 each at 1024×1024.
What can you do with fal in Codex?
Bring a project brief, storyboard, or approved image into your request so the video serves a specific place in your app or website. Ask for the shot timing, framing, and sound you need, then review the result in that context.
Website background footage
Request a short clip around the page's subject, framing, and motion needs. Try it behind the actual headline to judge whether the footage leaves enough room for readable text.
Product image animation
Start with an approved product image and describe the camera movement and surrounding action. Review the product's shape and label before adding the clip to a product page.
Campaign storyboard previews
Turn a repository's campaign brief into a sequence with explicit shot lengths. Use the result to review pacing, camera choices, and sound before revising the creative.
Transitions between approved frames
Supply opening and closing images for a scene and describe the movement between them. Review the transition alongside the project's other footage.
Recurring character scenes
Use reference elements when a character or product needs to appear across changing shots. Compare appearance at each cut before accepting the sequence.
Videos with scene audio
Include the sounds the scene needs in the brief, such as footsteps, rain, or an arriving train. Review the generated sound with the picture.
fal success rate and speed on Spiral
Success and speed over the last 24 hours, across every run of these tools on Spiral.
| Tool | Success | Median time | Runs |
|---|---|---|---|
| Kling 3.0 Pro · Text to Video | Not enough runs | ||
| FLUX 3 Text to Image | 100.0% | 25.8s | 23 |
| GPT Image 2.6 Flare · Edit | Not enough runs | ||
More on fal and Codex
Overview
fal in other agents
Questions about fal in Codex
Can Codex use fal?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run fal like any built-in tool.
How much does fal cost in Codex?
Each tool has its own price, for example Kling 3.0 Pro Text to Video: $0.218 per second with audio ($0.146 without); FLUX 3 Text to Image: `resolution`: otherwise $0.0624, 1k (default) $0.1248, 1.5k $0.1872, 2k $0.312, 4k $1.0608 per megapixel; GPT Image 2.6 Flare Edit: $0.0475 per 4:3 image at high quality ($0.0225 low, $0.0393 medium, $0.084 xhigh, $0.188 max). At high: $0.0605 square, $0.069 square HD, $0.0342 16:9. Auto quality or size: the price of the one chosen for the request. Prompt: $6.50 per 1M tokens. Input images: $0.0106 each at 1024×1024. You pay per run from one Spiral balance, and failed runs are free.
Do I need a fal account to use fal in Codex?
No. Spiral runs fal on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up fal in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while fal runs?
fal runs in the background. Codex starts the run, checks on it and gives you the video when it's ready.
Can Kling 3.0 Pro keep a character consistent across shots?
Reference elements help guide character and object consistency in image-to-video generation. Use them for recurring subjects, then check appearance at each shot change.
How long can a Kling 3.0 video be?
Kling VIDEO 3.0 supports durations from 3 to 15 seconds. For a storyboard, decide how much of that time each shot needs.
Can Kling 3.0 Pro generate video with sound?
Yes. It supports native audio generation, so include the desired sound in your scene brief.
Can I give Kling 3.0 Pro a first and last frame?
Yes. The image-to-video tool accepts a start image and an optional end image through end_image_url.
Can Kling 3.0 Pro make vertical videos?
Yes. Its text-to-video tool supports vertical 9:16, widescreen 16:9, and square 1:1.
Start using fal 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


