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

# Grok Text to Speech

> Convert text to natural speech with xAI Grok. See parameters, voices, pricing, and API examples.

Generate speech audio from text using xAI's Grok text-to-speech model. Choose a preset voice, a language (or automatic detection), a speaking speed, and an output format.

## Model

```
xai/grok-tts
```

## Pricing

| Unit | Price |
| - | - |
| Per 1,000,000 characters | \$7.50 |

Billing counts the characters of `text` as submitted. A 2,000-character request costs \$0.015.

## Parameters

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `text` | string | Yes | — | Text to convert to speech. Up to 60,000 characters per request |
| `voice_id` | string | No | `"ara"` | Preset voice ID (see [Voices](#voices)) |
| `language` | string | No | `"auto"` | BCP-47 language code (for example `en`, `es`, `pt-BR`), or `"auto"` to detect from the text |
| `speed` | number | No | `1.0` | Speech speed multiplier, `0.7`–`1.5`. `1.0` is normal |
| `format` | string | No | `"mp3"` | Audio format: `"mp3"`, `"wav"`, or `"pcm"` |

## Voices

`voice_id` takes a Grok preset voice ID; the default is `ara`. The full text-to-speech voice catalog is available on request at [contact@unifically.com](mailto:contact@unifically.com).

## Example Request

```bash theme={null}
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-tts",
    "input": {
      "text": "Welcome back. Your order has shipped and should arrive on Thursday.",
      "voice_id": "ara",
      "language": "en",
      "speed": 1.0,
      "format": "mp3"
    }
  }'
```

## Response

```json theme={null}
{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "processing"
  }
}
```

## Completed Response

Poll `GET /v1/tasks/{task_id}` until `status` is `completed`:

```json theme={null}
{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "completed",
    "output": {
      "url": "https://files.unifically.com/audio/tts_abc123def456.mp3",
      "characters": 68
    }
  }
}
```

* `url` — the generated audio file in the requested `format`.
* `characters` — the number of characters billed for the request.

<Note>
  **Volume discounts** are available for almost all models. Reach out at [contact@unifically.com](mailto:contact@unifically.com) to discuss custom pricing.
</Note>


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