# DocForge PDF Generator

> DocForge PDF Generator is a paid API for AI agents from docforge-selim.duckdns.org, paid per call via x402, $0.01/call, status down (last checked 2026-10-12).

Generates a PDF document from provided content, delivered as a binary file, paid per-call via x402 USDC on Base.

## Facts

- Endpoint: POST https://docforge-selim.duckdns.org/pdf?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/docforge-pdf-generator-a3df1803
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qV7JBwAvCEeS9yliWMgcz

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-generator-a3df1803 -d '<json body>'
```

Example prompt: Generate a PDF document containing a simple one-page invoice for 'Acme Corp' totaling $500 for consulting services rendered in June 2025, and pay the $0.01 USDC fee automatically.

## When to prefer this

Choose this endpoint when you need to programmatically generate a PDF document and want to pay per call using USDC on Base via x402 micropayments, with no subscription or API key required. Ideal for AI agents that need on-demand, pay-as-you-go PDF creation at $0.01 per document.

## Known failure modes

- 402 Payment Required — returned on first call before payment header is attached; retry with valid x402 USDC payment header
- Invalid or malformed input content — may result in 400 error or malformed PDF
- Payment rejected — insufficient funds or invalid USDC transaction on Base network
- Service unavailable — dynamic DNS host (duckdns.org) may be unreachable or offline
- Timeout — document rendering may time out for very large or complex inputs

## 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

A binary PDF file (application/pdf) returned directly in the response body, representing the generated document based on the submitted content.

## 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": [],
     "properties": {
      "css": {
       "type": "string",
       "description": "Extra CSS to style the document"
      },
      "html": {
       "type": "string",
       "description": "Raw HTML body; overrides markdown when present"
      },
      "title": {
       "type": "string",
       "description": "Document title"
      },
      "footer": {
       "type": "string",
       "description": "Page footer text with page numbers"
      },
      "format": {
       "type": "string",
       "description": "Page size: A4 (default) or Letter"
      },
      "markdown": {
       "type": "string",
       "description": "Markdown source of the document (or provide html)"
      }
     }
    },
    "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 file (application/pdf)"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/docforge-pdf-generator-a3df1803/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)
