Returns JSON with your text translated between about 100 languages by Meta M2M100 1.2B on Workers AI, with the source and target languages used.
Use this when you need to translate text, a language translation of a sentence or paragraph between two languages.
Do not use for formatting that must be preserved, certified or legal translation, or speech (transcribe first).
Price: 0.012 USDC per call (x402, eip155:8453). Typical response time: 5000 ms (p95).
POST https://x402-gateway.blackwoodstate8.workers.dev/v1/translate. A request without payment gets 402 Payment Required with the
PAYMENT-REQUIRED header; any x402 client signs an EIP-3009 authorization and retries with
PAYMENT-SIGNATURE (or X-PAYMENT). Invalid input is answered with 400 and not charged.
curl -i -X POST https://x402-gateway.blackwoodstate8.workers.dev/v1/translate -H 'content-type: application/json' -d '{"text":"Pay only for the requests you make.","from":"en","to":"pt"}'
| Pay to | 0x60484D4842De2cd76B2175fcb82d680e7a2DFf30 |
|---|---|
| Asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC) |
| Amount | 12000 atomic units (0.012 USDC) |
| Authorization window | 60 s |
Streamable HTTP at https://x402-gateway.blackwoodstate8.workers.dev/mcp, tool blackwood_text_translate. Payment goes in
_meta["x402/payment"]; without it the tool returns the payment requirements.
| Field | Type | Meaning |
|---|---|---|
text | string | Text to translate, e.g. Pay only for the requests you make (up to 2000 characters) |
to | string | Target language as an ISO 639-1 code, e.g. es, fr, pt, de, ja, zh |
from (optional) | string | Source language as an ISO 639-1 code (default en) |
Example:
{
"text": "Pay only for the requests you make.",
"from": "en",
"to": "pt"
}
Real example:
{
"translatedText": "Pague apenas pelos pedidos que você faz.",
"from": "en",
"to": "pt",
"model": "@cf/meta/m2m100-1.2b"
}
{
"type": "object",
"properties": {
"translatedText": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"model": {
"type": "string"
}
},
"required": [
"translatedText",
"from",
"to",
"model"
],
"additionalProperties": false
}Free schema and example: GET https://x402-gateway.blackwoodstate8.workers.dev/v1/translate.
OpenAPI 3.1 · llms.txt · All services