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

# Smart Translation

Smart Translation turns a chat message into another language while keeping the meaning, tone, and context of the conversation intact.

## How It Works

**Smart Translation** is built for two-sided chat between a **User** (your subscriber) and a **Persona** (your animator). Instead of translating a single line in isolation, it reads the surrounding conversation and takes each side into account, so the result reads naturally in both directions.

#### Key Benefits

* **Context Aware**: The whole conversation is used as context, so short or ambiguous replies (like "sure", "him", or "over there") are translated correctly.
* **Gender Aware**: You tell us each side's gender, so grammar, agreement, and forms of address come out right in every language.
* **Two-Sided**: A dedicated endpoint for each side of the chat keeps User and Persona messages accurate in both directions.
* **Pay Per Use**: Each translation is billed individually and appears as its own line item in your statistics.

#### Common Use Cases

* Letting a User and a Persona chat naturally across two different languages.
* Localizing an ongoing conversation for a human animator working in another language.
* Translating incoming messages before they reach your moderation or support teams.

## Endpoints

There are two endpoints, one for each side of the conversation:

* [**User Message Translation**](/api-reference/smart-translation/endpoints/user): translates the latest message sent by the User.
* [**Persona Message Translation**](/api-reference/smart-translation/endpoints/persona): translates the latest message sent by the Persona.

## Making a Request

#### What You Provide

* **Source and target language**: the language to translate from and the one to translate into. See [Supported Languages](/content-creation/supported-languages).
* **The conversation so far**: the recent messages, oldest first, so we understand the context.
* **User and Persona gender**: used to get pronouns, agreement, and tone right.

#### How to Translate a Message

1. **Pick the endpoint**
   Use **User Message Translation** for a User's message, or **Persona Message Translation** for a Persona's message.

2. **Set the languages**
   Choose the source language and the target language for the translation.

3. **Send the conversation**
   Include the recent messages, oldest first. The last message must belong to the side you chose in step 1.

4. **Add the genders**
   Provide the User's and Persona's gender so the translation reads naturally.

5. **Read the response**
   You get back the translated message and the cost of that translation.

<Warning>**Important:** Only the most recent message is translated — the earlier messages are used purely as context. The last message must be from the side matching the endpoint you called (User for `/user`, Persona for `/persona`).</Warning>
