Connect your coding agent
Choose your tool, copy the prompt, and let your agent check and configure the connection.
Choose your agent
Uses your connected free models, not official Claude or OpenAI models.
Give this to your agent
The prompt contains instructions and public URLs only. Never paste your API key into an agent conversation.
Manual setup and compatibility
Connect through the stateless Responses endpoint. Function calls and streaming are supported; built-in web search, stored responses and remote compaction are unavailable.
Responses API · ~/.codex/config.toml
Official documentationManual configuration reference
Replace MODEL_ID_FROM_MODELS with auto (after confirming tool models are available) or an ID returned by /api/v1/models?tools=true. Merge these settings into the indicated files; keep the API key in your local environment. The Claude example uses Bash/zsh; the setup prompt adapts commands to your shell.
~/.codex/config.toml
~/.codex/freemodel.config.toml
What a working connection must pass
Authenticated model discovery, a text response, SSE streaming, and the target client’s actual tool-call and tool-result round trip. Model names come from your account’s /models response.
Agent API limits: text and client tools; 256 messages; 128 tools; 512,000 characters total; up to 8,192 output tokens. Images, hosted search, stored sessions and extended thinking are unavailable.
Documentation checked October 28, 2026. The prompts recheck your installed version before editing settings.
Plain-text reference for agents