Translate text (M2M100, 100 languages)
ai_translateUse when an agent must say something in a language it was not given: about 100 languages with Meta M2M100 1.2B - pass the text and the target language (ISO code or English name); the source language is detected if omitted. Long texts are split by sentence, keeping order and line breaks. Up to 2000 characters per call. Chains with /v1/ai/transcribe and /v1/ai/speech. You are only charged if the translation is delivered. No API key, no account. $0.005 per call, paid over x402 (USDC).
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": {
"text": "<text>",
"to": "<to>"
},
"name": "ai_translate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target language: ISO code (es, fr, de, zh, ja...) or English name (spanish). | |
| from | No | Optional source language; detected when omitted. | |
| text | Yes | What to translate, up to 2000 characters. |