# Agent Tools – Document Extract Upload

> Agent Tools – Document Extract Upload is a paid API for AI agents from agent-tools.jbarkules.workers.dev, paid per call via x402, $0.006/call, status unknown (last checked 2026-10-29).

Parses a raw PDF or image file (PNG/JPEG) uploaded as bytes and returns extracted text, dates, amounts, totals, IDs, key-value pairs, and tables.

## Facts

- Endpoint: POST https://agent-tools.jbarkules.workers.dev/v1/document/extract/upload?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-tools-document-extract-upload-ac2ea9f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Pqx6NKxlEGCbW-qlFofCC

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 agent-tools-document-extract-upload-ac2ea9f7 -d '<json body>'
```

Example prompt: I'm uploading a PDF invoice directly — can you parse it and pull out all the totals, dates, line items, and any key-value pairs from the document?

## When to prefer this

Choose this endpoint when you have the raw bytes of a PDF or image already in memory and want to POST them directly as a body rather than providing a URL. It is the upload-based counterpart to the URL-based document extract endpoint. Prefer this for server-side pipelines where files are received as uploads, or when file URLs are not available or not stable.

## Known failure modes

- Unsupported file format (not PDF, PNG, or JPEG) returns an error
- File too large may exceed worker size limits
- Scanned images with very low resolution may yield incomplete or garbled text extraction
- Corrupted or password-protected PDFs may fail to parse
- Non-document images (e.g. photographs, diagrams) may return minimal structured output
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Document parsing from uploaded bytes: send a raw PDF or image (PNG/JPEG) body; returns text plus dates, amounts, totals, IDs, key-value pairs and tables.

## Output

Returns extracted text content of the document along with structured fields including detected dates, monetary amounts, totals, reference IDs, key-value pairs, and any tables found within the PDF or image.

## 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": {
     "type": "object",
     "required": [],
     "properties": {}
    },
    "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/agent-tools-document-extract-upload-ac2ea9f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-tools.jbarkules.workers.dev](https://www.zero.xyz/host/agent-tools.jbarkules.workers.dev/llms.txt)
