La documentation est disponible en anglais.
Documentation / Anthropic-compatible
Headers & extensions
The Anthropic surface honours the same X-Tokensaver-* extension headers and tokensaver body object as /openai/v1, so you can tune the pipeline from any Anthropic client.
Authentication headers
x-api-key: ts_…— TokenSaver key (Claude CodeANTHROPIC_API_KEY)Authorization: Bearer ts_…— alternative (Claude CodeANTHROPIC_AUTH_TOKEN)anthropic-version— accepted, not required;anthropic-betaignored
Pipeline extension headers
Identical to the OpenAI-compatible surface — full reference on the Headers & extensions page:
X-Tokensaver-Options/X-Tokensaver-Extensions— JSON thresholds and options (not module on/off)X-Tokensaver-Use-Cache/-Use-Rag/-Use-Compression/-Use-Pii-Filter— rejected (422 MODULE_GATE_POLICY_ONLY)X-Tokensaver-Provider— disambiguate a baremodel_idX-Tokensaver-Apply-Key-Pipeline-Defaults: true— merge the key’s savedpipeline_settingsX-Tokensaver-Execution-Trace-Id— correlate runs in observability
curl with header tuning
curl -sS "https://api.tokensaver.fr/anthropic/v1/messages" \
-H "x-api-key: $TS_KEY" \
-H "Content-Type: application/json" \
-H 'X-Tokensaver-Options: {"cache_similarity_threshold":0.9}' \
-d '{
"model": "anthropic/claude-sonnet-4-6",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hi"}]
}'
Errors
Errors use the Anthropic envelope {"type":"error","error":{"type":"...","message":"..."}}. Status → error.type: 400/422 → invalid_request_error, 401 → authentication_error, 403 → permission_error, 429 → rate_limit_error, 529 → overloaded_error, 5xx → api_error.