> For the complete documentation index, see [llms.txt](https://revoice-live.gitbook.io/revoice.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://revoice-live.gitbook.io/revoice.live/api-documentation/markdown/make-a-tts-request.md).

# Make a TTS request

This endpoint creates a new text-to-speech (TTS) task. It takes a JSON payload and adds the task to the processing queue.

To turn text into the speech of your desired voice, you'll need the appropriate *weight* which as mentioned prior you can get by our [voice-library endpoint](/revoice.live/api-documentation/markdown/voices.md).

Note that this endpoint is the ONLY endpoint which is rate limited to prevent abuse. Though the rate limit is subject of change in future updates where an authentication parameter will be added.

## Example request

***

Post: <https://api.revoice.live/createTTS>

<table><thead><tr><th width="151">Parameters</th><th width="123">Type</th><th width="110">Required</th><th>Description:</th></tr></thead><tbody><tr><td>tts_weight</td><td>String</td><td>Yes</td><td>Internal identifier of the model</td></tr><tr><td>job_type</td><td>String</td><td>Yes</td><td>Modeltype, usually tts, more available soon</td></tr><tr><td>message_text</td><td>String</td><td>Yes</td><td>The text you desire to turn into speech</td></tr></tbody></table>

{% code overflow="wrap" %}

```http
POST https://api.revoice.live/createTTS
Content-Type: application/json

{
  "tts_weight": "weight_cybz3j5kwmsmejb0qfx0dwrr9",
  "job_type": "tts",
  "message_text": "Luke im your father, and im cool and i own $REVOICE"
}
```

{% endcode %}

## Example Response

***

Response structure:

<table><thead><tr><th width="170">Parameters</th><th width="132">Type</th><th>Description</th></tr></thead><tbody><tr><td>errorId</td><td>Integer</td><td>For a successful request the errorId will be always 0, if there has been an error it will be above 0</td></tr><tr><td>taskId</td><td>String</td><td>The internal_id of your request, store this to use it later for <a href="/revoice.live/api-documentation/markdown/poll-the-result-of-the-tts.md">getting </a>the processed tts result.</td></tr><tr><td>message</td><td>String</td><td>Incase of an error this will display an error description, in any other case it will display queue status</td></tr></tbody></table>

### Example Response

```json
{
  "errorId": 0, //success = 0, != 0 equals error
  "message": "adding task to node queue", //description of status
  "taskId": "46876676774653688410" //taskId of your request, store this
}
```
