# xAI Text to Speech

Generate speech, music and audio with xAI Text to Speech from fal through one Spiral API key. It runs in the background and returns audio. Pay as you go, with no subscription.

- Provider: fal
- Category: Audio
- Runs: In the background
- Returns: audio
- Tool id: `fal` / `xai/tts/v1`
- Page: https://spiral.ai/tools/fal/xai/tts/v1

## Pricing

Each item in `text` adds $0.0195.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 30 minutes
- Longest run, end to end: 255 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `text` (required) | text |  | — | The text to convert to speech. Maximum 15,000 characters. Supports speech tags for expressive delivery: inline tags like [laugh], [pause], [sigh] and wrapping tags like <whisper>text</whisper>, <slow>text</slow>. |
| `voice` | one of | carina, zagan, helix, orion, luna, iris, altair, zenith, perseus, helios, lux, kepler, rigel, cosmo, celeste, ursa, sirius, lumen, castor, naksh, atlas, aurora, liora, ara, eve, leo, rex, sal | eve | Built-in xAI voice to use for synthesis. |
| `language` | one of | auto, en, ar-EG, ar-SA, ar-AE, bn, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi | auto | BCP-47 language code or 'auto' for automatic detection. Supported: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. |
| `output_format` | JSON |  | — | Output format configuration. Defaults to MP3 at 24 kHz / 128 kbps. |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "xai/tts/v1",
    "input": {
      "text": "Hello! This is xAI text to speech, brought to you by Fal AI."
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=fal&model=xai%2Ftts%2Fv1

## Common questions

### xAI Text to Speech

**How much does xAI Text to Speech cost?**

Each item in `text` adds $0.0195. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use xAI Text to Speech through an API?**

Send `POST /v1/runs` with `"provider": "fal"`, `"model": "xai/tts/v1"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with fal to use xAI Text to Speech?**

No. Spiral runs it on its own fal account and charges your Spiral balance.

**Can my AI agent use xAI Text to Speech?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

