Skip to main content

Quick answer

OpenAI-compatible API and Anthropic-compatible API are two different compatibility layers. Both can be used for model requests, but their request formats, fields, tool semantics, and client expectations differ. Codex CLI, Cursor, Cline, OpenCode, and OpenClaw usually use OpenAI-compatible endpoints. Claude Code and some Claude Desktop Gateway paths use Anthropic-compatible endpoints. Do not choose only by model name. Choose by the protocol expected by the tool, then use the matching Base URL, API Key, and Model ID.

When this matters

  • You see two Base URLs and do not know which one to use
  • Claude Code works, but Codex or Cursor fails
  • Codex works, but Claude Code reports endpoint or auth errors
  • You want to use one API Key across multiple tools
  • You are configuring an API gateway, model router, or local proxy

Key concepts

ConceptMeaning
OpenAI-compatible APIAn endpoint that follows OpenAI-style request conventions
Anthropic-compatible APIAn endpoint that follows Anthropic / Claude request conventions
Base URLThe API root address used by the client
API KeyThe credential for the selected provider
Model IDThe model identifier available under that provider and protocol
GatewayA layer for compatibility, routing, billing, or observability between client and providers
Start with the tool:
ToolCommon protocol directionBase URL in this documentation
Claude CodeAnthropic-compatiblehttps://www.llmeasy.ru
Claude Desktop GatewayAnthropic-compatible or local routeFollow the Gateway setup
Codex CLIOpenAI-compatible / Responseshttps://www.llmeasy.ru/v1
CursorOpenAI-compatiblehttps://www.llmeasy.ru/v1
ClineOpenAI-compatible providerhttps://www.llmeasy.ru/v1
OpenCode / OpenClawOpenAI-compatiblehttps://www.llmeasy.ru/v1
If a tool expects OpenAI-style APIs, do not use the Claude Code Anthropic Base URL. If a tool expects Anthropic-style APIs, do not use the OpenAI-compatible /v1 endpoint.

Common mistakes

  • Assuming one model name can be used unchanged across every protocol.
  • Putting the OpenAI-compatible Base URL into Claude Code.
  • Putting the Anthropic-compatible Base URL into Codex, Cursor, or Cline.
  • Treating a Claude.ai or ChatGPT subscription as an API Key.
  • Changing only the API Key while leaving the Base URL and Model ID mismatched.

About LLMEasy

LLMEasy provides both Anthropic-compatible and OpenAI-compatible access patterns. You can manage API Keys, balance, and usage history in one dashboard, but each client still needs the protocol it actually supports. A simple rule: Claude Code uses Anthropic-compatible; Codex, Cursor, Cline, OpenCode, and OpenClaw usually use OpenAI-compatible.

References