Everything you need to use the DeepSeek API Gateway — from purchase to integration.
This is an independent third-party API gateway that provides OpenAI-compatible access to DeepSeek models. It is not an official DeepSeek service. You purchase an API budget, get your own API key, and call DeepSeek models through our endpoint.
Go to Pricing and choose a plan (Trial, Starter, Standard, or Pro).
Enter your email address on the checkout page.
Pay with PayPal. The amount is in USD.
After successful payment, your API key appears automatically on the page.
Copy and save your API key now. If you close this page, you may need your Order ID and email to check it later. You can also check your order status at Check Order.
Use the standard openai package:
from openai import OpenAI
client = OpenAI(
base_url="https://modelrelayapis.cc/v1",
api_key="sk-gateway-YOUR-KEY",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello!"}],
max_tokens=500,
)
print(response.choices[0].message.content)
Streaming works too:
stream = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
curl https://modelrelayapis.cc/v1/chat/completions \
-H "Authorization: Bearer sk-gateway-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello"}],"max_tokens":100}'
| Model | Description | Available In |
|---|---|---|
deepseek-v4-flash | Fast, cost-effective chat model | Trial / Starter / Standard / Pro |
deepseek-v4-pro | Higher capability for complex tasks | Pro only |
Calling a model your plan does not support returns HTTP 403.
Go to Dashboard, enter your sk-gateway-xxx key, and click Check Usage. You will see:
You are not billed by simple "total tokens". Instead, each request deducts from your API budget based on real DeepSeek token pricing:
Pro model (deepseek-v4-pro) costs more per token. When your remaining budget reaches $0, your key becomes exhausted and further requests return HTTP 402. Buy a new package to continue.
https://modelrelayapis.cc/v1sk-gateway-xxx key.deepseek-v4-flash (or deepseek-v4-pro if you have Pro).| Code | Meaning | What to Do |
|---|---|---|
401 | Invalid or missing API key | Check your key is correct and starts with sk-gateway-. |
402 | API budget exhausted | Your budget is used up. Buy a new package. |
403 | Model not allowed | Your plan does not support this model. Upgrade to Pro for deepseek-v4-pro. |
429 | Rate limit exceeded | Slow down. Trial/Starter/Pro: 30 RPM. Standard: 60 RPM. |
500/502 | Server error | Temporary issue. Retry. If persistent, contact support. |
从购买到接入,使用 DeepSeek API 网关所需的一切。
这是一个独立第三方 API 网关,提供 OpenAI 兼容格式的 DeepSeek 模型接入。并非 DeepSeek 官方服务。你购买 API 预算额度,获取自己的 API key,通过我们的端点调用 DeepSeek 模型。
打开 套餐页面,选择套餐(试用 / 入门 / 标准 / 专业)。
在结账页输入你的邮箱地址。
使用 PayPal 付款,金额为美元。
付款成功后,API key 会自动显示在页面上。
复制并妥善保存你的 key。也可以稍后在 订单查询 页面查看。
使用标准的 openai 包:
from openai import OpenAI
client = OpenAI(
base_url="https://modelrelayapis.cc/v1",
api_key="sk-gateway-YOUR-KEY",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "你好"}],
max_tokens=500,
)
print(response.choices[0].message.content)
流式输出同样支持:
stream = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "讲个故事"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
curl https://modelrelayapis.cc/v1/chat/completions \
-H "Authorization: Bearer sk-gateway-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"你好"}],"max_tokens":100}'
| 模型 | 说明 | 可用套餐 |
|---|---|---|
deepseek-v4-flash | 快速、高性价比对话模型 | 试用 / 入门 / 标准 / 专业 |
deepseek-v4-pro | 更强能力,适合复杂任务 | 仅专业版 |
调用套餐不支持的模型会返回 HTTP 403。
打开 用量查询,输入你的 sk-gateway-xxx key,点击 Check Usage。可以看到:
不是简单地按"总 token 数"扣费。每次请求按 DeepSeek 真实 token 价格从你的预算中扣除:
Pro 模型(deepseek-v4-pro)每 token 更贵。当剩余预算降至 $0,你的 key 变为"已耗尽",后续请求返回 HTTP 402。购买新套餐即可继续使用。
https://modelrelayapis.cc/v1sk-gateway-xxx key。deepseek-v4-flash(专业版用户可填 deepseek-v4-pro)。| 状态码 | 含义 | 怎么办 |
|---|---|---|
401 | API key 无效或缺失 | 检查 key 是否正确,是否以 sk-gateway- 开头。 |
402 | API 预算已耗尽 | 余额用完,请购买新套餐。 |
403 | 套餐不支持该模型 | 你的套餐不允许使用此模型。升级到专业版可用 deepseek-v4-pro。 |
429 | 请求频率超限 | 请降低请求速度。试用/入门/专业:30 RPM,标准:60 RPM。 |
500/502 | 服务器错误 | 临时故障,请重试。持续出现请联系管理员。 |