# Arabic Pipeline – Document Text Extraction

> Arabic Pipeline – Document Text Extraction is a paid API for AI agents from arabic-pipeline.arabic-pipeline.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-02).

Extracts text content from Arabic-language documents (images or PDFs) by accepting a base64-encoded file and returning the extracted Arabic text.

## Facts

- Endpoint: POST https://arabic-pipeline.arabic-pipeline.workers.dev/doc/extract?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arabic-pipeline-document-text-extraction-02e78724
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WHmYaChjCH30WgBOB5W2A

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 arabic-pipeline-document-text-extraction-02e78724 -d '<json body>'
```

Example prompt: Extract all the Arabic text from this scanned PDF document — here it is as a base64 string, the MIME type is application/pdf.

## When to prefer this

Choose this endpoint when you need to extract Arabic text from scanned images or PDF files and want a pay-per-call model with no API key or subscription setup. It is ideal for infrequent or ad-hoc Arabic OCR tasks where a lightweight x402 micropayment flow is acceptable. Prefer this over general-purpose OCR services when your content is specifically Arabic and you want a purpose-built Arabic NLP pipeline.

## Known failure modes

- Invalid or malformed base64 string causes extraction failure
- Unsupported MIME type results in an error response
- Low-quality or very blurry images may yield incomplete or garbled text
- Payment challenge (HTTP 402) returned on first call before USDC payment is completed
- Very large documents may time out or exceed processing limits
- Non-Arabic or mixed-language documents may have reduced accuracy

## How this service works

Nine micro-capabilities for Arabic-language work, sold per call over x402 in USDC on Base. No API key, no account, no subscription for the buyer: the first request returns a 402 payment challenge, the client pays it and retries. Text utilities are pure computation and cost nothing to serve.

## Output

Returns a JSON object containing the extracted Arabic text content parsed from the submitted document. The exact fields in the response object are not strictly defined but typically include the recognized text from the input image or PDF.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mime_type": {
   "type": "string"
  },
  "document_base64": {
   "type": "string",
   "description": "Base64-encoded document image or PDF."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cost_usd": 0.03,
  "document": {
   "date": "2026-10-22",
   "items": [
    {
     "name": "منتج",
     "price": 12.5,
     "quantity": 1
    }
   ],
   "notes": null,
   "total": 12.5,
   "currency": "USD",
   "merchant": "اسم المتجر",
   "raw_text": null,
   "confidence": 0.9,
   "tax_number": null,
   "document_type": "receipt"
  },
  "endpoint": "POST /doc/extract"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/arabic-pipeline-document-text-extraction-02e78724/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from arabic-pipeline.arabic-pipeline.workers.dev](https://www.zero.xyz/host/arabic-pipeline.arabic-pipeline.workers.dev/llms.txt)
