CrossModel API documentation
CrossModel is a multi-model API gateway for developers. With a single API key you can call DeepSeek, Claude, GPT, Gemini and more — and handle model selection, top-ups, usage, and key management from one console.
Already have code wired to the OpenAI or Anthropic SDK? Usually you only need to change base_url and model — no need to rewrite your application logic.
Pick your path
| Your situation | Where to start | Notes |
|---|---|---|
| Already on OpenAI Chat Completions | Quickstart | Swap base_url for CrossModel and use the vendor/model ID format. |
| New project, want an OpenAI-compatible API | /v1/chat/completions | The most mature ecosystem — chat, tool calls, multimodal input, streaming. |
| Prefer the OpenAI Responses style | /v1/responses | Input and output organized as structured items; good for richer tool and multimodal flows. |
| Already using the Anthropic SDK or Claude Code | /v1/messages | The Anthropic Messages protocol; auth prefers x-api-key. |
| Need to discover models dynamically | /v1/models | List the models available right now and validate a model ID. |
Base URLs
| Protocol | Base URL | Why |
|---|---|---|
| OpenAI-compatible | https://api.crossmodel.ai/v1 | The OpenAI SDK appends only /chat/completions, /responses, or /models, so keep the /v1. |
| Anthropic-compatible | https://api.crossmodel.ai | The Anthropic SDK (and Claude Code) appends /v1/messages itself, so leave the /v1 off. |
Both protocols are served by the same host — only the path each SDK adds for you differs. If you're calling the API directly with cURL, use the full endpoint URL shown on each API reference page.
Concepts worth knowing
- Auth: API keys start with
cm-. OpenAI-compatible endpoints useAuthorization: Bearer; Anthropic-compatible endpoints can usex-api-key. - Model IDs: CrossModel uses the
vendor/modelformat, e.g.deepseek/deepseek-v4-prooranthropic/claude-sonnet-4.6. - Billing: you pay for actual token usage; requests are rejected when your balance runs out.
- Rate limits: RPM and TPM are tracked per API key; exceeding them returns
429 rate_limit_error. - Request tracing: successful responses include an
x-request-id. Include it when reporting an issue.
In production
- Keep your API key in a server-side environment variable — never in frontend code or a mobile bundle.
- Retry
429,502, and503with exponential backoff, and log thex-request-id. - Handle error events on streaming calls too — don't just wait for the normal end-of-stream marker.
- Pass a stable end-user identifier (e.g.
safety_identifier, or Anthropic'smetadata.user_id) to help with safety and abuse investigations.
Next steps
- Quickstart — your first request in five minutes
- Authentication & API keys — create, store, and use keys correctly
- Billing, balance & usage — understand balance, usage, and cost
- Rate limits & retries — design client retries around the current gateway
- Integrations — Claude Code, Cursor, the OpenAI SDK, cURL