AI coding tools
API setup, without the traps
Official config paths, compatibility checks and troubleshooting for Codex, Claude Code and Cursor. Confirm the protocol before you buy third-party API credit.
Ofox’s partner page says the extra $3 on a referred user’s first top-up is paid by Ofox, not by the affiliate. Source, reviewed 2026-10-29.
Codex: model provider config
Codex CLI and the IDE extension read ~/.codex/config.toml. Official docs allow a model provider. The service still has to speak the protocol Codex uses and serve the model you name. Official config docs ↗
- Install and update official Codex, and confirm it runs on your machine.
- Open
~/.codex/config.tomland read the official docs formodel_provider,model_providersandwire_api. - Ask the API provider whether they support the Responses protocol Codex uses, the model id, and the auth scheme. OpenAI Chat Completions alone does not prove compatibility.
- Make a small test call. Check tool use, long output and stability before a large top-up.
tests/ofox_smoke.py does not launch Codex, and it has not recorded a pass here.Claude Code: LLM gateway
Claude Code calls the Anthropic API. Official docs allow an LLM gateway, and that gateway has to expose a compatible interface. Official gateway docs ↗
- Install from the official guide and complete a basic run first.
- Ask the provider whether they expose an Anthropic Messages gateway, tool calls, streaming, and which model ids.
- If they confirm that, the official variable shape looks like this. Use the values they give you:
export ANTHROPIC_BASE_URL="https://YOUR-COMPATIBLE-GATEWAY"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"Do not put an API key in GitHub or on a public page. Auth headers and paths differ by gateway. Follow the provider and the official docs.
/v1 base URL into ANTHROPIC_BASE_URL. Claude Code is not launched by tests/ofox_smoke.py, and that test has not recorded a pass here.Cursor: do not point it straight at Ofox
Cursor can store API keys for some providers. That setting does not cover every Cursor feature. Official API keys docs ↗
- Open Cursor Settings → Models. The menu moves between versions.
- Confirm the provider and model are in the official list, add the key as the page describes, and use Verify.
- Check whether a custom base URL is supported. For an aggregator, confirm the current Cursor version against that provider’s own notice.
- Test chat and edits you actually use. Tab completion and similar features may still use Cursor’s own service.
codex or claude in Cursor’s built-in terminal, after those tools are configured on their own. Those two clients are still unverified on this site. Ofox compatibility note ↗, last updated 2026-10-16.API setup helper
Pick a tool and an operating system. The helper shows what to prepare, the official docs, and a copyable checklist. Ofox publishes Codex and Claude Code guides. This site has not verified them with a working key. Ofox marks direct Cursor use as unsuitable.
Do not type or paste a real API key on this page. The checklist is built in your browser and is not submitted.
When the call fails, check these first
401 Unauthorized?
Check that the key belongs to that API, that you did not copy a space, that the account has credit, and that the auth header matches the tool. Do not paste the key into a public post.
404 or model not found?
Check the path, the protocol and the model id. Codex Responses and a generic OpenAI-compatible chat endpoint are not the same feature. Claude Code needs an Anthropic-compatible gateway.
429 or rate limited?
Check balance, concurrency, token rate and upstream capacity. Slow the client down and retry.
Why didn’t a top-up turn on Cursor Tab or an official subscription?
Third-party model credit is billed apart from Codex, Claude Code and Cursor subscriptions. Some features only run on the official service. Ofox’s Cursor note says Tab, Background Agent and Auto do not follow a custom provider.
Check compatibility, then open an API account
Use the referral link to see live models, prices and the new-user offer. Confirm the tool’s protocol before you pay. The extra $3 on a first top-up, if you qualify, is Ofox’s credit.
See models and the new-user offer →