Call DeepSeek, Qwen and GLM with one OpenAI-compatible API key
Published · Updated
Each model vendor usually has its own console, its own billing and its own key. Trying DeepSeek, Qwen and GLM on the same task can mean three sign-ups, three top-ups and three sets of rate limits to keep track of.
One endpoint, one key
ModelSite exposes an OpenAI-compatible endpoint at https://api.modelsite.ai/v1. You authenticate with a single key (it starts with sk-ms-) in the Authorization: Bearer header and choose the model with the model field. Nothing else about the request changes.
Try it with curl
curl https://api.modelsite.ai/v1/chat/completions \
-H "Authorization: Bearer $MODELSITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash-1017",
"messages": [{"role": "user", "content": "Explain TCP slow start in two sentences."}]
}'Switch models by changing one string
With the official OpenAI Python SDK, point base_url at ModelSite and loop over model names. The request and response format is the same for every model, so parsing and error handling stay as they are.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MODELSITE_API_KEY"],
base_url="https://api.modelsite.ai/v1",
)
for model in ["deepseek-v4.1-flash-1017", "qwen3.7-max", "glm-5.3-flash"]:
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Explain TCP slow start in two sentences."}],
)
print(model, "->", resp.choices[0].message.content)What each of these costs
| Model | Input | Output | Cache read | Context |
|---|---|---|---|---|
| DeepSeek V4.1 Flash 1017 | $0.128 | $0.51 | $0.00255 | 1M |
| Qwen3.7-Max | $1.518 | $4.554 | $0.304 | 1M |
| GLM-5.3-Flash | $0.072 | $0.25 | $0.021 | 1M |
Prices are per million tokens and are read live from the catalog. Each model name links to its page with context length, cache pricing and any time-window discounts.
Already using the Anthropic SDK?
There is also an Anthropic-compatible endpoint. The SDK guide lists the base URL and the authentication difference.