How do I use Gemini in Codex CLI?
Run standardcompute launch codex -- --model google/gemini-3.8-flash, or add a Responses provider at https://api.stdcmpt.com/v1: Codex then runs on Gemini 3.8 Flash on a plan from $19 a month, with HTTP 402 for new requests once the compute budget is used. Google's OpenAI-compatible API covers Chat Completions only, which current Codex releases no longer use, so Codex cannot call Google directly.
# Install Codex and the Standard Compute launcher once
npm install -g @openai/codex
curl -fsSL https://standardcompute.com/cli/install.sh | sh
# Start Codex pinned to google/gemini-3.8-flash
standardcompute launch codex -- --model google/gemini-3.8-flash
Swap in google/gemini-3.1-pro-preview for harder work, or pick it later with /model inside Codex.
Which Gemini for Codex
| Model ID | Typical day | Busy day | Use it for |
|---|---|---|---|
| google/gemini-3.8-flash | $1.54 | $16 | Most work |
| google/gemini-3.1-pro-preview | $4.19 | $43 | Hard steps, through /model |
Gemini API paid tier per million tokens: 3.8 Flash $0.75 input, $0.075 cached, $3.75 output through December 31, 2026, then $1.50, $0.15, $7.50; 3.1 Pro $2, $0.20, $12 up to 200K. Source. A typical day is 8.5M tokens and a busy one 86.7M, 87.2% of input as cache reads: the median and 90th-percentile coding-agent day in our Agent Burn Index, measured on OpenCode, Cline, Kilo and similar agents, September 13 to October 12, 2026. Priced at the list rates above; your own days will differ.
What works with Gemini in Codex
- Shell commands, file edits and screenshots work; both models read images.
- Codex's built-in web search is off on this connection.
- The launcher offers one reasoning level, medium, and lists every served model under
/model.
The catch
From January 1, 2027, Gemini 3.8 Flash lists at double this year's price, about $3.08 for a typical day. If you only want Gemini in a terminal agent, Google's own Gemini CLI connects natively; Codex with Gemini makes sense when you want Codex's workflow with a non-OpenAI model.
Where Standard Compute fits
The Responses translation runs on our side, so there is no local proxy to keep running; Gemini, GPT and Claude share one key and one monthly bill.
FAQ
Can I put Google's OpenAI-compatible base URL in Codex?
Not with current Codex releases. They require wire_api = "responses", and Google's compatibility layer documents Chat Completions only, so Codex's requests have nowhere to go.
Does Codex's /model list Gemini models?
With the launcher, yes: it builds Codex's model list from the gateway's model catalog, which includes every served Gemini ID.