Translate text (100 languages)
translate_textTranslate text / machine translation between 100 languages (M2M100 1.2B) with automatic source-language detection. Up to 5,000 characters. LibreTranslate-style alias at /v1/translation. $0.001 USDC per started 1,000 characters on Base via x402; failures are not charged. Price: $0.001 per started 1,000 characters. First call returns the x402 PaymentRequired (no charge); retry with payment in _meta["x402/payment"].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to translate | |
| requestKey | No | Optional idempotency key: same payer + requestKey + input returns the stored result without a second charge (7 days). | |
| source_lang | No | Source language ISO 639-1 or "auto" (default) | |
| target_lang | Yes | Target language, ISO 639-1 (e.g. de, fr, es, ar, hi, ur, zh, ja) | |
| x402_payment | No | Optional. Base64 x402 v2 PaymentPayload, for clients that cannot set params._meta["x402/payment"]. Omit on the first call to get the exact price. |