# Text Translation API (28 Languages, Auto-Detect)

> Text Translation API (28 Languages, Auto-Detect) is a paid API for AI agents from freetier-agent-api.pages.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-01).

Translates up to 3,000 characters of text into one of 28 supported languages with automatic source language detection, powered by a small LLM on Cloudflare Workers AI.

## Facts

- Endpoint: GET https://freetier-agent-api.pages.dev/api/translate?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-translation-api-28-languages-auto-detect-a0ff7c89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8LWtS8Dl7XocIrBLDRCze

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 text-translation-api-28-languages-auto-detect-a0ff7c89
```

Example prompt: Can you translate this customer message into German: 'Thank you for your purchase, your order will arrive within 3 business days.'

## When to prefer this

Choose this endpoint when you need fast, inexpensive ($0.005/call) text translation into one of 28 common languages with automatic source detection, especially in agent workflows where you don't know the source language in advance. Ideal for short-to-medium text (under 3,000 chars). Prefer alternatives for very large documents, specialized domains (legal/medical), or languages outside the supported 28.

## Known failure modes

- Text exceeds 3,000 character limit — request rejected or truncated
- Unsupported target language code provided — returns error
- Malformed query parameters — missing required 'text' or 'to' fields
- Workers AI model timeout or rate limit — 5xx response
- Payment not processed (x402 protocol) — 402 response blocking the call

## How this service works

Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.

## Output

A JSON object containing the translated text string, the detected or specified source language code, and the target language code (e.g. {"to": "de", "from": "auto", "translation": "Danke für das Gespräch heute..."}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "target language code, e.g. de"
      },
      "from": {
       "type": "string",
       "description": "optional source language code"
      },
      "text": {
       "type": "string",
       "description": "text to translate (max 3,000 chars)"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "de",
  "from": "auto",
  "translation": "Danke für das Gespräch heute, hier sind die versprochenen Informationen."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-translation-api-28-languages-auto-detect-a0ff7c89/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from freetier-agent-api.pages.dev](https://www.zero.xyz/host/freetier-agent-api.pages.dev/llms.txt)
