---
title: "Translate text"
method: POST
path: "/ai/v1/translate"
tags: ["AI"]
---

# Translate text

`POST /ai/v1/translate`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/ai/v1/translate`
- Auth: HTTP bearer

Translate text to a target language via OpenRouter. Requires an active AI Translation add-on.

## Request body

- object
  - `text` string, required: Text to translate (max 10,000 chars)
  - `to` string, required: Target language (ISO 639-1 code)
  - `from` string: Source language (ISO 639-1 code, auto-detected if omitted)
  - `context` string: Context hint for tone/register (max 200 chars)

## Response `200`

Translation result

- AiTranslateResponse
  - `text` string, required
  - `from` string, required
  - `to` string, required

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid authentication. Run402-originated JSON bodies use the canonical ErrorEnvelope.
- `403`: Translation add-on required or word limit reached
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/run402/apis/run402-api.md) · [All operations](https://skmtc.dev/run402/apis/run402-api/llms.txt) · [OpenAPI document](https://skmtc.dev/run402/apis/run402-api/revisions/893607557f50?raw)
