Claude Code and Codex APIs: Protocol and Setup Checks
A compatibility checklist for Claude Code and Codex: protocol, documented route, Model ID, key handling, and first-request verification.
Contents
Short answer: an “OpenAI-compatible API” label is not enough for both Claude Code and Codex. Claude Code expects an Anthropic-compatible route. Codex uses the Responses API through a custom provider. Check the tool-specific guide, Base URL, authentication fields, and current Model ID before comparing prices.
As of August 16, 2026, BetterToken, PolzaAI, and ProxyAPI have separate public guides for Claude Code and Codex. Public material for both tools was also found at provod.ai, but this article does not reproduce its concrete routes or fields: verify them in the service’s current official documentation. These sources are examples for a compatibility checklist, not a complete price or payment comparison.
What this checklist covers
This is not a stability ranking or a lowest-price claim. No long-running latency or workload test was performed. The comparison is limited to facts visible in public documentation:
- whether Claude Code setup is documented;
- whether Codex setup is documented;
- which protocol and Base URL are shown;
- where to obtain a current Model ID;
- how to verify the first successful request.
Prices, fees, funding methods, available models, and limits change. Check them in the current dashboard or pricing page on the day you choose a provider.
Claude Code, Codex, and Base URLs
| Provider | Claude Code | Codex | Documented route | Verify before paying |
|---|---|---|---|---|
| BetterToken | Dedicated guide | Dedicated guide | Claude Code: `https://bettertoken.ai/%60;?utm_source=blog&utm_medium=organic_content&utm_campaign=legacy-claude-code-codex-api&utm_content=claude-code-codex-api Codex: `https://www.bettertoken.ai/v1/%60?utm_source=blog&utm_medium=organic_content&utm_campaign=legacy-claude-code-codex-api&utm_content=claude-code-codex-api with `wire_api = “responses”` | Current Model ID, key group, funding options, and the request record in Dashboard |
| PolzaAI | Claude Code guide | Codex CLI guide | Claude Code: `https://polza.ai/api\`; Codex: `https://polza.ai/api/v1/\` with `wire_api = “responses”` | Current Model ID, key storage, session usage, and funding terms |
| ProxyAPI | Claude Code guide | Codex guide | Claude Code: `https://api.proxyapi.ru/anthropic\`; Codex: `https://api.proxyapi.ru/openai/v1\` with `wire_api = “responses”` | Current Model ID, key delivery, logging terms, and pricing |
| provod.ai | Public guide | Public material | Verify concrete routes and fields in the service’s current official documentation | Model ID, protocol, authentication fields, and the first request record |
The table records public documentation on the review date. It does not establish that one provider is faster or more reliable than another.
Why one OpenAI-compatible endpoint is not enough
Claude Code and Codex use different client contracts. Claude Code needs an Anthropic-compatible endpoint and usually reads `ANTHROPIC_BASE_URL` plus a token. The exact fields and credential priority depend on the current client and provider guide.
Codex defines a custom provider in `config.toml`. A generic OpenAI-compatible address is insufficient: the provider must support the Responses API and the configuration must use `wire_api = “responses”`. Chat Completions support alone does not establish Codex compatibility.
Choosing by price before checking the protocol can lead to `404`, `model not found`, authentication failures, or a disconnected stream. Check the protocol first and pricing second.
How to test a provider before a real workload
- Open the provider’s current guide for Claude Code or Codex.
- Create your own account and a separate test API Key. Never share it in issues, prompts, or screenshots.
- Copy the Base URL and current Model ID from current documentation or the dashboard.
- For Codex, confirm `wire_api = “responses”`. For Claude Code, confirm the Anthropic-compatible route and authentication fields.
- Run a short task in an empty or disposable repository.
- Confirm the status, model, token usage, and charge in the provider dashboard.
- Run one representative task and compare total cost under the same conditions.
BetterToken provides separate OpenAI-compatible and Anthropic-compatible routes and user-owned API Keys. To evaluate it, use the current Claude Code and Codex guides, then verify the test request in Dashboard.
Compare cost without false precision
Do not compare only input-token prices. Coding agents send project context, conversation history, and tool results, and may make multiple requests for one task. Record the exact Model ID, input/output/cache tokens, request count, retries, applicable funding fees, and final charge for the task.
For BetterToken, use only its current pricing page. For other providers, check the current official dashboard or documentation; numbers from an older review are not current prices.
Diagnose the first error
| Symptom | Check first |
|---|---|
| `401` / `Unauthorized` | The key belongs to this provider, uses the documented field, and has no extra spaces |
| `404` | The field contains the Base URL rather than a full request path, and the protocol is correct |
| `model not found` | The Model ID comes from the provider’s current catalog |
| `429` | The endpoint limit, `Retry-After`, and whether the request is safe to retry |
| Streaming disconnects | Streaming support for this protocol, the network, and the dashboard request status |
| Unclear charge | Model, input/output/cache tokens, and retries in usage history |
Change one parameter at a time and repeat the short test. Replacing the Base URL, key, model, and client together makes the cause hard to identify.
How to decide after the checks
Treat the table as a map of public materials, not a provider ranking. For any option, separately confirm the current routes, Model ID, key handling, usage history, and the measured cost of one identical task. Do not select a winner from one marketing claim.
For Claude Code and Codex, the first filter is not model count or advertised price. It is documented support for two different client contracts. Verify the configuration on the day of the test, run one repository and one task, then decide from recorded token usage, errors, and the final charge.