# Quant Agent Shop: Markdown to PDF

> Quant Agent Shop: Markdown to PDF is a paid API for AI agents from quantagentshop.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-23).

Converts a Markdown string into an A4 PDF document and returns it as a base64-encoded string in JSON

## Facts

- Endpoint: POST https://quantagentshop.com/v1/pdf/from-markdown?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/quant-agent-shop-markdown-to-pdf-07d26c3e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jNZyNmu9pRyt--Df4HCOq

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 quant-agent-shop-markdown-to-pdf-07d26c3e -d '<json body>'
```

Example prompt: Can you convert this markdown report into a PDF for me? Title it 'Q3 Sales Summary' and use this content: '# Q3 Sales Summary\n\n## Overview\nRevenue was up 12% YoY...\n\n| Region | Sales |\n|---|---|\n| North | $1.2M |'

## When to prefer this

Choose this endpoint when you have Markdown source content (headings, lists, tables, bold, italic, links) and need a clean A4 PDF without rendering images or arbitrary HTML. It is faster and cheaper than a full web-page-to-PDF conversion, and ideal for generating reports, invoices, or documentation handouts programmatically. Prefer the sibling 'Web page to PDF' endpoint if you need to render a live URL with full HTML/CSS/images.

## Known failure modes

- Markdown exceeding 50,000 characters returns a validation error
- Empty or missing markdown field returns a 400-level error
- Raw HTML or image tags in markdown are silently ignored or not rendered
- Malformed markdown may produce an unexpected but valid PDF layout
- Service unavailability returns a non-200 response; failed calls are not charged

## How this service works

Markdown to PDF. Send Markdown (headings, lists, tables, links, bold, italic); returns an A4 PDF as base64 in JSON. Use to hand a person a printable report or invoice-style page. Images and raw HTML are not rendered. Up to 50,000 characters. Typical response under 1 s. Failed calls are not charged.

## Output

A JSON object containing: the PDF as a base64-encoded string (pdf_base64), the suggested filename, file size in bytes, content type (application/pdf), and creation timestamp. The base64 string can be decoded to obtain a printable A4 PDF file.

## 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": {
     "type": "object",
     "required": [
      "markdown"
     ],
     "properties": {
      "title": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 120
        },
        {
         "type": "null"
        }
       ],
       "title": "Title",
       "default": null,
       "description": "Document title; defaults to the first # heading."
      },
      "markdown": {
       "type": "string",
       "title": "Markdown",
       "maxLength": 50000,
       "minLength": 1,
       "description": "Markdown text: headings, lists, tables, links, bold and italic."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "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": {
  "bytes": 1840,
  "filename": "weekly-report.pdf",
  "created_at": "2026-10-22T09:00:00+00:00",
  "pdf_base64": "JVBERi0xLjMK...",
  "content_type": "application/pdf"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/quant-agent-shop-markdown-to-pdf-07d26c3e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quantagentshop.com](https://www.zero.xyz/host/quantagentshop.com/llms.txt)
