# Delx Commerce PDF Text Extraction

> Delx Commerce PDF Text Extraction is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Extracts plain text from a base64-encoded PDF file, returning the full text content with metadata, for $0.003 USDC per call via x402.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/pdf-text?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-pdf-text-extraction-cd3733d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eKzrYl-UKDsuPSAr6qQNc

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 delx-commerce-pdf-text-extraction-cd3733d0 -d '<json body>'
```

Example prompt: Can you pull out all the text from this PDF I'm attaching — up to 200,000 characters — and give it back to me as plain text?

## When to prefer this

Choose this endpoint when you need fast, verifiable, no-signup text extraction from text-layer PDFs and want pay-per-call USDC billing with cryptographic proof of delivery. Ideal for agent pipelines that process PDFs on demand without a subscription. Note: does not perform OCR on scanned-image PDFs.

## Known failure modes

- PDF exceeds 4 MiB decoded size — request rejected
- base64 encoding is malformed or empty — parsing error
- PDF contains only scanned images with no embedded text — returns empty or minimal text (OCR not supported)
- max_chars set to 0 or exceeds 200,000 — validation error
- Payment not included or insufficient USDC — x402 payment required response

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the extracted plain text string, byte and character counts, number of pages observed, document ID, SHA-256 hashes of input and output for verifiability, the model used (poppler-pdftotext), a truncation flag, and pricing metadata. No document is stored or sent to third parties.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max_chars": {
   "type": "integer",
   "default": 200000,
   "maximum": 200000,
   "minimum": 1,
   "description": "Maximum UTF-8 characters returned; extraction remains bounded."
  },
  "pdf_base64": {
   "type": "string",
   "maxLength": 5592406,
   "minLength": 1,
   "description": "One base64-encoded PDF up to 4 MiB decoded; application/pdf data URIs are accepted."
  },
  "file_base64": {
   "type": "string",
   "maxLength": 5592406,
   "minLength": 1,
   "description": "Alias for pdf_base64."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Extracted PDF text",
  "bytes": 48210,
  "chars": 19,
  "model": "poppler-pdftotext",
  "scope": "pdf_text",
  "schema": "delx/pdf-text/v1",
  "provider": "first-party",
  "truncated": false,
  "attribution": "Text extracted locally by Delx with Poppler; no document is stored, fetched, or sent to a third-party provider. Scanned-image OCR is not included.",
  "document_id": "pdf_6fd2b8d1b8ddf0f3e9a9b2c4d5e6f708",
  "input_sha256": "6fd2b8d1b8ddf0f3e9a9b2c4d5e6f7081234567890abcdef1234567890abcdef",
  "output_sha256": "c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef",
  "pages_observed": 2,
  "sale_price_usdc": 0.003,
  "upstream_cost_usd": 0,
  "gross_margin_floor_usd": 0.0028425
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-pdf-text-extraction-cd3733d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
