Connect → Codex & Claude Code
Use AxForge with Codex CLI & Claude Code
OpenAI's Codex CLI speaks the
Responses API and Anthropic's
Claude Code speaks the
Messages API — not Chat Completions. So
AxForge serves both natively: api.axforge.ai/v1/responses and
api.axforge.ai/v1/messages translate to the same models behind your
key, with tool calling and streaming. Point each tool straight at us — no proxy.
Codex CLI
In your user-level ~/.codex/config.toml, add an AxForge provider that
uses the Responses wire API:
model = "chat" # or agentic, or qwen3.8-27b-nvfp4
model_provider = "axforge"
[model_providers.axforge]
name = "AxForge"
base_url = "https://api.axforge.ai/v1"
env_key = "AXFORGE_API_KEY" # env var holding your AxForge key
wire_api = "responses"
Export the key (export AXFORGE_API_KEY=your-axforge-key) and run
codex.
Two things. wire_api must be
"responses" — Codex removed the chat wire API in early 2026. Use a
new model_provider id (don't override the built-in
openai one), in the user-level file, not a project-local one.
Claude Code
Point Claude Code at AxForge's Anthropic-format endpoint with two env vars:
$ export ANTHROPIC_BASE_URL=https://api.axforge.ai
$ export ANTHROPIC_AUTH_TOKEN=your-axforge-key
$ claude # runs on AxForge's /v1/messages
Always set the token. ANTHROPIC_AUTH_TOKEN
is sent as Authorization: Bearer; without a credential Claude Code falls
back to a saved claude.ai login instead of AxForge. (ANTHROPIC_API_KEY,
sent as x-api-key, works too.)
Prefer a gateway?
You don't need one, but if you already run LiteLLM for budgets, fan-out, or multiple providers, it can front AxForge and expose the same Responses and Messages surfaces — point Codex/Claude Code at the proxy instead. Either way works.