Quickstart
This page walks you through your first request on the OpenAI-compatible endpoint. If you already have an OpenAI SDK project, you usually just swap the base_url, API key, and model ID.
1. Get an API key
Sign in to the console and create a key on the API Keys page. Keys start with cm-.
An API key is shown only once, at creation. Store it somewhere safe — if you lose it, you'll have to generate a new one.
Keep the key in a server-side environment variable:
export CROSSMODEL_API_KEY="cm-YOUR_KEY"2. Send your first request
curl https://api.crossmodel.ai/v1/chat/completions \
-H "Authorization: Bearer $CROSSMODEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4-pro",
"messages": [{ "role": "user", "content": "Hello" }]
}'3. Use the OpenAI SDK
Install the SDK:
pip install openaiimport os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["CROSSMODEL_API_KEY"],
base_url="https://api.crossmodel.ai/v1",
)
response = client.chat.completions.create(
model="deepseek/deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)TypeScript:
npm install openaiimport OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CROSSMODEL_API_KEY,
baseURL: "https://api.crossmodel.ai/v1",
});
const completion = await client.chat.completions.create({
model: "deepseek/deepseek-v4-pro",
messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);4. Choose a model
CrossModel model IDs use the vendor/model format, for example:
| Tier | Example model ID | Good for |
|---|---|---|
| Cost-efficient | deepseek/deepseek-v4-flash | High-volume Q&A, summarization, classification. |
| Heavy lifting | deepseek/deepseek-v4-pro | Complex reasoning, code, long-running tasks. |
| Anthropic ecosystem | anthropic/claude-sonnet-4.6 | Claude Code, tool calling, long-context work. |
See the full list in the model catalog — every model supports OpenAI-compatible calls.
5. Where to go next
- Using the Anthropic SDK: read /v1/messages.
- Want streaming: read Streaming.
- Need function calling: read Function calling & tools.
- Curious about charges: read Billing, balance & usage.