# Invoice PDF Generator

> Invoice PDF Generator is a paid API for AI agents from amanchain-relay.gitajhd.workers.dev, paid per call via x402, $0.004977/call, status unknown (last checked 2026-09-14).

Generates a professional A4 invoice PDF (base64-encoded) from buyer details and line items, computing VAT and totals automatically, payable per-call via USDC on Base.

## Facts

- Endpoint: POST https://amanchain-relay.gitajhd.workers.dev/api/x402/aman-invoice-pdf
- Price: $0.004977/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/invoice-pdf-generator-a15f25a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jNgfepVYRv_lXnt4F6d-S

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

Example prompt: Generate an invoice PDF for my client Acme Corp at 123 Main St, billed for 5 hours of consulting at $150/hour and 2 software licenses at $200 each, with 20% VAT, invoice number INV-2024-042.

## When to prefer this

Choose this endpoint when you need to generate a ready-to-send A4 invoice PDF on-the-fly without any account registration or API key setup. It is ideal for AI agents automating billing workflows, freelancers, or e-commerce systems that need VAT-inclusive invoices computed and rendered instantly. Prefer it over template-based document tools when you want a single API call that handles VAT computation and PDF rendering together, paid per-use with USDC via x402.

## Known failure modes

- Missing required buyer or line item fields returns a validation error
- Invalid or malformed JSON in the request body causes a 400 bad request
- Insufficient USDC payment via x402 returns a 402 Payment Required response
- Malformed serviceId value causes the relay to reject the request
- Network timeout on the Cloudflare Workers relay results in a 504 error

## How this service works

Invoice PDF generator API — send buyer and line items as JSON, get a real A4 invoice PDF (base64) with VAT and totals computed; billing and invoicing API for AI agents, no account needed. Deterministic on-chain execution by the AmanChain node — live consensus state, real blocks, pools and balances. Pay per call via x402 (USDC on Base), no account, no API key. POST JSON {"serviceId":"aman-invoice-pdf","request":"<input>"}.

## Output

A base64-encoded A4 PDF invoice document containing buyer and seller details, an itemized list of line items with quantities and unit prices, computed subtotals, VAT amounts per applicable rate, and the final total due. The agent receives the PDF data ready for decoding, saving, or emailing to the end recipient.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "body": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "example": {
      "ok": true
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/invoice-pdf-generator-a15f25a7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from amanchain-relay.gitajhd.workers.dev](https://www.zero.xyz/host/amanchain-relay.gitajhd.workers.dev/llms.txt)
