Codex
Add Tchavi as a model provider in ~/.codex/config.toml and run Codex on mobile-money credits.
Part of the coding agents guides.
Codex describes providers as named blocks in ~/.codex/config.toml. Tchavi is one block and one environment variable.
Configure it
model = "gpt-5.4"
model_provider = "tchavi"
[model_providers.tchavi]
name = "Tchavi"
base_url = "https://tchavi.com/api/v1"
env_key = "TCHAVI_API_KEY"
wire_api = "chat"Then:
export TCHAVI_API_KEY=sk-tch-your-key
codexenv_key names the variable Codex reads the key from — the key itself never enters the file, so config.toml stays safe to sync between machines.
wire_api
wire_api = "chat" selects /v1/chat/completions, the format every model in the catalogue supports.
Which wire_api to pick
Tchavi also serves /v1/responses, so wire_api = "responses" works for OpenAI models. Use
"chat" unless you specifically need a Responses-only feature: it is the format that also covers
the Claude, DeepSeek, Gemini and Qwen models, so switching model becomes a one-line change.
Switching models
Change model to any Tchavi model id — claude-sonnet-4-6, deepseek-v4-pro, gpt-5.4. To keep several providers configured at once, add more [model_providers.*] blocks and point model_provider at whichever you want:
[model_providers.tchavi-cheap]
name = "Tchavi (budget)"
base_url = "https://tchavi.com/api/v1"
env_key = "TCHAVI_API_KEY"
wire_api = "chat"Both blocks can share one env_key, since it is the same account.
Next: Cursor · Back to coding agents