POST

Render Markdown to PDF. Uses markdown-it + playwright

/v1/md-pdf

Powered by Playwright

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/md-pdf
Content-Type: application/json

{
  "markdown": "Hello, world!"
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Render Markdown to PDF. Uses markdown-it + playwright.

Open-source browser automation and testing framework by Microsoft.

Request schema

Body: JSON · application/json

FieldTypeDescription
markdownstringrequired
formatstringoptionalenum: A4, Letter, Legal, A3, A5
landscapebooleanoptional
viewportWidthintegeroptional
viewportHeightintegeroptional
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/md-pdf \
  -H "Content-Type: application/json" \
  -d '{
  "markdown": "Hello, world!"
}'

402 payment flow omitted — see Integrations for settlement.