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 tasksAll plans

All plans include both flash and pro models.

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 prefer higher capability; pro costs more per token).
  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.
403Budget exhaustedYour API budget is exhausted. Please buy a new package to continue.
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.
Independent third-party API gateway. Not affiliated with DeepSeek. Payments processed by PayPal.