# agent402.tools Images to PDF

> agent402.tools Images to PDF 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).

Converts a list of PNG/JPEG image URLs into a single PDF file (one image per page) and returns it as base64-encoded data

## Facts

- Endpoint: POST https://agent402.tools/api/images-to-pdf
- 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-images-to-pdf-547bae7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3egVqNxpox0rjimx8MqlZ

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-images-to-pdf-547bae7a -d '<json body>'
```

Example prompt: Can you combine these three images into a single PDF for me? Here are the URLs: https://example.com/photo1.png, https://example.com/photo2.jpg, and https://example.com/photo3.png — one image per page please.

## When to prefer this

Use this endpoint when you need to programmatically merge multiple PNG or JPEG images (referenced by public URLs) into a single PDF document without requiring local file handling. Ideal for agents that have already obtained public image URLs and need a ready-to-use base64 PDF in return. Prefer over client-side PDF libraries when the agent operates in a headless or serverless context without native PDF tooling.

## Known failure modes

- Invalid or inaccessible image URL — server cannot fetch one or more images, returns error
- Unsupported image format — non-PNG/JPEG URLs rejected
- Too many URLs — exceeds 20-image limit, returns validation error
- Empty URL list — request with no URLs returns validation error
- Payment failure — x402 payment not completed, request rejected
- Image download timeout — remote image server too slow, returns error

## How this service works

Combine PNG/JPEG images into a single PDF, one image per page. Body: {"urls":["https://…/1.png","https://…/2.jpg"]}. Returns the PDF as base64.

## Output

Returns a base64-encoded PDF document where each submitted image occupies one page, in the order provided. The agent must decode the base64 string to obtain the raw PDF bytes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "urls": {
   "type": "array",
   "description": "1–20 public PNG/JPEG image URLs"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 88123,
  "pages": 2,
  "pdfBase64": "JVBERi0xLjcK…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-images-to-pdf-547bae7a/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)
