{"uid":"cap_EYnzXyompjWcrpxO1KyIc","slug":"2s-ai-translation-api-8241aede","name":"2s AI Translation API","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/ai/translate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":6000,"minLength":1,"description":"Source text to translate (1-6000 chars)."},"sourceLanguage":{"type":"string","maxLength":20,"minLength":2,"description":"Source language as BCP-47. Auto-detected when omitted."},"targetLanguage":{"type":"string","maxLength":20,"minLength":2,"description":"Target language as BCP-47 (e.g. \"en\", \"es-MX\", \"zh-Hans\")."}}},"responseSchema":null,"example":{"request":{"text":"Hello world","sourceLanguage":"en","targetLanguage":"es"},"response":{"data":{"ok":true,"items":[{"text":"Hola mundo","confidence":null,"targetLanguage":"es","detectedSourceLanguage":"en"}],"total":1,"source":{"url":"https://2s.io","license":"Generated content — no upstream data license","provider":"2s.io AI (Anthropic Claude Haiku)"}},"meta":{"cost":{"usd":0.01425,"tier":2},"caller":"x402","version":null,"endpoint":"ai.translate","settlement":{"txHash":"0x05fbe436e432c5891a85db1538110ded20a76c267bd4f2384e3f45bc5468a9c1","network":"eip155:8453","success":true}}}},"exampleRequest":{"text":"Hello world","sourceLanguage":"en","targetLanguage":"es"},"tags":["x402"],"displayCostAmount":"0.0282","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.0282/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0705","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0705","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pAsQW027n30HZjPdCqYTJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0705","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Translates text from one language to another using AI, with optional auto-detection of source language, returning translated text and confidence score","exampleAgentPrompt":"Can you translate this text to Spanish (es-MX): 'Our new product launch is scheduled for next quarter and we expect strong demand across all regions.' — let me know how confident you are in the translation.","exampleUseCases":null,"resultDescription":"Returns a JSON object with an items array containing the translated text in the target language, the detected or echoed source language as a BCP-47 tag, and a confidence level (high, medium, or low). Also includes provider metadata with name, URL, and license information.","failureModes":["Text exceeds 6000 character limit — validation error returned","Invalid or unsupported BCP-47 language code provided — error response","Text too short (empty or missing) — validation error","Unsupported language pair — low confidence or error","Payment failure via x402 — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call translation API with no signup or API key requirements, paying only in USDC via x402 on Base or Solana. Ideal for AI agents that need occasional or bursty translation without committing to a subscription. Supports BCP-47 language tags and auto-detection of source language, making it suitable for multilingual pipelines where the input language is unknown.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:21:09.833Z","isFirstParty":false}