---
title: Quickstart
description: Make your first model request with a CrossModel API key and the OpenAI SDK.
---

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

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

Keep the key in a server-side environment variable:

```bash
export CROSSMODEL_API_KEY="cm-YOUR_KEY"
```

## 2. Send your first request

```bash
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:

```bash
pip install openai
```

```python
import 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:

```bash
npm install openai
```

```ts
import 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. |

<Callout type="info">
  See the full list in the [model catalog](/models) — every model supports OpenAI-compatible calls.
</Callout>

## 5. Where to go next

- Using the Anthropic SDK: read [/v1/messages](/docs/api-reference/messages).
- Want streaming: read [Streaming](/docs/guides/streaming).
- Need function calling: read [Function calling & tools](/docs/guides/tool-calling).
- Curious about charges: read [Billing, balance & usage](/docs/billing).
