Documentation
A quickstart, every endpoint we serve, and a page for each integration. The three steps below get a request through; the catalog has the rest.
Start here
An account and a key, the base URL, then one request. The quickstart has the detail behind each step.
Base URL
- OpenAI format
- https://api.zdr.sh/v1
- Anthropic format
- https://api.zdr.sh
The same request through the SDK you already have: OpenAI SDK Anthropic SDK
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's account, in the shape a client already reads.
- Web search
POST /v1/tools/search runs one to four web queries per call, free while the platform runs its own search engine, 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 dated entries 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.
- Notifications
The in-app notices, the twelve kinds, the per-kind email switches in Settings and why four security kinds cannot be turned off.
- 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.
- Account security
The three ways to sign in, the second factors you can add, the one proof a sensitive action asks for, and what support never asks you for.
- Billing
Prepaid credit bought in crypto and how a request is priced in EUR: the balance, the top-ups and the figures the platform enforces.
- Zero retention
Which serving tier is zero retention: the partner-route agreement, the transient rented-GPU tier, and how to restrict a key to zero-retention routes.
- Security
Encryption in transit and at rest, API key custody, cache lifetime, agent disk erasure and how to report a vulnerability.
- 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 zdr- key.