Documentation
A quickstart, every endpoint we serve, the platform around them and a page per integration. Every page exists in English and Italian, and the samples tagged as runnable are executed against the gateway by the test suite.
Get started
- Quickstart
Create an account, make an API key and send your first chat request to zdr.sh from cURL, Python or JavaScript.
API
- Chat completions
POST /v1/chat/completions: supported parameters, streaming, tools, reasoning and the response headers zdr.sh adds.
- Messages
The Anthropic Messages API at /v1/messages and /v1/messages/count_tokens, with thinking blocks and tool use.
- Responses
The stateless Responses API at /v1/responses and /v1/responses/input_tokens for clients that speak the OpenAI format.
- Embeddings
POST /v1/embeddings: the OpenAI Embeddings format, its input forms and limits, the vector dimensions and how the request is billed.
- Models
GET /v1/models lists every model id a key can use, with its context, prices and modalities, in the OpenAI or the Anthropic shape.
- Usage
GET /v1/usage returns the balance and the spend of the day for the key that asks, in the shape a client already reads.
- Web search
POST /v1/tools/search runs one to four web queries per call, billed per query answered, and GET says whether search is on.
- Web browse
POST /v1/tools/browse fetches a public https page and answers its readable text, free and capped per day.
- Versioning
What /v1 promises: which changes are breaking, how they are announced 30 days ahead, and the changelog a client can read before upgrading.
- MCP server
Point an MCP client at POST /mcp to search, read and write the memory vault bound to the key.
Platform
- Memory
Notes in markdown with wikilinks and tags, recall before each request and memory tools the model can call.
- Usage webhooks
Send each settled request to your own https endpoint, signed with a secret only you and zdr.sh hold, with retries and a delivery log.
- Optimizations
The per-key toggles for prompt caching, tool output trimming, whitespace and the response cache, with defaults.
- Limits
Per-key rate limits, account concurrency, the spend caps and the balance that pays for a request, with what a 402 and a 429 tell you.
- Billing
Prepaid credit bought in crypto, how a request is priced in EUR, the invoice information in the dashboard, and the 14-day withdrawal right.
- Zero retention
Every model route runs under a zero-retention agreement. Retention is not a setting, no prompt or answer is stored, and there is no trace system to opt out of.
- Errors
The error classes zdr.sh returns, their status codes, the shape they keep and how to retry each one.
- AI transparency
What every answer says about being AI-generated, which responses carry the marker, and who the AI Act asks for what.
Integrations
- opencode
Add zdr.sh to opencode as an OpenAI-compatible provider, with per-model limits and reasoning. Written for 1.18.34.
- DeepSeek Harness
Add zdr.sh to DeepSeek Harness as an OpenAI-compatible provider, with per-model reasoning efforts. Written for 0.2.2.
- Claude Code
Route Claude Code through zdr.sh with ANTHROPIC_BASE_URL and the model aliases. Written for 2.1.287.
- Hermes Agent
Connect Hermes Agent to zdr.sh with a named OpenAI-compatible provider. Written for 0.21.5.
- OpenAI SDK
Use the OpenAI SDKs against zdr.sh by changing the base URL. Written for openai 3.22.1 and 7.25.0.
- Anthropic SDK
Use the Anthropic SDKs against zdr.sh by changing the base URL. Written for anthropic 1.11.0 and 0.131.0.
- cURL
Every endpoint from the terminal: chat, messages, responses, models and usage with cURL and a duck- key.