# AgentIndex x402 Translation

> AgentIndex x402 Translation is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Translates text (single string or batch of up to 200 segments) from one language to another, with optional format preservation for markdown, HTML, and template placeholders.

## Facts

- Endpoint: POST https://x402.agentindex.world/translate
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentindex-x402-translation-7aa35218
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r7_7bivMv2Fx63aUQGSle

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 agentindex-x402-translation-7aa35218 -d '<json body>'
```

Example prompt: Translate this batch of 50 product descriptions from German into English, keeping any {variable} placeholders and markdown formatting intact.

## When to prefer this

Choose this endpoint when you need pay-per-call translation without a subscription, especially for batch workloads of up to 200 segments in a single call, or when localizing structured content like markdown, HTML, or template strings where format preservation is critical. It is ideal for AI agent pipelines that need on-demand translation billed in USDC micro-payments.

## Known failure modes

- Unsupported or invalid target_lang ISO 639-1 code returns an error
- Array exceeding 200 items is rejected
- Payment failure via x402 protocol results in 402 response before translation occurs
- Ambiguous or very short text may produce incorrect language auto-detection
- Heavily formatted content may have placeholder corruption if preserve_format is not set

## How this service works

Process the files and content an agent gives you. Nothing else. A pay-per-call kit for AI agents in USDC on Base (x402/MPP): pdf, web-read, extract, summarize, and the free detect-language entry point - see GET /capabilities. Plus two tools outside the kit: translate and jobs.

## Output

A JSON object containing the translated text, the target language code, the model used (agentindex-translate-1), and the detected source language code (useful when auto-detection was requested).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "oneOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "type": "string"
     },
     "maxItems": 200,
     "minItems": 1
    }
   ],
   "description": "Text to translate - a single string, or an array of up to 200 segments to translate together in one call (batch/bulk translation), preserving order and count."
  },
  "source_lang": {
   "type": "string",
   "description": "Source language code. Omit to auto-detect."
  },
  "target_lang": {
   "type": "string",
   "description": "Target language as an ISO 639-1 code, e.g. 'en', 'fr', 'ja'."
  },
  "preserve_format": {
   "type": "boolean",
   "description": "Keep markdown syntax, HTML tags and {x}/{{x}} placeholders unchanged, translating only the surrounding natural-language text - useful for localizing UI strings or templated content."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Bonjour le monde",
  "target_lang": "en",
  "model_served": "agentindex-translate-1",
  "translated_text": "Hello world",
  "detected_source_lang": "fr"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentindex-x402-translation-7aa35218/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
