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

# Enhance Text

> Add emotion and sound tags to your text without changing a word

Takes your text and returns the same text with [emotion and sound tags](https://docs.60db.ai/features/emotion-tags.md) inserted where they fit. Pass the result to [Text to Speech](https://docs.60db.ai/api-reference/tts/text-to-speech.md). Nothing is synthesized and no credits are charged.

Enhance only inserts tags. Your words, spelling, numbers, names, punctuation, spacing, line breaks, language and script come back exactly as you sent them. Sentences that already start with a tag are left alone.

## Request

### Headers

**Authorization** `string` *required*

Bearer token with your API key

**Content-Type** `string` *required*

application/json

### Body

**text** `string` *required*

The text to enhance (max 5000 characters)

**language** `string`

Optional language hint, such as `"en"` or `"hi"`, to help choose fitting tags. It never changes your text. Defaults to the language of `text`.

## Response

**success** `boolean`

Indicates if the request was successful

**message** `string`

Status message

**data.text** `string`

Your text with tags inserted, and nothing else changed. Only valid tags are returned. If no tags could be suggested, your original text comes back unchanged.

> [!NOTE]
>
> Tags count toward the 5000-character limit of Text to Speech. If a tag would push the text over it, that tag is skipped; your text is never cut. Read the result before generating speech and edit any tag you don't want.

## Errors

| Status | Meaning |
| - | - |
| `400` | `text` is missing, empty, or longer than 5000 characters |
| `401` | Missing or invalid API key |
| `403` | Your key is not allowed to synthesize speech |
| `502` | The enhancement service is unavailable. Try again |

```bash cURL theme={null}
curl -X POST https://api.60db.ai/tts/enhance \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your order is delayed. We will deliver it tomorrow.",
    "language": "en"
  }'
```

```javascript JavaScript theme={null}
const res = await fetch("https://api.60db.ai/tts/enhance", {
  method: "POST",
  headers: {
    Authorization: "Bearer your-api-key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: "Your order is delayed. We will deliver it tomorrow.",
    language: "en",
  }),
});
const { data } = await res.json();
console.log(data.text);
```

```json 200 theme={null}
{
  "success": true,
  "message": "Text enhanced successfully",
  "data": {
    "text": "[apologetic] Your order is delayed. [calm] We will deliver it tomorrow."
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "message": "text is required"
}
```

```json 502 theme={null}
{
  "success": false,
  "message": "Enhance service is unavailable, try again"
}
```


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