# API reference

> The HTTP APIs and SDK APIs, generated from their OpenAPI specs, TypeScript doc comments and Python docstrings.

URL: https://www.caprid.com/docs/reference/

Every reference here is generated from its source, so it matches the code it describes.

## HTTP APIs

Both are served by Switchboard: the Account API at `https://app.caprid.com`, and the Relay plane API
at `https://switchboard.mux.global`, the hostname relays dial.

| API | For | Reference | Machine-readable |
|---|---|---|---|
| **Account API** | Your backend and scripts, with an API key: Organizations, Members, Invitations, Namespaces, API keys, Signing keys, Client tokens, Self-hosted relays | [Reference](https://www.caprid.com/docs/reference/http/account/) | [OpenAPI YAML](https://www.caprid.com/openapi/account.yaml) · [JSON](https://www.caprid.com/openapi/account.json) · [Markdown](https://www.caprid.com/docs/reference/http/account.md) |
| **Relay plane API** | A relay, with its Node key: enrollment, peer discovery, admission | [Reference](https://www.caprid.com/docs/reference/http/relay/) | [OpenAPI YAML](https://www.caprid.com/openapi/relay.yaml) · [JSON](https://www.caprid.com/openapi/relay.json) · [Markdown](https://www.caprid.com/docs/reference/http/relay.md) |

Send an API key as `Authorization: Bearer sb_...`. Request bodies are JSON, times are Unix seconds,
and errors are always `{"error": "..."}`. Anything you can't reach is a 404, whether or not it exists.

## SDK APIs

| SDK | Packages | Reference |
|---|---|---|
| **TypeScript** | `@caprid/relay`, `@caprid/relay-quic`, `@caprid/relay-websocket`, `@caprid/moq-media`, `@caprid/moq-mediabunny`, `@caprid/moq-core` | [TypeScript reference](https://www.caprid.com/docs/reference/typescript/readme/) |
| **Python** | `caprid-relay` (`caprid_relay`, `caprid_relay.media`, `caprid_relay.quic`), `caprid-moq-core` (`moq_core`), `caprid-moq-media` (`moq_media`) | [Python reference](https://www.caprid.com/docs/reference/python/caprid_relay/) |

Both SDKs use the same names for the same concepts, in each language's casing. The
[SDK vocabulary](https://www.caprid.com/docs/spec/vocabulary/) maps every public name across the two.
