---
title: Introduction
description: Where to start with the CrossModel API — endpoints, protocol choices, and core concepts.
---

# 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.

<Callout type="tip">
  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.
</Callout>

## Pick your path

| Your situation | Where to start | Notes |
|------|------|------|
| Already on OpenAI Chat Completions | [Quickstart](/docs/quickstart) | Swap `base_url` for CrossModel and use the `vendor/model` ID format. |
| New project, want an OpenAI-compatible API | [/v1/chat/completions](/docs/api-reference/chat) | The most mature ecosystem — chat, tool calls, multimodal input, streaming. |
| Prefer the OpenAI Responses style | [/v1/responses](/docs/api-reference/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](/docs/api-reference/messages) | The Anthropic Messages protocol; auth prefers `x-api-key`. |
| Need to discover models dynamically | [/v1/models](/docs/api-reference/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 use `Authorization: Bearer`; Anthropic-compatible endpoints can use `x-api-key`.
- **Model IDs**: CrossModel uses the `vendor/model` format, e.g. `deepseek/deepseek-v4-pro` or `anthropic/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

1. Keep your API key in a server-side environment variable — never in frontend code or a mobile bundle.
2. Retry `429`, `502`, and `503` with exponential backoff, and log the `x-request-id`.
3. Handle error events on streaming calls too — don't just wait for the normal end-of-stream marker.
4. Pass a stable end-user identifier (e.g. `safety_identifier`, or Anthropic's `metadata.user_id`) to help with safety and abuse investigations.

## Next steps

- [Quickstart](/docs/quickstart) — your first request in five minutes
- [Authentication & API keys](/docs/authentication) — create, store, and use keys correctly
- [Billing, balance & usage](/docs/billing) — understand balance, usage, and cost
- [Rate limits & retries](/docs/rate-limits) — design client retries around the current gateway
- [Integrations](/integrations) — Claude Code, Cursor, the OpenAI SDK, cURL
