DeepSeek-V4.io

API Documentation

One paid API key, three inference protocols, and one public model: deepseek-v4-flash.

Quick start

Send a Chat Completions request
Store the key on your server or in an environment variable. Never put it in browser code.
from openai import OpenAI

client = OpenAI(
    base_url="https://deepseek-v4.io/api/v1",
    api_key="your-deepseek-v4-io-key",
)

response = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)

Authentication

Pass the key as a Bearer token:

Authorization: Bearer sk-your-deepseek-v4-io-key

API keys are available only to paid DeepSeek-V4.io accounts. Free signup balance cannot create a key.

Endpoints

GET
/api/v1/models
List the public model catalog.
POST
/api/v1/chat/completions
OpenAI-compatible chat, SSE, and tools.
POST
/api/v1/responses
Responses API for Codex and agent tool loops.
POST
/api/v1/messages
Anthropic Messages-compatible API for Claude Code.
Streaming

Set stream: true. The endpoint returns text/event-stream and preserves the selected protocol's event format.

The gateway continues reading final usage for settlement if the client disconnects early.

Tools

Send the protocol's standard tools/functions and return tool results using the same protocol.

Provider-routing fields, fallback model arrays, plugins, and upstream credentials are not accepted.

Errors and limits

StatusMeaning
400Invalid body, model, or output limit.
401/403Missing, invalid, expired, or unauthorized key.
402Insufficient DeepSeek-V4.io token balance.
429API key rate limit exceeded.
5xxGateway or model provider failure.

Maximum request body: 2 MiB. Maximum requested output: 65,536 tokens. Use the X-Request-ID response header when contacting support.

Service disclosure

DeepSeek-V4.io is an independent service, not the official DeepSeek website. It uses third-party inference infrastructure. DeepSeek Platform and OpenRouter keys or balances are not interchangeable with a DeepSeek-V4.io key or balance.