API reference

Three wire formats, one key, one base URL: https://api.turboprivate.ai.

Authentication

Authorization: Bearer tp_live_…
# or, for clients that send an API key header
x-api-key: tp_live_…

Keys are created and revoked in the app. Revoking takes effect immediately, including for any short-lived token that key has issued.

Short-lived tokens

curl -X POST https://api.turboprivate.ai/v1/token -H "Authorization: Bearer tp_live_…"
# -> { "token": "tps_…", "expires_at": … }  valid for one hour

Useful when a credential has to sit in a config file. The CLI wires this into Claude Code's apiKeyHelper automatically, so a stolen settings file is worthless within the hour.

Endpoints

methodpathformat
POST/v1/messagesAnthropic Messages, streaming or not
POST/v1/messages/count_tokenstoken estimate
POST/v1/responsesOpenAI Responses
POST/v1/chat/completionsOpenAI Chat Completions
GET/v1/modelswhat we serve, with prices and context

A first request

curl https://api.turboprivate.ai/v1/chat/completions \
  -H "Authorization: Bearer $TURBOPRIVATE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"ds-flash","messages":[{"role":"user","content":"hi"}]}'

Behaviour worth knowing