API documentation

OpenAI-compatible chat completions. Technical description of how the service behaves; it is not a service-level commitment.

Quick start

Base address https://api.privatedeskai.com/v1. Get a key on the account page and send it as a bearer token.

curl https://api.privatedeskai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V4-Flash-0731","messages":[{"role":"user","content":"Hello"}]}'

Streaming (server-sent events) - add "stream": true and read lines starting with data: until data: [DONE]:

curl -N https://api.privatedeskai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"model":"deepseek-ai/DeepSeek-V4-Flash-0731","stream":true,"stream_options":{"include_usage":true},"messages":[{"role":"user","content":"Hello"}]}'

With the OpenAI SDKs set base_url to the address above and use your key.

Models

GET /v1/models lists them: deepseek-ai/DeepSeek-V4-Flash-0731 and the fast-mode alias deepseek-v4-flash-fast. Context window 400,000 tokens, output up to 16,000 tokens (see /models).

Limits

Technical limits, not promises: a limit on request rate per address, a limit on concurrent streams per key, a limit on request body size. Exceeding the rate or stream limit returns 429 with a Retry-After header; a body that is too large returns 413.

Errors

Errors use the OpenAI format {"error":{"message","type","code","param"}}; every response carries X-Request-ID.

StatusWhenError code (examples)
400the request cannot be answered: invalid JSON, wrong type, a value out of range (temperature, top_p, max_tokens), a missing field, n above 1invalid_json, invalid_type, invalid_value, missing_required_parameter
401the key is wrong; the response carries WWW-Authenticateinvalid_api_key
402no key and the request asks for payment by the x402 protocol (agents that pay per request)x402 payment requirements
404unknown modelmodel_not_found
413request body too largerequest_too_large
429rate or concurrent-stream limit; wait for Retry-Afterrate_limit_exceeded
502, 503no provider could answer (all failed or the answer was unusable); X-Request-ID identifies the request, Retry-After may be presentupstream_error, all_providers_unavailable

What a stream does when something goes wrong

Billing, in plain words

Tariffs

Standard: requests go to Gonka network providers in priority order; behind them stands an insurance provider outside the Gonka network. Super Deal - economical tariff, depends on the Gonka network, no insurance outside Gonka: Gonka providers only.

Prices are on the pricing page.

Parameter support is described on the compatibility page; measured results are on benchmarks.