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 | URL |
|---|---|
| OpenAI-compatible | https://api.crossmodel.ai/v1 |
| Anthropic-compatible | https://api.crossmodel.ai/v1/messages |
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