Base mainnet USDC per request: translation $1.00; localization $2.00; batch $3.00. Recipient: 0x7861db4efc14a1ed5dd8c96c528a3796560f1393.
POST JSON only. Translation text limit 50000 characters. Batch 1–20 strings, each at most 2500 characters. Lowercase two-letter language codes; locale is xx or xx-XX. Unknown fields and whitespace-only fields are rejected.
Validate input and check provider readiness before requesting payment authorization. Supported providers: native Anthropic and a fixed OpenRouter Claude Haiku 4.5 adapter. OpenRouter readiness checks authenticated key limits, account credits and the user-filtered model catalog. Readiness is not proof of generation availability; limits can change after a check. Authorization is verified before work; the installed x402 middleware buffers delivery and skips settlement on HTTP errors. Transient provider failures remain possible. No guaranteed translation accuracy or legal/medical suitability.
Use an x402 client to sign the returned challenge; verify network, amount, asset and recipient. Never send a plain transfer or a transaction hash. Invalid input returns 400/415; unavailable dependencies return 503 without a challenge.
curl -i https://lingua-x402.fly.dev/api/translate -H 'Content-Type: application/json' -d '{"text":"Hello","to":"es"}'
This unpaid example returns a 402 only when ready; otherwise 503. Do not retry with payment until ready.
{
"/api/translate": {
"text": "Hello",
"to": "es"
},
"/api/localize": {
"text": "Hello",
"target_locale": "ja-JP"
},
"/api/batch-translate": {
"texts": [
"Hello",
"Goodbye"
],
"to": "es"
}
}
Complete input/output schemas · Readiness · Synthetic sample · Discovery