curl https://cheapseek.kdns.fr/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "deepseek-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": false
}'
Python with the OpenAI SDK: point base_url at the gateway:
from openai import OpenAI
client = OpenAI(api_key="<YOUR_API_KEY>", base_url="https://cheapseek.kdns.fr")
response = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Hello!"}],
stream=False
)
print(response.choices[0].message.content)
Pass your API key in the Authorization: Bearer <key> header; the Anthropic endpoints also accept x-api-key. Keys are created and revoked in the console. API calls only authenticate with an API key. The website's session cookie does not work for the API. Treat a key like a password.
You can sign up and log in with a random 16-digit account number (like Mullvad), no email or password. The number is shown exactly once, at creation: copy it or save it as a .txt file before you continue. It is stored only as a slow cryptographic hash, so nobody can recover it: not you, not support, not an admin. Lose it and the account is gone for good. Anyone who has the number owns the account, so keep it private. Logins with an account number are rate-limited per network and per number, and each attempt costs a memory-hard hash, so guessing is not practical.
You can also sign up with a username and password, or with an email and password, and log in with either. Usernames are 3 to 32 characters, lowercase, and may contain letters, numbers, dots, underscores and hyphens. Accounts created with a username never need an email address.
POST /v1/chat/completions: OpenAI-compatible. Works with openai, langchain, llama_index, and any client that speaks the OpenAI chat format. Supported parameters: model, messages, stream, max_tokens, temperature, top_p, stop, presence_penalty, frequency_penalty, response_format, tools/tool_choice (function calling), logprobs/top_logprobs. The upstream handles JSON output mode and tool calls.
// Node.js (streaming)
const r = await fetch("https://cheapseek.kdns.fr/v1/chat/completions", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: `Bearer ${KEY}` },
body: JSON.stringify({ model: "deepseek-v4-pro", messages: [{ role: "user", content: "Solve 2+2" }], stream: true })
});
const reader = r.body.getReader();
while (true) { const { done, value } = await reader.read(); if (done) break; process.stdout.write(new TextDecoder().decode(value)); }
POST /v1/responses: OpenAI Responses-format endpoint, for clients that use the newer API shape. Same models, same billing.
POST /files uploads an image once and returns a gateway file id (csfile-...) you reference later in chat requests with a {"type":"file","file_id":"..."} content block. Upload with multipart/form-data: field file (the image, up to 64 MiB) and purpose (must be user_data); optionally expires_after[anchor]=created_at with expires_after[seconds] between 3600 and 2592000, or omit both to keep the file permanently. Formats: JPEG, PNG, GIF, WebP. Also available: GET /files (list; after, limit 1–1000, order, purpose), GET /files/{id}, and DELETE /files/{id}. The Anthropic-shaped equivalents live under /anthropic/v1/files and require the anthropic-beta: files-api-2025-04-14 header.
Every file is owned by the account that uploaded it. The gateway stores your bytes locally and issues its own ids; the upstream DeepSeek ids exist only inside the gateway and are never exposed. Your file can only be listed, retrieved, deleted or referenced in chat by your API keys — a file id from another account is rejected before the request ever touches the shared upstream accounts, so files cannot leak across users. Upstream copies are re-created from the gateway's local store on whichever pool key serves your requests, and deletes/expiry remove them from every key.
Uploads are free (no billing), but the account must have a positive balance to start an upload — the check happens before the upload body is read, so an unfunded account cannot stream large bodies into the gateway. Each account can store up to 25 files and 512 MiB.
Bandwidth tip: an external URL image costs almost no gateway traffic (DeepSeek downloads it directly), and the Files API transfers an image through the gateway only once instead of on every request.
Bandwidth tip: an external URL image costs almost no gateway traffic (DeepSeek downloads it directly), and the Files API transfers an image through the gateway only once instead of on every request.
POST /anthropic/v1/messages and POST /anthropic/v1/messages/count_tokens: drop-in for the Anthropic Messages API (system, messages, max_tokens, stream). Use x-api-key or Authorization: Bearer.
| Model | Legacy names | Context | Max output | Vision |
|---|---|---|---|---|
| deepseek-flash | deepseek-v4-flash, deepseek-v4-flash-vision-exp, deepseek-chat (thinking off), deepseek-reasoner (thinking on) | 1,000,000 tokens | 384,000 tokens | Yes |
| deepseek-v4-pro | None | 1,000,000 tokens | 384,000 tokens | No |
Model names are case-insensitive: deepseek-flash is the current model, and the official upstream name deepseek-v4.1-flash is accepted in any casing. GET /v1/models lists the available models. Prices are 25% of DeepSeek's official list prices. See the Pricing page.
Context caching works like the upstream: the same prompt prefix is billed at the lower cache-hit price, automatically. Your traffic normally stays on one upstream key, so the cache persists between requests. If you are ever moved to a different key (a key runs out of balance or is rate limited), the cache does not move with you, and the first requests on the new key would bill the whole prefix as a cache miss. cheapseek covers that automatically: cache misses are paid from an allowance funded by cache-hit tokens you already paid for, starting at your last 5 requests' combined cache hits and growing only with new paid cache-hit usage. The allowance is capped at 1.5M tokens, lasts a few minutes (window follows how often you call, 5 minutes minimum, 30 maximum), and ends when either the token budget or the time runs out. It can only ever reimburse tokens you actually paid for, so it cannot be farmed.
Inference endpoints have no request-count throttle at all: no per-account concurrency cap and no requests-per-minute quota. A valid API key with a positive balance is never rate-limited by us, no matter how many concurrent requests you run.
Small-balance protection. Requests need a positive balance to start. If your balance cannot cover a request's worst case, the gateway caps that request's output budget (max output tokens, including thinking budget) so the worst case never exceeds your balance plus a $0.01 overdraft allowance. You can always spend your balance down to zero, and no request can ever settle your balance more than $0.01 below zero.
Console actions (tickets, refund requests, exports, orders, logins) are rate-limited to stop spam; normal use never hits those limits.
| Status | Meaning |
|---|---|
| 401 | Invalid or missing API key. |
| 402 | Insufficient balance. Top up on the Top up page. |
| 400 | Malformed request, unsupported parameter, unknown model, or invalid values. |
| 413 | Request body too large (48 MiB inline, matching upstream; Files API uploads allow 64 MiB files). |
| 429 | Optional spend limit reached (the hourly / daily / weekly maximum spend you set on the Usage page). Resets automatically. |
| 500 | Internal error on our side. Retry. |
| 501 | Endpoint not implemented. |
| 502 | Upstream returned an invalid response. Retry. |
| 503 | Upstream pool unavailable: every pool key throttled, upstream down, or a connection problem on our side. Retry shortly. |
Error details are relayed verbatim. When DeepSeek rejects a request (malformed body, unknown parameter, invalid values), you receive its real HTTP status and its full error message, type, code and param fields in the native wire format of the endpoint you called (OpenAI {"error":{...}} or Anthropic {"type":"error","error":{...}}), so SDKs and harnesses parse it directly. Failures of our own connection or infrastructure are never exposed: those surface only as the generic 503 above, with the details kept in our server logs.
Open a ticket from the Support page in the console; we answer in the same thread. Billing questions and refund requests (crypto only, reviewed manually) go there too.