translate_text
Translate text across 119 languages. Requires create_payment with toolName='translate_text', prompt (the text to translate) and targetLanguage (the same value you send here). Without targetLanguage the payment buys the standard engine: when it does not cover the better engine a language routes to, the standard engine translates the text, and the answer says so in note. The target language picks the engine: GPT-OSS 120B by default, or a higher-scoring model (Gemini) where one measurably beats it. Auto-detects source language. Privacy-preserving: no data stored. Pricing: 1 sat per 1,000 characters on the standard engine, minimum 1 sat per request; a routed language costs more. GET /api/languages returns the exact price, engine and measured chrF for every language, and the 402 always quotes the real amount before you pay. Supported languages: Afrikaans, Albanian, Amharic, Arabic, Armenian, Assamese, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Burmese, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dari, Dutch, English, Esperanto, Estonian, Farsi, Fijian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Guarani, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Korean, Kurdish, Kyrgyz, Lao, Latvian, Lingala, Lithuanian, Luganda, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Nepali, Norwegian, Occitan, Odia, Pashto, Polish, Portuguese, Punjabi, Romanian, Romansh, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Setswana, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Tigrinya, Tongan, Turkish, Turkmen, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Wolof, Xhosa, Yiddish, Yoruba, Zulu.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"paymentId": "<paymentId>",
"text": "<text>",
"targetLanguage": "<targetLanguage>"
},
"name": "translate_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to translate | |
| modelId | No | Optional. Leave it out: the target language picks the engine and the price. | |
| paymentId | Yes | Valid payment ID (must be paid) | |
| sourceLanguage | No | Source language (auto-detected if omitted). NOTE: only checked for being a known language, not against your text — a wrong but valid value (e.g. 'German' for Spanish text) is accepted and silently mistranslates with no error. Omit it to let auto-detect work. | |
| targetLanguage | Yes | Target language — English name ('Spanish', 'Chinese (Simplified)') or ISO-639 code / locale tag ('es', 'pt-BR'). 119 supported; full list at the GET /api/l402/translate-text endpoint. |