# Language Detector by PDF Extract API

> Language Detector by PDF Extract API is a paid API for AI agents from language-detector.pdfextractapi.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Detects the language(s) of a given text, including identification of multilingual content, via a simple POST request.

## Facts

- Endpoint: POST https://language-detector.pdfextractapi.workers.dev/detect
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/language-detector-by-pdf-extract-api-4c7f16ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ioGmJe9c7YpKRiKHosgbV

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 language-detector-by-pdf-extract-api-4c7f16ff -d '<json body>'
```

Example prompt: Can you detect what language this text is written in: 'Bonjour, comment puis-je vous aider aujourd'hui?'

## When to prefer this

Choose this endpoint when you need lightweight, fast, per-call language detection at $0.01 USDC per request, especially for multilingual or mixed-language text. It is well-suited for agentic pipelines that need to identify language before routing, translating, or applying language-specific NLP. Prefer it when you want a pay-per-call model via x402 protocol without a subscription, and when input text fits within 10,000 characters.

## Known failure modes

- Text exceeds 10,000 character limit — request rejected or truncated
- Empty or whitespace-only text — unable to detect language
- Very short text (single word or character) — low-confidence or ambiguous result
- Highly ambiguous input (numbers, special characters only) — no language detected
- API overload or Cloudflare Workers timeout — HTTP 5xx error
- Malformed JSON body — HTTP 400 bad request

## How this service works

Detect the language(s) of text, including multilingual text.

## Output

Returns the detected language(s) of the submitted text, typically including the identified language name and/or ISO language code, along with confidence information. For multilingual text, multiple languages may be returned with their respective confidence scores or proportions.

## 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"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "The text to detect the language of, max 10,000 characters."
      }
     }
    },
    "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/language-detector-by-pdf-extract-api-4c7f16ff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from language-detector.pdfextractapi.workers.dev](https://www.zero.xyz/host/language-detector.pdfextractapi.workers.dev/llms.txt)
