{"uid":"cap_uvZWfjMdbNK52mgVHjBe9","slug":"x402-deployer-x402-deployer-workers-dev-b237eba6","name":"x402-deployer Text Translation API","description":"AI translator — 100+ languages, native-fluent. Auto-detects source. ISO codes or language names. Configurable formality (casual/formal/neutral). Preserves Markdown / code / URLs.","url":"https://x402-deployer.x402-deployer.workers.dev/translate-text","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["text","target_language"],"properties":{"text":{"type":"string","description":"Text to translate. Max 12k chars."},"formality":{"enum":["casual","formal","neutral"],"type":"string","description":"Optional. Register: 'casual', 'formal', or 'neutral' (default)."},"source_language":{"type":"string","description":"Optional. Source language ISO code or name. Auto-detected if omitted."},"target_language":{"type":"string","description":"Target language as an ISO code or name, e.g. 'en' or 'Spanish'."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"translated_text":{"type":"string"},"detected_source_language":{"type":"string"}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"text":"Hello world. This is a test of the translation API.","formality":"neutral","target_language":"es"},"type":"http","method":"POST","bodyType":"json"}},"response":{"model":"hermes-3-llama-3.1-405b","source":"morpheus","formality":"neutral","input_chars":51,"output_chars":55,"source_language":"en","target_language":"es","translated_text":"Hola mundo. Esta es una prueba de la API de traducción.","detected_source_language":"en"}},"exampleRequest":{"text":"Hello world. This is a test of the translation API.","formality":"neutral","target_language":"es"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_A9hTtb9awhNYvwz2aQQ_m","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Translates text into 100+ languages with auto-detection of source language, configurable formality, and preservation of Markdown, code blocks, and URLs","exampleAgentPrompt":"Translate the following paragraph into formal French, preserving any Markdown formatting: '## Getting Started\\nInstall the package using `npm install mylib` and follow the steps below.'","exampleUseCases":null,"resultDescription":"Returns the translated text in the target language with Markdown, code blocks, and URLs left intact; includes the detected source language ISO code and the formality level applied.","failureModes":["Unsupported target language code returns an error indicating invalid language","Text too long may exceed payload limits and return a size error","Ambiguous or extremely short input may result in incorrect source language auto-detection","Invalid formality value (outside casual/formal/neutral) returns a validation error","Network timeout on Cloudflare Workers edge if upstream LLM is slow"],"whenToPreferThis":"Choose this endpoint when you need reliable translation across 100+ languages with auto-detection of the source language, especially when your content contains Markdown, code snippets, or URLs that must not be altered. It supports explicit formality control (casual, formal, neutral), making it suitable for both professional localization and conversational content. Prefer it over generic LLM prompting when you want a consistent, paid, low-latency translation primitive that preserves structured formatting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:47:00.082Z","isFirstParty":false}