# agent402.tools PDF Merge

> agent402.tools PDF Merge is a paid API for AI agents from agent402.tools, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Merges 2–20 public PDF URLs into a single PDF, returning the result as base64 with page count and file size

## Facts

- Endpoint: POST https://agent402.tools/api/pdf-merge
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-pdf-merge-efe60035
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1_h14LOEdgN-MHZlF_Bi0

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 agent402-tools-pdf-merge-efe60035 -d '<json body>'
```

Example prompt: Can you merge these three PDFs into one document, in this order: https://example.com/intro.pdf, https://example.com/body.pdf, and https://example.com/appendix.pdf?

## When to prefer this

Use this endpoint when you need to programmatically combine multiple PDF documents from public URLs into a single ordered PDF, especially in automated agent workflows where the result needs to be returned as base64 for further processing or storage. Prefer this over local PDF tools when operating in a serverless or cloud environment without filesystem access.

## Known failure modes

- One or more URLs is not publicly accessible or returns a non-200 status
- One or more URLs does not point to a valid PDF file
- Fewer than 2 URLs provided
- More than 20 URLs provided
- A PDF is password-protected or encrypted
- Network timeout fetching a remote PDF
- Payment not received or x402 protocol failure

## How this service works

Combine several PDFs into one, in order. Body: {"urls":["https://…/a.pdf","https://…/b.pdf"]}. Returns the merged PDF as base64 plus page count and size.

## Output

Returns a JSON object containing the merged PDF encoded as a base64 string, the total page count of the combined document, and the file size in bytes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "urls": {
   "type": "array",
   "description": "2–20 public PDF URLs, merged in order"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 51234,
  "pages": 8,
  "pdfBase64": "JVBERi0xLjcK…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-pdf-merge-efe60035/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
