Skip to main content

Short answer

The Base URL must match the protocol expected by your tool. Claude Code usually uses the Anthropic-compatible root address. Codex CLI, Cursor, Cline, OpenCode, OpenClaw, and other external tools usually use the OpenAI-compatible /v1 address. In BetterToken: Do not guess the path. API Key, Base URL, and Model ID must come from the same provider or gateway.

Why there are different Base URLs

Different SDKs append paths in different ways. The same model name does not mean the same Base URL works everywhere. The real match is between tool protocol, Base URL, API Key, Key group, and Model ID.

Quick reference

Common errors

  1. Confirm whether the tool expects OpenAI-compatible or Anthropic-compatible API.
  2. Check whether the Base URL matches that protocol.
  3. Check whether the API Key is from the same service.
  4. Check whether the Model ID comes from the model plaza and belongs to the current Key group.
  5. Send a minimal test request, such as hello.

Code examples

OpenAI-compatible tools usually use the /v1 address:
Claude / Anthropic-compatible setups usually use the root address:

About BetterToken

BetterToken provides both Anthropic-compatible and OpenAI-compatible access. You can manage API Keys, balance, and usage records in the same dashboard, but each client still needs the protocol address it supports. Quick rule: Claude Code uses https://www.bettertoken.ai; Codex CLI, Cursor, Cline, OpenCode, and OpenClaw use https://www.bettertoken.ai/v1.