Claude Code & Cursor
Any tool that lets you set a base URL can run on the exchange — with routing policy baked into the URL.
Claude Code
Claude Code speaks the Anthropic Messages API, which the exchange serves at /anthropic.
export ANTHROPIC_BASE_URL="http://localhost:8787/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-thin-…"
export ANTHROPIC_MODEL="deepseek/deepseek-v4.1-flash"
claudeClaude Code also requests model names of its own (for example claude-… names for background tasks). Give the key a model map so those names resolve to exchange models:
{ "claude-*": "deepseek/deepseek-v4.1-flash" }POST /anthropic/v1/messages/count_tokens is supported, and both Authorization: Bearer and x-api-key auth work.
Cursor and other OpenAI-compatible tools
Set the OpenAI base URL override to http://localhost:8787/v1, paste your sk-thin-… key, and add the exchange model ids you want to use as custom models.
Policy in the URL
Tools rarely let you add headers or body fields. The policy path puts routing controls in the base URL instead:
http://localhost:8787/p/min60+zdr+eu/v1 # OpenAI clients
http://localhost:8787/p/min60+zdr+eu/anthropic # Claude CodeFails closed
An unknown token in the policy path returns 400 invalid_request. A typo can never silently route you somewhere you didn't intend. See the full token list in Routing policy.