# Build your first request

> Part of the ChinaAPI documentation. HTML: https://dash.chinaapi.ai/docs/

Reach DeepSeek, Qwen, GLM, Kimi, Doubao and more through one OpenAI-compatible gateway. Use Console Quickstart when you want a personalised, testable setup.

**Base URL**: `https://api.chinaapi.ai/v1`

One address for every protocol below. Point your SDK at it and keep the rest of your code.

**Authentication**: `Authorization: Bearer $CHINAAPI_KEY`

Bearer token. These pages only ever show the `$CHINAAPI_KEY` placeholder — create the real key in the console and keep it out of your source.

**Where model IDs come from**: `deepseek-chat`

Model IDs are the ones published in the catalogue. Copy the exact string from the [Models](/models) page; never guess it from a vendor's own naming.

**curl**

```
curl https://api.chinaapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $CHINAAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

**Python**

```
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["CHINAAPI_KEY"],
    base_url="https://api.chinaapi.ai/v1",
)

result = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello"}],
)
```

**TypeScript**

```
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CHINAAPI_KEY,
  baseURL: "https://api.chinaapi.ai/v1",
});

const result = await client.chat.completions.create({
  model: "deepseek-chat",
  messages: [{ role: "user", content: "Hello" }],
});
```

- [SDKs](/docs/llm-integration.md): Keep your OpenAI, Anthropic or Gemini client and change the base URL.
- [Coding agents](/docs/coding-agents.md): Claude Code, Codex and other agents, with the endpoint each one expects.
- [Third-party integrations](/docs/multimodal.md): Image, speech, video and retrieval tools that speak the same protocols.
- [API reference](/docs/api/index.md): Every endpoint, its parameters and its responses.
