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

Codex · LLMReleased 2025-12-17

How to Use Gemini 3 Flash Preview in Codex

Gemini 3 Flash Preview suits everyday coding, document analysis, and planning when response speed matters. Built on Gemini 3 Pro’s reasoning foundation, it lets you trade reasoning depth for faster responses.

Prompts to try with Gemini 3 Flash Preview in Codex

Copy an example into Codex, or ask in your own words.

Use Gemini 3 Flash Preview with high thinking to investigate the failing tests in this project. Reproduce the failure, identify its cause, make the smallest useful fix, and run the relevant tests.

Gemini 3 Flash PreviewCodex
Try asking
  • Use Gemini 3 Flash Preview to review the current diff for behavioral bugs. For each finding, show the triggering input and affected lines; omit style suggestions.

  • Use Gemini 3 Flash Preview with high thinking to plan this project's database migration. Read the schema and migration files, then list dependencies, validation checks, and rollback conditions before changing code.

  • Use Gemini 3 Flash Preview to explain the request flow from this project's route handler to its database query. Cite file paths and identify where validation and error handling occur.

  • Use Gemini 3 Flash Preview to build a small browser game in this project: move a paddle with arrow keys, bounce a ball, and win after clearing ten bricks. Add a restart control and verify the game runs.

How to set up Gemini 3 Flash Preview 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 Gemini 3 Flash Preview

    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": "vertex",
        "model": "google/gemini-3-flash-preview",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: Codex finds Gemini 3 Flash Preview on Spiral, shows the price and runs it.

Gemini 3 Flash Preview providers and prices

Spiral runs Gemini 3 Flash Preview through Vertex AI. Open a card for today's price, with every fee included.

Vertex AILLM
Gemini 3 Flash Preview
google/gemini-3-flash-preview

Settings you can ask for

Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Top p0 to 1
Max tokens1 to 65536

The most output tokens to generate.

Temperature0 to 2
Presence penaltya number from -2
Reasoning effortminimal, low, medium, or highhigh

How much the model reasons.

Frequency penaltya number from -2

Every API field of Gemini 3 Flash Preview is on its tool page: open its card above.

What can you do with Gemini 3 Flash Preview in Codex?

Turn project code and test failures into focused fixes, reviews, and migration plans with Gemini 3 Flash Preview. Give each task a concrete acceptance check so the result can be tested against the project.

Debug a failing test

Give Gemini 3 Flash Preview the failure output and relevant code. Ask for a reproducible cause, a focused patch, and a regression test.

Review a code change

Ask Gemini 3 Flash Preview to inspect a diff for behavioral bugs and explain each finding with the triggering input and affected code.

Compare long documents

Provide two policy texts and ask Gemini 3 Flash Preview to identify changed obligations, deadlines, and exceptions with supporting passages.

Extract action items

Turn meeting notes into a record of decisions, owners, and due dates. Ask Gemini 3 Flash Preview to mark any unstated owner or deadline as unknown.

Sort support requests

Give Gemini 3 Flash Preview defined categories and request one category plus a supporting excerpt for each request.

Plan a software migration

Use Gemini 3 Flash Preview to turn requirements and constraints into an ordered migration plan with dependencies, checks, and rollback conditions.

Answer questions from reference text

Supply product documentation and ask Gemini 3 Flash Preview to answer with supporting passages and identify questions the text does not resolve.

Build a playable prototype

Ask Gemini 3 Flash Preview to turn explicit game rules into a small browser prototype with a clear win condition and keyboard controls.

Questions about Gemini 3 Flash Preview in Codex

Can Codex use Gemini 3 Flash Preview?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Gemini 3 Flash Preview like any built-in tool.

How much does Gemini 3 Flash Preview cost in Codex?

Up to $0.01602 per run at the default inputs. $0.65 per 1M input tokens, $0.065 per 1M cached input tokens, $0.108333335 per 1M cache write tokens, $1.30 per 1M audio input tokens, $3.90 per 1M output tokens. 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 Vertex AI account to use Gemini 3 Flash Preview in Codex?

No. Spiral runs Gemini 3 Flash Preview on its own Vertex AI account. You sign in to Spiral once and never paste a key.

How long does it take to set up Gemini 3 Flash Preview in Codex?

About two minutes: add the hosted server, then sign in.

Does Codex wait while Gemini 3 Flash Preview runs?

Gemini 3 Flash Preview runs in the background. Codex starts the run, checks on it and gives you the text, json when it's ready.

What is Gemini 3 Flash good at?

Google lists everyday coding, reasoning, planning, and multimodal analysis as intended uses. Practical tasks include debugging a function, comparing long documents, and turning a brief into an ordered work plan.

How much context can Gemini 3 Flash handle?

Gemini 3 Flash Preview has a 1,048,576-token context window and supports up to 65,536 output tokens. For a long document or codebase, put the source material first and the specific question afterward.

When should I use less thinking?

Try minimal thinking for straightforward extraction or classification. Reserve higher thinking for debugging, reasoning, and plans with dependencies, then compare results on examples from your actual workload.

Should I lower the temperature for more accurate answers?

Start at 1.0, which Google recommends for Gemini 3. Define the evidence the answer must use and the format you need instead of treating a lower temperature as an accuracy guarantee.

How should I prompt Gemini 3 Flash?

Give it a clear task, the relevant source material, and a concrete deliverable. For example, request a comparison table with supporting passages rather than a general review.

Get started

Start using Gemini 3 Flash Preview 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