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

# Cartesia

> TypeScript API reference for the cartesia text-to-speech provider.

<Card title="Usage guide" icon="book" href="/plugins/tts/cartesia" horizontal>
  Setup, environment variables, and Python/JavaScript/Go usage examples.
</Card>

## CartesiaTTS

Create a TTS instance configured for Cartesia.

```ts theme={null}
import { CartesiaTTS } from '@zeroruntime/js-sdk/inference';  // same fields, through the gateway, no vendor key
import { CartesiaTTS } from '@zeroruntime/js-sdk/plugins';  // direct to the vendor, with your key
```

### Options

<ParamField path="model" type="string" default="sonic-2" />

<ParamField path="voice" type="string | number[]" default="f8f5f1b2-f02d-4d8e-a40d-fd850a487b3d" />

<ParamField path="language" type="string" default="en" />

<ParamField path="base_url" type="string" default="https://api.cartesia.ai" />

<ParamField path="generation_config" type="Record<string, any> | null" default="null" />

<ParamField path="pronunciation_dict_id" type="string | null" default="null" />

<ParamField path="max_buffer_delay_ms" type="number | null" default="null" />

<ParamField path="word_timestamps" type="boolean" default="false" />

<ParamField path="max_connection_age_sec" type="number" default="300" />
