How to Use DeepSeek API with Open WebUI

Open WebUI ?? DeepSeek API ??

Open WebUI is a self-hosted web interface for LLMs. Point it to our DeepSeek API Gateway for OpenAI-compatible access with per-key quota tracking.

Third-party API gateway. Not affiliated with or endorsed by DeepSeek. Not an official DeepSeek service.

Base URL

https://modelrelayapis.cc/v1

Available Models

Setup Steps

  1. In Open WebUI, go to Admin Panel ? Settings ? Connections.
  2. Set OpenAI API Base URL to https://modelrelayapis.cc/v1.
  3. Enter your sk-gateway API Key.
  4. Add model: deepseek-v4-flash (or deepseek-v4-pro for Pro plan).
  5. Save and refresh the model list.

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

HTTPMeaning
401Invalid or missing API key
402API budget exhausted ? buy a new package
403Model not allowed for your plan
429Rate limit exceeded
500/502Gateway error ? try again or contact support

Get Your DeepSeek API Key ? From $1

Instant key delivery after PayPal payment. Check your usage anytime on the Dashboard.

View Plans & Buy