# Check whether the gateway is down

> Tell a gateway outage from a key, request, or configuration problem in under a minute, using the unauthenticated status document and GET /v1/status.

When requests fail, the first question is whose problem it is: the gateway, a provider behind it, or the key and request themselves. Since 0.3.0 the gateway answers that question directly, starting from the base URL already in the SDK configuration.

**Persona:** Developer calling the gateway.

**Estimated time:** under a minute for the two checks; a few minutes when the trail leads into Request Logs.

## Step 1: open the base URL

Paste the gateway base URL into a browser, or run:

```bash
curl -s https://<gateway-hostname>/
```

No API key is needed. The JSON document that comes back separates the cases:

| Answer | Meaning | Next move |
| --- | --- | --- |
| `status: serving` | The gateway is up with routes deployed. The problem is further along: a provider, the key, or the request. | [Step 2](#step-2-ask-which-provider-is-failing) |
| `status: not_serving` | The gateway is up but has nothing configured to serve on the hostname called. Not a key or request problem. | Raise it with the platform operator; requests to this hostname are not answered until configuration is applied. |
| `status: unknown` | The gateway is up but cannot currently read whether routes are deployed. | Treat as `serving` and continue; mention it if a support ticket follows. |
| No response at all | The data plane itself is down or unreachable. | Check DNS and network, then raise it with the platform operator. |

Every state other than `serving` carries the sentence "This is not a problem with your API key or your request." in its `message`. The `hostname` field echoes the host the request reached, which confirms which endpoint answered; read it rather than `data_plane`, which carries the same value and is deprecated. On a data plane on 0.7.0 or later the state describes the hostname called and nothing else: a hostname with nothing deployed reads `not_serving` even while other hostnames on the same data plane serve. The full field reference is in [Gateway behavior](/reference/gateway-behavior/#checking-whether-the-gateway-is-serving).

## Step 2: ask which provider is failing

With the gateway serving, the next suspect is a provider behind it. `GET /v1/status` takes the same API key used for inference:

```bash
curl -s https://<gateway-hostname>/v1/status -H "Authorization: Bearer $TETRATE_API_KEY"
```

The `providers` list reports reachability derived from the requests this gateway actually forwarded, not from probes, so it reads differently from a health check. On a data plane on 0.7.0 or later the list covers only the calling key's own project: the providers that project's requests went to, and the counts of those requests alone. A provider another project on the same data plane uses does not appear, and an empty list means this pod has served none of the project's requests yet.

- `reachable: true` with a non-zero `failures` count means traffic is flowing and some of it failed; look at `last_failure_code`.
- `reachable: false` means every observed request to that provider failed in the window. The provider, not the gateway, is the problem.
- `reachable: null` means no traffic was observed in the window: no evidence either way, not health.

Two caveats before quoting the numbers: the reply is per replica (the `replica` field names which pod answered, and another pod behind the same load balancer can answer differently), and the window is short and resets when configuration is pushed (`observation_window`). Field-by-field detail is in [Gateway behavior](/reference/gateway-behavior/#per-provider-reachability).

## Step 3: rule out the key and the model

Both endpoints reporting healthy moves the question to the key and the request:

- [`GET /v1/models`](/reference/supported-apis/#models-api-v1models) returns exactly the models the calling key can reach on this data plane. An empty or short list means configuration, not availability.
- A `403` with `category: hostname_not_selected` means the key's project is not served at this hostname. Branch on `category`, not on the message text: a data plane on 0.7.0 or later sends one fixed message whatever the reason. Take an address that serves the project from the endpoint list in the Developer Console and retry there. `your_hostnames` is deprecated in 0.7.0 but is still returned on 0.8.0, 0.8.1, and current releases, so do not build a retry on it. If the refusal looks wrong, quote the `reference_id` to support. The format is documented in [Gateway behavior](/reference/gateway-behavior/#hostname-not-selected).

## Step 4: look at the request that failed

For a failure that already happened, the per-request record is the authority: find it in **Request Logs** by its `X-Request-ID`, as described in [Monitor traffic and usage](/agent-router-service/guides/monitor-traffic-and-usage/). Quote the correlation ID, and the `reference_id` from a `403`, in any support ticket.

Both status endpoints are answered by the data plane itself, so they keep working during a management plane outage, and both accept only `GET` and `HEAD`.

Where to go next

  
    Gateway behavior
    The full contract: error envelope, status codes, retries, and the status endpoints.
  
  
    Monitor traffic and usage
    Request Logs and Usage analytics, the after-the-fact record of every call.
