devseek
Sign in Get API key

DOCS · v2

API reference

devseek speaks the OpenAI Chat Completions protocol. Any OpenAI SDK works once you change the base URL.

BASE URL

https://devseek.space/v1

AUTH

Authorization: Bearer dsk-…

MODEL

deepseek-v4.1-flash-free

224K tokens · 64K tokens

Quick start

OPENAI SDK · UNCHANGED
curl https://devseek.space/v1/chat/completions \
  -H "Authorization: Bearer $DEVSEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-free",
    "stream": true,
    "messages": [{"role": "user", "content": "Write a binary search in Rust"}]
  }'
OpenAI-compatible /v1/chat/completionsAPI reference

Endpoints

RouteWhat it doesNotes
GET /v1/modelsList modelsNeeds a key
POST /v1/chat/completionsChat, streaming or not, with toolsstream: true for SSE; a usage chunk comes last
GET /api/statusPublic status JSONNo key
GET /healthLivenessNo key

Limits

Input is limited to 224K tokens and output to 64K tokens. We estimate input size from the request bytes (about 3.3 bytes per token) before calling the model, so a request near the limit may be refused a little early.

Sessions and levels

A session is one chat completion request that has started and not yet finished. Your level sets how many sessions may run at once:

  1. 2ScriptL1–10Script
  2. 2–3FunctionL11–20Function
  3. 3–4ModuleL21–30Module
  4. 4–5PackageL31–40Package
  5. 5LibraryL41–50Library
  6. 6FrameworkL51–60Framework
  7. 6–7RuntimeL61–70Runtime
  8. 7–8CompilerL71–80Compiler
  9. 8–9KernelL81–90Kernel
  10. 9–10ArchitectL91–100Architect

Over your limit you get:

HTTP/1.1 429 Too Many Requests
Retry-After: 1
{"error":{"message":"Level 1 allows 3 concurrent sessions; 3 are already running. …",
 "type":"rate_limit_error","code":"session_limit_reached",
 "level":1,"session_limit":3,"sessions_in_use":3}}

Agents and editors

Any tool that accepts an OpenAI-compatible provider works. Use the base URL, your key and the model ID below. Keep parallel tool workers at or below your session limit.

Errors

Status / codeMeaningWhat to do
401 missing_api_key / invalid_api_keyMissing or wrong keySend Authorization: Bearer dsk-…
400 invalid_json / invalid_messagesMalformed body or messagesFix the request; do not retry as is
400 context_length_exceededInput over 224K tokensShorten or summarise the conversation
404 model_not_foundUnknown modelUse deepseek-v4.1-flash-free
413 body_too_largeBody over 4 MBSend less context
429 session_limit_reachedToo many concurrent sessionsWait for a request to finish, then retry
503 upstream_saturated / upstream_busydevseek or the model is at capacityRetry after the Retry-After header
502 upstream_errorThe model backend failedSafe to retry