Prerequisites
- A ByteSpike account + a key. For GPT-5 / o-series, a key in any
group that serves them (typically the OpenAI /
defaultgroup). For reaching Claude or Gemini via Responses translation, the key’s group must include those models. - Codex CLI installed:
Configure
Codex CLI readsOPENAI_API_KEY + OPENAI_BASE_URL. Set both:
Verify
401 = wrong key, 402 = wallet empty,
400 model_not_allowed = the default model isn’t in your key’s
group.
Switching models
Most Codex versions accept--model:
gpt-5-* is the OpenAI-native path; the
Claude id triggers ByteSpike’s Responses→Messages translation
under the hood. The CLI never knows the difference.
Common configs
One key, multi-model session
One key, multi-model session
Pick a key whose group includes the models you want to bounce
between (typically the all-protocols group if your account
has one). The CLI can then
--model between OpenAI native and
Claude/Gemini translated within a single session.Reasoning mode (o-series + GPT-5)
Reasoning mode (o-series + GPT-5)
Pass through Codex’s reasoning controls:The gateway forwards the
reasoning.effort field verbatim. Pricing reflects the higher reasoning-token output — see pricing.Structured output (JSON Schema)
Structured output (JSON Schema)
Codex’s
--response-format json_schema=... flag is forwarded as
response_format to the gateway, which handles it correctly per
model (GPT supports the JSON Schema mode directly;
the Claude path falls back to text + parse).Tool definitions
Tool definitions
Codex’s tool definitions (
--tools=...) are forwarded as the
Responses-API tools array. On the GPT path they’re native;
on the Claude/Gemini path the gateway translates to the
target model’s tool format (input_schema for Claude,
functionDeclarations for Gemini).Codex vs Claude Code — when to use which
| Strength | Claude Code | Codex CLI |
|---|---|---|
| Natural model fit | Claude family (Anthropic Messages native) | GPT-5 + o-series (OpenAI Responses native) |
| Tool-use schema | Cleaner — Anthropic uses raw JSON Schema | More noise — OpenAI wraps tool_calls in strings |
| Reasoning controls | thinking blocks on Opus / Sonnet 4.x | reasoning.effort: low/medium/high on GPT-5 |
| Cache control | cache_control blocks (Anthropic native) | n/a |
| JSON mode | Both work via response_format | Both work; OpenAI more mature |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
401 invalid x-api-key | Wrong key | Recopy from console |
402 insufficient_balance | Wallet empty | Top up |
400 model_not_allowed | Model not in key’s group | Switch group or model |
| Tool calls returning garbage | Model path doesn’t support the tool schema (rare on translated Claude routes) | Switch to GPT-5 native or simplify the tool schema |
| Stall during streaming | Proxy buffering | Add llm.bytespike.ai to NO_PROXY |
Next
Claude Code CLI
Anthropic’s coding CLI, same kind of setup.
/responses reference
The protocol Codex speaks.
Models
GPT-5 / o-series catalog.
Cursor IDE
Editor-level integration.