> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tape.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway API

Every gateway exposes the same read-only HTTP API. The hosted gateway and a self-hosted one are interchangeable: pick a base URL once and every endpoint on these pages works against it.

Examples on these pages use `$TAPE_GATEWAY` as the base URL. For Tapenet, set:

```bash theme={null}
export TAPE_GATEWAY="https://gw.tape.network"
```

If you run your own gateway, use its URL instead. Other Tapenet endpoints are on the
[network details page](/protocol/architecture/networks#urls-and-addresses).

## Conventions

Every endpoint on the following pages behaves the same way in these respects. The endpoint pages stay short because these rules apply everywhere.

**Read-only.** There are no write endpoints here. Writes are Solana transactions made through the [CLI](/tools/cli) and the [SDKs](/sdks/quickstart). If you want HTTP writes, that's the [S3-compatible gateway](/tools/s3-gateway).

**Bootstrap behavior.** A gateway that is still catching up with the chain serves only [health](/apis/gateway/status/health) and [stats](/apis/gateway/status/stats). Every other route returns `503` until it's ready.

**Errors.** Plain status codes with a short message body:

| Status | Meaning                                                                                                                    |
| ------ | -------------------------------------------------------------------------------------------------------------------------- |
| `404`  | unknown track or object                                                                                                    |
| `400`  | a bad request: an invalid address, a request body the gateway can't decode, or a track that exists but isn't certified yet |
| `429`  | metering applied; the `Retry-After` header says when to try again ([rate limits](/apis/rate-limits))                       |
| `502`  | the gateway couldn't retrieve enough slices from storage nodes                                                             |
| `503`  | the gateway is still bootstrapping                                                                                         |
| `500`  | anything else                                                                                                              |

**Metering.** The two content endpoints, `/object/{track_id}` and `/track/{track_id}`, draw down per-IP request and byte buckets. The `/v1` catalog family and the status routes are not metered. See [rate limits](/apis/rate-limits) for the tiers and the self-hosting path.

**Request tracing** (planned). Responses will carry a request ID that follows the request through the gateway's storage-node calls, so you can quote it when reporting an issue.&#x20;

**Caching.** Decoded-content responses are track-addressed: the `ETag` is the track's on-chain commitment and `Cache-Control` is immutable, because a track-addressed URL can only ever serve one payload. This is what makes gateway responses cache well ([serving through a CDN](/tools/cdn)).

**Wire formats.** The `/object` and `/track` endpoints serve raw bytes, and the status endpoints serve JSON; both are comfortable from `curl`. The versioned `/v1/tracks` and `/v1/tapes` catalog family answers in the SDK's compact binary encoding, except the slice route, which returns raw bytes. Its pages gain SDK examples as the TypeScript, Go, Python, Swift, and Kotlin SDKs are published.

## Endpoints

<Columns cols={3}>
  <Card title="Status" href="/apis/gateway/status/health">
    Health and stats. These serve even during bootstrap.
  </Card>

  <Card title="Objects" href="/apis/gateway/objects/get-object">
    Decoded object content and the name-ordered object catalog.
  </Card>

  <Card title="Tracks" href="/apis/gateway/tracks/track-metadata">
    Track records, payloads, proofs, slices, lookup, and listing.
  </Card>
</Columns>
