# PDF Extract API - Text Translator

> PDF Extract API - Text Translator is a paid API for AI agents from translator.pdfextractapi.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Translates text into a target language with automatic source language detection, supporting language names or ISO 639-1 codes.

## Facts

- Endpoint: POST https://translator.pdfextractapi.workers.dev/translate
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-extract-api-text-translator-b3a3a195
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w66H9nR9IaC8uk6fNZ2B3

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 pdf-extract-api-text-translator-b3a3a195 -d '<json body>'
```

Example prompt: Translate this text into Spanish: 'Welcome to our platform. We're glad you're here and hope you enjoy the experience.'

## When to prefer this

Choose this endpoint when you need fast, pay-per-call text translation without setting up a recurring API subscription. It is ideal for agents that occasionally need to translate user-supplied text of up to 20,000 characters into a known target language, especially when the source language is unknown and auto-detection is needed. It suits lightweight localization tasks, one-off translations, and multilingual pipelines that need simple JSON-based input.

## Known failure modes

- Text exceeds 20,000 character limit — request rejected
- Unsupported or unrecognized target language code — translation fails
- Empty or missing 'text' field — validation error
- Empty or missing 'target_language' field — validation error
- Ambiguous or very short input text causing incorrect language auto-detection
- Payment not processed (x402 protocol failure) — 402 error returned

## How this service works

Translate text into a target language, with source language auto-detection.

## Output

The agent receives a translated version of the submitted text in the specified target language. The source language is auto-detected, so no prior knowledge of the input language is required. The response includes the translated text ready for use.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text",
      "target_language"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "The text to translate, max 20,000 characters."
      },
      "target_language": {
       "type": "string",
       "description": "Target language, as a name or ISO 639-1 code, e.g. 'es' or 'Spanish'."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-extract-api-text-translator-b3a3a195/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from translator.pdfextractapi.workers.dev](https://www.zero.xyz/host/translator.pdfextractapi.workers.dev/llms.txt)
