# xAI Text to Speech API

> Grok Tts by xAI - convert text to natural-sounding speech with AI. Supports multiple voices, languages, emotions, and speaking styles for content creation and accessibility.

Source: https://www.sandbase.ai/model/xai/grok-tts
API reference: https://www.sandbase.ai/model/xai/grok-tts/docs

## Facts

- Provider: xAI
- Type: Audio model
- Model ID: `xai/grok-tts`
- Price: From $0.01 per run
- Capabilities: text to speech
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "xai/grok-tts",
  "text": "Hello! This is xAI text to speech, brought to you by Fal AI."
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call xAI Text to Speech through SandBase?

Create a SandBase API key, then send requests with the model ID "xai/grok-tts" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate xAI account?

No. One SandBase API key and balance gives you access to xAI Text to Speech and the other models in the catalog; you do not need to sign up with xAI separately.

## README

### xAI Text to Speech

xAI text-to-speech with five voices (Eve, Ara, Rex, Sal, Leo).

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `text` | string | — | Text to speak. |
| `voice` | `eve` / `ara` / `rex` / `sal` / `leo` | — | Voice. |

#### Billing

$0.015 per started 1,000 characters, with a one-unit minimum.

| Text | Price |
|---|---|
| 200 characters | $0.015 |
| 1,000 characters | $0.015 |
| 2,500 characters | $0.045 |

Failed runs are not charged.
