# Language text translate

`POST /language/translate` · Rivier · language

Translate up to 200 texts into one language, keeping placeholders and markup, with the project's term list. A translation already made for the same words is read back and costs nothing; the rest is held against the project's spending limits.

- Scope: language:write
- Mcp: rivier_language_translate
- Graphql: Mutation.languageTextTranslate
- Sdk: language.text.translate
- Cli: language text translate

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "texts": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 10000
      },
      "minItems": 1,
      "maxItems": 200
    },
    "to": {
      "type": "string",
      "minLength": 2,
      "maxLength": 12
    },
    "from": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 2,
          "maxLength": 12
        },
        {
          "type": "string",
          "const": "auto"
        }
      ]
    },
    "glossaryId": {
      "type": "string",
      "format": "uuid"
    },
    "tone": {
      "type": "string",
      "maxLength": 200
    },
    "purpose": {
      "type": "string",
      "maxLength": 60
    }
  },
  "required": [
    "texts",
    "to"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/language/translate' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "texts": [
    "string"
  ],
  "to": "string"
}'
```
