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

# API Reference

> Gradium API endpoints for Text-to-Speech, Speech-to-Text, Voices, Voice Design, Pronunciations, and Metering

## Welcome

The Gradium API provides low-latency, high-quality Text-to-Speech and Speech-to-Text capabilities. This reference documents all available REST and WebSocket endpoints.

> [card] [OpenAPI Specification](https://docs.gradium.ai/api-reference/openapi.json)
>
> Download the OpenAPI specification file

## Authentication

All API endpoints are authenticated using an API key passed via the `x-api-key` header:

```bash theme={null}
x-api-key: your_api_key
```

## Server URL

Use the following base URL for all REST endpoints:

```
https://api.gradium.ai/api
```

For WebSocket endpoints, use:

```
wss://api.gradium.ai/api
```

## Data residency

`api.gradium.ai` serves every region: requests are routed to the nearest
cluster, with no region-specific URL to configure and no residency
commitment.

Organizations that need their sessions to stay in one region can opt in to
data residency and use `eu.api.gradium.ai` or `us.api.gradium.ai` instead
(same API, same keys). Each response then reports the residency it got, in the
`x-gradium-residency` header for REST and the `residency` field of the
WebSocket `ready` message. See
[Data Residency](https://docs.gradium.ai/guides/data-residency.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.