Set up coding tools with OzRouter
After you receive your key by email, use it as OZROUTER_API_KEY and point your tool at the OzRouter endpoint.
Use the endpoint from your key email or the current production configuration if it changes later.
Set the environment variable
All examples below read the API key from OZROUTER_API_KEY. Set this variable in the environment that actually starts your coding tool or SDK app.
macOS / Linux
# Applies only to the current terminal
export OZROUTER_API_KEY="sk-ozr-..."To make new terminals pick it up automatically, add the export line to ~/.zshrc, ~/.bashrc, or the shell profile you use.
After changing an environment variable, reopen the terminal or restart the tool session so it reads the new value.
Codex CLI
~/.codex/config.toml
model = "gpt-5.6-sol"
model_reasoning_effort = "medium"
model_provider = "ozrouter"
[model_providers.ozrouter]
name = "OpenAI"
base_url = "https://api.ozrouter.com/codex"
wire_api = "responses"
env_key = "OZROUTER_API_KEY"
supports_websockets = true
requires_openai_auth = trueAvailable models
The examples above use gpt-5.6-sol by default. To try another model, replace every gpt-5.6-sol value in your tool config with one of these customer-facing model IDs:
| Model ID | Use when |
|---|---|
gpt-5.6-sol | Latest frontier agentic coding model |
gpt-5.6-terra | Balanced agentic coding model for everyday work |
gpt-5.6-luna | Fast and affordable agentic coding model |
gpt-5.5 | Frontier model for complex coding, research, and real-world work |
gpt-5.4 | Strong model for everyday coding |
gpt-5.4-mini | Small, fast, and cost-efficient model for simpler coding tasks |
For Codex CLI, change the top-level model value. For OpenCode, change both the key under models and the final "model": "openai/..." value. For OpenClaw, change the defaults.model.primary value and the matching model entry under the models.providers.ozrouter.models list.
You can also query https://api.ozrouter.com/v1/models with your OzRouter API key to see the live model catalog exposed by the router.
Quick check
- Restart the terminal or tool session after changing environment variables.
- Run one small request before starting a long coding session.
- If the tool still calls its default endpoint directly, check
base_url,baseURL, or the tool’s own config file.
CI usage
Set OZROUTER_API_KEY through your CI secret store. Do not commit keys to a repository, build log, screenshot, or debug output.