# Machina Agent Services – PDF Extract

> Machina Agent Services – PDF Extract is a paid API for AI agents from mach402.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-22).

Extracts text content from a PDF file and returns it as Markdown with page and word counts

## Facts

- Endpoint: POST https://mach402.dev/pdf/extract?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machina-agent-services-pdf-extract-ec3258d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__9eg1K8o4B_7hMbwHV5ue

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 machina-agent-services-pdf-extract-ec3258d0 -d '<json body>'
```

Example prompt: Can you extract all the text from this PDF and give it back to me as Markdown? It's about 12 pages long.

## When to prefer this

Choose this endpoint when you need to extract raw text content from a PDF document and want it returned in clean Markdown format, especially if you also need metadata like page count and word count. It supports PDFs up to 50 pages. It uses the x402 micropayment protocol at $0.05 USDC per call, making it suitable for agent workflows where pay-per-use is preferred over subscriptions.

## Known failure modes

- PDF exceeds 50-page limit — request will be rejected
- Malformed or corrupted PDF bytes — extraction will fail
- Non-PDF content submitted as body — returns error
- Empty or missing 'input.body' field — validation error
- Encrypted/password-protected PDF — text cannot be extracted
- Payment failure via x402 protocol — request not processed

## How this service works

x402-powered API services for AI agents

## Output

A JSON object containing the full extracted text formatted as Markdown (field: 'markdown'), the total number of pages in the PDF (field: 'page_count'), and the total word count of the extracted content (field: 'word_count').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "http://json-schema.org/draft-07/schema#",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType"
   ],
   "properties": {
    "body": {
     "type": "string",
     "description": "Raw PDF bytes (Content-Type: application/pdf), max 50 pages"
    },
    "type": {
     "const": "http"
    },
    "method": {
     "const": "POST"
    },
    "bodyType": {
     "const": "json"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "markdown": "# Title\n\nContent...",
  "page_count": 12,
  "word_count": 4200
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machina-agent-services-pdf-extract-ec3258d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mach402.dev](https://www.zero.xyz/host/mach402.dev/llms.txt)
