# Tanod Docs PDF Rasterize

> Tanod Docs PDF Rasterize is a paid API for AI agents from docs.tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-13).

Converts PDF pages into raster images (JPEG or PNG) at a specified DPI, returning results as base64 or a temporary download URL

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/rasterize?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-docs-pdf-rasterize-21336993
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IEydRUNr2otgghKfLhjse

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 tanod-docs-pdf-rasterize-21336993 -d '<json body>'
```

Example prompt: Rasterize page 1 of this PDF for me at 200 DPI as a PNG — here's the URL: https://example.com/report.pdf — and give it back as base64.

## When to prefer this

Use this endpoint when you need to convert PDF pages into raster images (JPEG or PNG) at a controlled DPI, especially when you need the result inline as base64 or as a short-lived download URL. Prefer this over general-purpose document converters when you need fine-grained control over DPI, JPEG quality, grayscale rendering, and page selection. It is well-suited for generating PDF thumbnails, flattening PDFs for display, archiving documents as images, or preparing PDFs for OCR pipelines that require image input.

## Known failure modes

- PDF URL is private, internal, or IP-literal — request refused
- PDF exceeds 20 MB via URL or 10 MB via base64 — rejected
- More than 20 pages requested per call — rejected
- DPI out of range (below 36 or above 300) — validation error
- JPEG quality out of range (below 30 or above 95) — validation error
- Malformed page selection string — validation error
- PDF is corrupted or unreadable — processing error
- URL is not publicly accessible or returns non-PDF content — error

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

A JSON object containing the rasterized image either as a base64-encoded string or a temporary download URL (valid for 24 hours). The response includes metadata such as DPI used, format, number of pages rasterized, input and output byte sizes, and content type. When output mode is 'url', additional fields like expires_at, sha256, and file size are included instead of the base64 data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dpi": {
   "type": "integer",
   "default": 150,
   "maximum": 300,
   "minimum": 36,
   "description": "36-300 (default 150)."
  },
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."
  },
  "pages": {
   "anyOf": [
    {
     "type": "string",
     "pattern": "^[0-9a-zA-Z ,\\-]+$",
     "maxLength": 200,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Pages to keep (default all; at most 20 per call). A closed selection of at most 5 pages is the lower price."
  },
  "format": {
   "enum": [
    "jpeg",
    "png"
   ],
   "type": "string",
   "default": "jpeg",
   "description": "jpeg (default, smaller) or png (lossless)."
  },
  "output": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "grayscale": {
   "type": "boolean",
   "default": false,
   "description": "Render in grayscale."
  },
  "pdf_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The PDF as base64 (at most 10 MB decoded per request); or use url."
  },
  "jpeg_quality": {
   "type": "integer",
   "default": 85,
   "maximum": 95,
   "minimum": 30,
   "description": "JPEG quality (30-95, default 85)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dpi": 100,
  "file": {
   "name": "rasterized.pdf",
   "bytes": 10342,
   "pages": 1,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 13,792 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "format": "jpeg",
  "operation": "rasterize",
  "rasterized": 1,
  "input_bytes": 13264,
  "input_pages": 1,
  "output_bytes": 10342,
  "untrusted_content": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-rasterize-21336993/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docs.tanod.dev](https://www.zero.xyz/host/docs.tanod.dev/llms.txt)
