Control and cost
Request headers
Optional headers that tag a request with its source, set its ID, choose a routing strategy or region, and the headers the gateway sends back.
Headers you can send
| Header | Effect |
|---|---|
Authorization: Bearer <key> | Your API key. Required, or use x-api-key. |
x-api-key | Your API key, as the Anthropic SDK sends it. |
X-Source | A name for the app or feature making the request. Shown as Source in Activity. |
X-Title | Used as the source when X-Source isn't set. |
X-Request-Id | Your own ID for the request, used instead of a generated one and sent back. It doesn't prevent duplicates; sending the same ID twice runs two requests. |
X-DigitSpace-Routing | price, latency or auto, for this request. See Routing strategy. |
X-DigitSpace-Region | The caller's region for this request. See Regions. |
anthropic-version | Optional on /v1/messages. |
anthropic-beta | Passed to Anthropic only on your own Anthropic key. |
The gateway allows these headers from browsers (CORS) except X-Source, X-Title and X-Request-Id. They're for server-side calls, which is where API keys belong.
Headers you get back
| Header | |
|---|---|
x-request-id | The request's ID. Find it in Activity, and quote it to support. |
x-digitspace-provider | The provider that answered, for example anthropic. |
Retry-After | Seconds to wait, on DevPass limit errors only. |
Error responses don't carry x-request-id.
Example
curl https://api.digitspace.ai/v1/chat/completions \
-H "Authorization: Bearer $DIGITSPACE_API_KEY" \
-H "X-Source: support-bot" \
-H "X-Request-Id: ticket-48213" \
-H "Content-Type: application/json" \
-d '{ "model": "auto", "messages": [{ "role": "user", "content": "Summarise this ticket." }] }' \
-D - -o /dev/nullChecked against the gateway on 31 October 2026. Something wrong or missing? Tell us.