# x402-deployer Text Translation API

> x402-deployer Text Translation API is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Translates text into 100+ languages with auto-detection of source language, configurable formality, and preservation of Markdown, code blocks, and URLs

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/translate-text
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-b237eba6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uvZWfjMdbNK52mgVHjBe9

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 x402-deployer-x402-deployer-workers-dev-b237eba6 -d '<json body>'
```

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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

AI translator — 100+ languages, native-fluent. Auto-detects source. ISO codes or language names. Configurable formality (casual/formal/neutral). Preserves Markdown / code / URLs.

## Output

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.

## Example request

```json
{
 "input": {
  "body": {
   "text": "Hello world. This is a test of the translation API.",
   "formality": "neutral",
   "target_language": "es"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to translate. Max 12k chars."
      },
      "target_language": {
       "type": "string",
       "description": "Target language as an ISO code or name, e.g. 'en' or 'Spanish'."
      },
      "source_language": {
       "type": "string",
       "description": "Optional. Source language ISO code or name. Auto-detected if omitted."
      },
      "formality": {
       "type": "string",
       "enum": [
        "casual",
        "formal",
        "neutral"
       ],
       "description": "Optional. Register: 'casual', 'formal', or 'neutral' (default)."
      }
     },
     "required": [
      "text",
      "target_language"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "translated_text": {
       "type": "string"
      },
      "detected_source_language": {
       "type": "string"
      }
     }
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-b237eba6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
