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

# Baseten

> Deploy Rime TTS on Baseten's serverless GPU infrastructure.

![Rime logo](https://docs.rime.ai/images/rime_logo_new.svg)

*

![Baseten logo](https://docs.rime.ai/images/baseten.svg)

Run Rime's text-to-speech engine in your own [Baseten](https://www.baseten.co/) workspace, on Baseten's autoscaling GPU infrastructure. Each model runs as a single-container deployment: the engine validates its own license and serves TTS directly, with no separate router.

## Get started

Ready-to-use deploy configs for Rime's models live in the [`rimelabs/rime-baseten-deploy`](https://github.com/rimelabs/rime-baseten-deploy) repository. Each model directory contains a Baseten/[Truss](https://truss.baseten.co/) `config.yaml` plus a README with full deploy, secrets, and invocation steps.

| Model | Directory |
| - | - |
| Rime Coda v1: flagship expressive TTS | [`rime-coda-v1/`](https://github.com/rimelabs/rime-baseten-deploy/tree/main/rime-coda-v1) |
| Rime Mist v3: low-latency conversational | [`rime-mist-v3/`](https://github.com/rimelabs/rime-baseten-deploy/tree/main/rime-mist-v3) |

## Prerequisites

Before cloning the deployment repository, contact [help@rime.ai](mailto:help@rime.ai) for engine-image and license access. Your Baseten workspace needs these secrets:

* `gcp_rime_service_account`
* `rime_license`
* `rime_api_key`

To deploy:

1. Clone the repo and `cd` into the model directory you want.
2. Set the three required secrets in your Baseten workspace. The per-model README describes each value.
3. Push the config with the [Truss CLI](https://truss.baseten.co/):

```bash theme={null}
truss push .
```

4. Set the autoscaling concurrency target (each replica handles \~10 concurrent requests before a new one is added). See the model README for the exact Management API call.

## Invoke

Once deployed, send inference requests to your model's sync endpoint. The Rime API key is baked in via the `rime_api_key` secret, so callers authenticate to Baseten only. This request saves the audio to `output.webm`:

```python theme={null}
import requests

resp = requests.post(
    "https://model-<model-id>.api.baseten.co/environments/production/sync",
    headers={
        "Authorization": f"Api-Key {BASETEN_API_KEY}",
        "Accept": "audio/webm;codecs=opus",   # or audio/pcm, audio/mpeg
    },
    json={
        "text": "Natural-sounding, accurately-pronouncing AI TTS built for high-stakes enterprise conversations.",
        "speaker": "luna",
        "lang": "en",
    },
)
resp.raise_for_status()
with open("output.webm", "wb") as f:
    f.write(resp.content)
```

Play `output.webm` to confirm the deployment returns speech. `raise_for_status()` stops the script before it writes the file when Baseten returns an error status.

For full setup instructions, including secrets and autoscaling, see the [`rime-baseten-deploy`](https://github.com/rimelabs/rime-baseten-deploy) README for your chosen model.


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