Spiral gives your agent every tool with one account. Browse the tools →

Codex · Video

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.

falCodex
Try asking
  • 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
    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.

    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.

    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.

    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

3

Ready to run from Codex: today's price, with every fee included.

falVideo
Kling 3.0 Pro · Text to Video
fal-ai/kling-video/v3/pro/text-to-video
falImage
FLUX 3 Text to Image
blackforestlabs/flux-3/text-to-image
falImage
GPT Image 2.6 Flare · Edit
openai/gpt-image-2.6/flare/edit

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.

Success rate
100.0%
Fastest median run time
25.8s
Runs, last 24 hours
25
ToolSuccessMedian timeRuns
Kling 3.0 Pro · Text to VideoNot enough runs
FLUX 3 Text to Image100.0%25.8s23
GPT Image 2.6 Flare · EditNot enough runs

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.

Get started

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 Codex

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options