OpenAI-compatible DeepSeek API Gateway. Drop-in replacement for OpenAI SDK.
base_url and api_key.
No SDK changes, no new libraries, no refactoring. Just point to our endpoint and use your gateway key.
All endpoints below are relative to this base URL.
| Model ID | Description | Plans |
|---|---|---|
deepseek-v4-flash | Fast, affordable chat model | All plans |
deepseek-v4-pro | Reasoning-heavy tasks, higher quality | All plans |
# curl
curl https://modelrelayapis.cc/v1/chat/completions \
-H"Authorization: Bearer YOUR_KEY" \
-H"Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello!"}],"max_tokens":100}'
from openai import OpenAI
client = OpenAI(
base_url="https://modelrelayapis.cc/v1",
api_key="YOUR_KEY",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role":"user","content":"Hello!"}],
max_tokens=100,
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://modelrelayapis.cc/v1",
apiKey: "YOUR_KEY",
});
const response = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello!" }],
max_tokens: 100,
});
console.log(response.choices[0].message.content);
curl https://modelrelayapis.cc/v1/models \
-H"Authorization: Bearer YOUR_KEY"
Returns only the models your plan has access to.
curl https://modelrelayapis.cc/v1/key/usage \
-H"Authorization: Bearer YOUR_KEY"
Returns your current budget usage, quota, rate limit, and plan details.
| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing API key | Check your key is correct and starts with sk-gateway- |
| 402 | API budget exhausted | Buy a new package to get a fresh key with budget |
| 403 | Key disabled or access denied | Check your key status, budget, or contact support. |
| 429 | Rate limit exceeded | Wait and retry. Trial/Starter/Pro: 30 RPM, Standard: 60 RPM |
| 502 | Upstream error | Service temporarily unavailable. Retry in 30 seconds. |
Set "stream": true in your request body. Works with all OpenAI SDK streaming methods. SSE format.