# DocForge PDF Split

> DocForge PDF Split is a paid API for AI agents from docforge-selim.duckdns.org, paid per call via x402, $0.02/call, status down (last checked 2026-09-15).

Splits a PDF document into one or more page-range segments, returning a single PDF or ZIP of PDFs, paid via x402 USDC on Base.

## Facts

- Endpoint: POST https://docforge-selim.duckdns.org/pdf-split
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/docforge-pdf-split-8882240e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9p8flMuh5TMT_w21sCWhJ

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 docforge-pdf-split-8882240e -d '<json body>'
```

Example prompt: Can you split my PDF into two parts — pages 1 through 15 as one file and pages 16 through 40 as another — and give me a ZIP with both?

## When to prefer this

Use this endpoint when you need to programmatically split or extract page ranges from a PDF file in an agent workflow and are set up to pay via x402 USDC on Base. Prefer this over manual tools when automation and machine-payable micropayments are required.

## Known failure modes

- 402 Payment Required if x402 header is missing or payment is insufficient — retry with valid payment header
- Invalid page range (out of bounds for the document) returns an error
- Malformed or password-protected PDF input rejected
- Network timeout on large PDF uploads
- Invalid USDC payment amount or wrong chain

## How this service works

Machine-payable document & media generation via x402 (USDC on Base). Endpoints respond 402 with payment instructions; retry with an x402 payment header.

## Output

For a single page range: a binary PDF file containing only the specified pages. For multiple ranges: a ZIP archive containing one PDF per range. Payment of $0.02 USDC on Base is required via x402 before the response is delivered.

## 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": [
      "file"
     ],
     "properties": {
      "file": {
       "type": "string",
       "description": "Base64-encoded source PDF (data: URI accepted). Max 30MB."
      },
      "pages": {
       "type": "array",
       "description": "Alternative to ranges: explicit 1-indexed page numbers, e.g. [1,3,5]."
      },
      "ranges": {
       "type": "string",
       "description": "1-indexed, inclusive, e.g. '1-3,5,8-10'. Each comma group becomes one output PDF. Multiple groups -> ZIP; one group -> single PDF."
      }
     }
    },
    "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"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "Binary PDF (single range) or ZIP of PDFs (multiple ranges)"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/docforge-pdf-split-8882240e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docforge-selim.duckdns.org](https://www.zero.xyz/host/docforge-selim.duckdns.org/llms.txt)
