← Back to Home← 返回首页

Documentation

Everything you need to use the DeepSeek API Gateway — from purchase to integration.

1. What Is This?

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.

2. How to Buy

1

Go to Pricing and choose a plan (Trial, Starter, Standard, or Pro).

2

Enter your email address on the checkout page.

3

Pay with PayPal. The amount is in USD.

4

After successful payment, your API key appears automatically on the page.

5

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.

3. Python Quick Start

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="")

4. curl Example

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}'

5. Supported Models

ModelDescriptionAvailable In
deepseek-v4-flashFast, cost-effective chat modelTrial / Starter / Standard / Pro
deepseek-v4-proHigher capability for complex tasksPro only

Calling a model your plan does not support returns HTTP 403.

6. Check Your Balance

Go to Dashboard, enter your sk-gateway-xxx key, and click Check Usage. You will see:

7. How Billing Works

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.

8. SillyTavern Setup

  1. Open SillyTavern, go to API Connections.
  2. Select OpenAI Compatible as the API type.
  3. Set Base URL to: https://modelrelayapis.cc/v1
  4. Set API Key to your sk-gateway-xxx key.
  5. Set Model to deepseek-v4-flash (or deepseek-v4-pro if you have Pro).
  6. Save and test the connection.

9. Common Errors

CodeMeaningWhat to Do
401Invalid or missing API keyCheck your key is correct and starts with sk-gateway-.
402API budget exhaustedYour budget is used up. Buy a new package.
403Model not allowedYour plan does not support this model. Upgrade to Pro for deepseek-v4-pro.
429Rate limit exceededSlow down. Trial/Starter/Pro: 30 RPM. Standard: 60 RPM.
500/502Server errorTemporary issue. Retry. If persistent, contact support.
Disclaimer
This is an independent third-party API gateway. Not affiliated with or officially endorsed by DeepSeek.
Payments are processed by PayPal. Prices may change. Do not share your API key.

使用说明

从购买到接入,使用 DeepSeek API 网关所需的一切。

1. 这是什么?

这是一个独立第三方 API 网关,提供 OpenAI 兼容格式的 DeepSeek 模型接入。并非 DeepSeek 官方服务。你购买 API 预算额度,获取自己的 API key,通过我们的端点调用 DeepSeek 模型。

2. 怎么购买

1

打开 套餐页面,选择套餐(试用 / 入门 / 标准 / 专业)。

2

在结账页输入你的邮箱地址。

3

使用 PayPal 付款,金额为美元。

4

付款成功后,API key 会自动显示在页面上。

5

复制并妥善保存你的 key。也可以稍后在 订单查询 页面查看。

3. Python 快速接入

使用标准的 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="")

4. curl 示例

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}'

5. 支持模型

模型说明可用套餐
deepseek-v4-flash快速、高性价比对话模型试用 / 入门 / 标准 / 专业
deepseek-v4-pro更强能力,适合复杂任务仅专业版

调用套餐不支持的模型会返回 HTTP 403。

6. 如何查看余额

打开 用量查询,输入你的 sk-gateway-xxx key,点击 Check Usage。可以看到:

7. 余额怎么扣

不是简单地按"总 token 数"扣费。每次请求按 DeepSeek 真实 token 价格从你的预算中扣除:

Pro 模型(deepseek-v4-pro)每 token 更贵。当剩余预算降至 $0,你的 key 变为"已耗尽",后续请求返回 HTTP 402。购买新套餐即可继续使用。

8. SillyTavern 酒馆接入

  1. 打开 SillyTavern,进入API 连接设置。
  2. API 类型选择 OpenAI Compatible
  3. Base URL 填:https://modelrelayapis.cc/v1
  4. API Key 填你的 sk-gateway-xxx key。
  5. Modeldeepseek-v4-flash(专业版用户可填 deepseek-v4-pro)。
  6. 保存并测试连接。

9. 常见错误

状态码含义怎么办
401API key 无效或缺失检查 key 是否正确,是否以 sk-gateway- 开头。
402API 预算已耗尽余额用完,请购买新套餐。
403套餐不支持该模型你的套餐不允许使用此模型。升级到专业版可用 deepseek-v4-pro
429请求频率超限请降低请求速度。试用/入门/专业:30 RPM,标准:60 RPM。
500/502服务器错误临时故障,请重试。持续出现请联系管理员。
免责声明
这是独立第三方 API 网关,与 DeepSeek 无关联,非 DeepSeek 官方服务。
付款由 PayPal 处理。价格可能变动。请勿分享你的 API key。