How to Use DeepSeek API with SillyTavern

OpenAI-compatible endpoint setup — plug in and chat.

Third-Party Gateway

SillyTavern supports any OpenAI-compatible API endpoint. Here is how to connect your DeepSeek API key — step by step.

Step 1

Open API Connections

  1. Click the plug icon (API Connections) in the top bar.
  2. Select Chat Completion from the API dropdown.
  3. Choose OpenAI as the API type (or "Custom" / "OpenAI-compatible" depending on your version).
Step 2

Configure the Endpoint

Fill in these fields exactly:

SettingValue
API Base URLhttps://modelrelayapis.cc/v1
API Keysk-gateway-xxxxxxxx...
Modeldeepseek-v4-flash
StreamingEnabled ✓

Important: The base URL must end with /v1. SillyTavern appends /chat/completions automatically.

Step 3

Set the Model Name

Use exactly: deepseek-v4-flash

Do not add prefixes like openai/ or text-. Just the bare model ID.

Available models on this gateway:

Step 4

Test the Connection

Click Connect or send a test message in your chat. If everything is configured correctly, you should get a response within seconds.

Common Errors and Fixes

Error

401 Unauthorized

Problem: Invalid or missing API key.

Fix: Check that your sk-gateway-... key is copied correctly — no extra spaces, no missing characters.

Error

404 Not Found

Problem: The path does not exist.

Fix: Make sure your Base URL ends with /v1. SillyTavern calls /v1/chat/completions.

Error

402 Payment Required

Problem: Your API budget is exhausted.

Fix: Buy a new package to get a fresh key with budget.

Error

429 Too Many Requests

Problem: Exceeded rate limit (30 or 60 RPM depending on plan).

Fix: Wait 60 seconds and try again. Reduce auto-retry frequency in SillyTavern settings.

Error

5xx Server Error

Problem: Gateway or upstream DeepSeek service temporarily unavailable.

Fix: Wait 1-2 minutes and retry.

Streaming & Reasoning

Note

Streaming

Streaming (SSE) is fully supported. Characters appear token-by-token. Make sure the Streaming toggle is enabled in your API connection settings.

Note

Reasoning Content

This gateway filters reasoning_content by default. You only receive the final content field — exactly what SillyTavern expects. No stray thinking tokens in your character replies.

Need an API Key?

Buy a package and get your API key instantly after PayPal payment.

This is a third-party API gateway. Not affiliated with DeepSeek. OpenAI-compatible endpoint.

View Plans & Buy
Independent third-party API gateway. Not affiliated with DeepSeek. Payments processed by PayPal.