# 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.

Source: https://digitspace.ai/docs/control/request-headers · Last checked: 2026-10-31

## 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](/docs/routing/strategy).                                                         |
| `X-DigitSpace-Region`         | The caller's region for this request. See [Regions](/docs/routing/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](/docs/devpass/limits) limit errors only. |

Error responses don't carry `x-request-id`.

## Example

```bash
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/null
```
