Base URL
https://modelrelayapis.cc/v1
Available Models
deepseek-v4-flash? Fast, affordable (Trial / Starter / Standard / Pro)deepseek-v4-pro? Higher quality (all plans)
Setup Steps
- In Dify, go to Settings ? Model Providers.
- Add a new OpenAI-API-compatible provider.
- Set API Base URL to
https://modelrelayapis.cc/v1. - Enter your sk-gateway API Key.
- Add model name:
deepseek-v4-flash(ordeepseek-v4-pro— available on all plans). - Save and use in your Dify apps.
Python Example
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, how are you?"}]
)
print(response.choices[0].message.content)
Quick curl Test
curl https://modelrelayapis.cc/v1/chat/completions -H"Content-Type: application/json" -H"Authorization: Bearer sk-gateway-YOUR-KEY" -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello"}]}'
Common Errors
| HTTP | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 402 | API budget exhausted ? buy a new package |
| 403 | Access denied. Check key status or rate limit. |
| 429 | Rate limit exceeded |
| 500/502 | Gateway error ? try again or contact support |
Get Your DeepSeek API Key ? From $0.99
Instant key delivery after PayPal payment. Check your usage anytime on the Dashboard.
View Plans & Buy