# 2s AI Translation API

> 2s AI Translation API is a paid API for AI agents from 2s.io, paid per call via x402, $0.0282/call, status unknown (last checked 2026-09-14).

Translates text from one language to another using AI, with optional auto-detection of source language, returning translated text and confidence score

## Facts

- Endpoint: POST https://2s.io/api/ai/translate
- Price: $0.0282/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-ai-translation-api-8241aede
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EYnzXyompjWcrpxO1KyIc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-ai-translation-api-8241aede -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Example request

```json
{
 "text": "Hello world",
 "sourceLanguage": "en",
 "targetLanguage": "es"
}
```

## Request schema (JSON Schema)

```json
{
 "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\")."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-ai-translation-api-8241aede/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
