[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [fal](https://spiral.ai/integrations/codex/fal)

# 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.

|  |  |
| --- | --- |
| Tools | 876 |
| Categories | Image, Video, 3D, Audio, Data |
| Served by | fal |
| Pricing | Pay per run, no subscription |
| Setup | About 2 minutes, no API key |

## Prompts to try with fal in Codex

- 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

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run fal**: One request; the result comes back by polling or a webhook.

```bash
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.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## fal tools and prices

- [Kling 3.0 Pro · Text to Video](https://spiral.ai/tools/fal/fal-ai/kling-video/v3/pro/text-to-video) (fal): $0.218 per second with audio ($0.146 without).
- [FLUX 3 Text to Image](https://spiral.ai/tools/fal/blackforestlabs/flux-3/text-to-image) (fal): $0.0624 per megapixel of the output image, as fal measures it.
- [GPT Image 2.6 Flare · Edit](https://spiral.ai/tools/fal/openai/gpt-image-2.6/flare/edit) (fal): $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.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Codex guides](https://spiral.ai/integrations/codex)

## fal in other agents

- [Amp](https://spiral.ai/integrations/amp/fal)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/fal)
- [Claude](https://spiral.ai/integrations/claude-desktop/fal)
- [Claude Code](https://spiral.ai/integrations/claude-code/fal)
- [Cline](https://spiral.ai/integrations/cline/fal)
- [Cursor](https://spiral.ai/integrations/cursor/fal)
- [Devin](https://spiral.ai/integrations/devin/fal)
- [dots](https://spiral.ai/integrations/dots/fal)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/fal)
- [Gemini](https://spiral.ai/integrations/gemini/fal)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/fal)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/fal)
- [goose](https://spiral.ai/integrations/goose/fal)
- [Grok](https://spiral.ai/integrations/grok/fal)
- [Grok Build](https://spiral.ai/integrations/grok-build/fal)
- [Hermes](https://spiral.ai/integrations/hermes/fal)
- [Instinct](https://spiral.ai/integrations/instinct/fal)
- [Manus](https://spiral.ai/integrations/manus/fal)
- [Muse](https://spiral.ai/integrations/muse/fal)
- [Muse Code](https://spiral.ai/integrations/muse-code/fal)
- [n8n](https://spiral.ai/integrations/n8n/fal)
- [Notion](https://spiral.ai/integrations/notion/fal)
- [OpenClaw](https://spiral.ai/integrations/openclaw/fal)
- [opencode](https://spiral.ai/integrations/opencode/fal)
- [Perplexity](https://spiral.ai/integrations/perplexity/fal)
- [Raycast](https://spiral.ai/integrations/raycast/fal)
- [VS Code](https://spiral.ai/integrations/vscode/fal)
- [Windsurf](https://spiral.ai/integrations/windsurf/fal)
- [Zapier](https://spiral.ai/integrations/zapier/fal)

## More Codex guides

- [WaveSpeed AI](https://spiral.ai/integrations/codex/wavespeed)
- [60.tools WoW Forever best-in-slot gear](https://spiral.ai/integrations/codex/60-tools-wow-forever-best-in-slot-gear)
- [Replicate](https://spiral.ai/integrations/codex/replicate)
- [60.tools WoW Forever gear lists](https://spiral.ai/integrations/codex/60-tools-wow-forever-gear-lists)
- [OpenRouter](https://spiral.ai/integrations/codex/openrouter)
- [60.tools WoW Forever item details](https://spiral.ai/integrations/codex/60-tools-wow-forever-item-details)

## 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.

