# DocForge Invoice PDF Generator

> DocForge Invoice PDF Generator 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-10-13).

Generates a PDF invoice document on-demand via a machine-payable x402 micropayment (0.02 USDC on Base).

## Facts

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

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-invoice-pdf-generator-130eeff4 -d '<json body>'
```

Example prompt: Generate a PDF invoice for my client Acme Corp for 3 hours of consulting at $150/hour and a $50 software license fee, billed from my company Bright Labs LLC — I need it as a downloadable PDF.

## When to prefer this

Use this endpoint when you need to programmatically generate a PDF invoice document and can settle payment via USDC on Base using the x402 micropayment protocol. Ideal for AI agents automating billing workflows where each invoice generation costs a flat $0.02 USDC. Prefer this over heavier SaaS invoicing APIs when you just need a one-shot PDF output without account setup or subscriptions.

## Known failure modes

- 402 returned without payment header — expected; retry with x402 payment header
- Payment rejected due to insufficient USDC balance on Base
- Malformed invoice input data resulting in 400 Bad Request
- DuckDNS dynamic DNS resolution failure causing connection timeout
- Server unavailable or cold-start delay resulting in 503
- Invalid or expired payment token causing 401/402 re-prompt

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

Returns a binary PDF file (Content-Type: application/pdf) representing a formatted invoice document. The call first receives a 402 Payment Required response with x402 payment instructions; after submitting a valid USDC payment header on Base, the endpoint returns the generated PDF invoice ready for download or forwarding.

## 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": [
      "seller",
      "buyer",
      "items"
     ],
     "properties": {
      "date": {
       "type": "string",
       "description": "Issue date"
      },
      "buyer": {
       "type": "object",
       "description": "Client: { name (required), address?, email?, taxId? }"
      },
      "items": {
       "type": "array",
       "description": "Line items: { description, unitPrice, quantity?, vatRate? }"
      },
      "notes": {
       "type": "string",
       "description": "Free-text notes shown at the bottom"
      },
      "locale": {
       "type": "string",
       "description": "Label language: en or fr"
      },
      "number": {
       "type": "string",
       "description": "Invoice number"
      },
      "seller": {
       "type": "object",
       "description": "Issuer: { name (required), address?, email?, taxId? }"
      },
      "dueDate": {
       "type": "string",
       "description": "Payment due date"
      },
      "currency": {
       "type": "string",
       "description": "Currency code, e.g. USD or EUR"
      }
     }
    },
    "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 invoice (application/pdf)"
}
```

## More

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