> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Don't Use Claude Models in the Codex Client: Cache Billing Stops Working

> Claude prompt caching only works on the Anthropic-native /v1/messages format. Codex speaks OpenAI protocols only, so selecting a Claude model there yields zero cache reads and full-price input every turn — and long-context bills multiply. The docs now cover why, how to check, and what to do instead.

**2026/11/18 00:40 (UTC+8)** · Docs Update · Anthropic / OpenAI

📖 **Don't use Claude models in the Codex client: cache billing stops working and long-context bills multiply.**

Claude's Prompt Cache is explicit: it only works on Anthropic-native `/v1/messages`. Codex speaks OpenAI protocols only, so Claude there falls back to `chat/completions` compatibility mode — no `cache_control`, no `cache_read_input_tokens`, and the full context is billed at list price on every turn. It is the easiest trap to fall into when your Claude Code subscription runs out of quota and you try to continue inside Codex: you save the account switching, but the bill goes up.

If Codex really must orchestrate Claude, have it generate and run code or an MCP tool that calls `/v1/messages`; caching works on the native format. The Claude model page and prompt-caching guide now explain the details.

See [Claude API Basics](https://docs.apiyi.com/en/api-capabilities/claude.md) and the [Claude Prompt Caching Guide](https://docs.apiyi.com/en/api-capabilities/claude-prompt-caching.md).

***

← [Back to Live Updates](https://docs.apiyi.com/en/live.md) · 📚 [Monthly archive](https://docs.apiyi.com/en/live/archive.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.