API Documentation

OpenAI-compatible DeepSeek API Gateway. Drop-in replacement for OpenAI SDK.

If your app already supports the OpenAI SDK or an OpenAI-compatible endpoint, you only need to change base_url and api_key. No SDK changes, no new libraries, no refactoring. Just point to our endpoint and use your gateway key.

Base URL

https://modelrelayapis.cc/v1

All endpoints below are relative to this base URL.

Available Models

Model IDDescriptionPlans
deepseek-v4-flashFast, affordable chat modelAll plans
deepseek-v4-proReasoning-heavy tasks, higher qualityAll plans

Chat Completions

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

Python (OpenAI SDK)

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)

Node.js

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);

List Models

curl https://modelrelayapis.cc/v1/models \
  -H"Authorization: Bearer YOUR_KEY"

Returns only the models your plan has access to.

Key Usage

curl https://modelrelayapis.cc/v1/key/usage \
  -H"Authorization: Bearer YOUR_KEY"

Returns your current budget usage, quota, rate limit, and plan details.

Error Codes

CodeMeaningAction
401Invalid or missing API keyCheck your key is correct and starts with sk-gateway-
402API budget exhaustedBuy a new package to get a fresh key with budget
403Key disabled or access deniedCheck your key status, budget, or contact support.
429Rate limit exceededWait and retry. Trial/Starter/Pro: 30 RPM, Standard: 60 RPM
502Upstream errorService temporarily unavailable. Retry in 30 seconds.

Streaming

Set "stream": true in your request body. Works with all OpenAI SDK streaming methods. SSE format.

Note — This is an independent third-party gateway, not an official DeepSeek service. PayPal instant checkout. Get your key immediately after payment.
View Plans & Pricing
Independent third-party API gateway. Not affiliated with DeepSeek. Payments processed by PayPal.