# Papermill > Turn markdown or JSON into real Office documents (.docx, .xlsx, .pptx), > returned as bytes. Pay per call with USDC via x402 — no accounts, no API > keys, nothing stored. ## Endpoints - POST /v1/docx — $0.005 — body: markdown (Content-Type: text/markdown) or JSON {"markdown": "..."}. Returns .docx bytes. - POST /v1/xlsx — $0.005 — body: JSON {"sheets": [{"name", "rows", "header", "columns", "autofilter"}]} (or top-level "rows" for one sheet). Cell strings starting with "=" become live formulas. Returns .xlsx bytes. - POST /v1/pptx — $0.01 — body: JSON {"slides": [{"layout": "title|content|section|blank", "title", "subtitle", "bullets", "notes", "images"}]}. Returns .pptx bytes. - POST /v1/validate — FREE — body: {"format": "docx|xlsx|pptx", "input": ...}. Returns {"valid": bool, "errors": [{"path", "message"}]}. Integrate here before paying. ## Behavior - Send "Accept: application/json" to get {"filename", "content_base64"} instead of raw bytes. - Payment: x402 v2, scheme "exact", USDC. An unpaid POST returns 402 with the exact payment requirements (amount, payTo, network) — sign and retry with the X-PAYMENT header. Invalid input returns 422 and is never charged. - Deterministic output: the same input always produces byte-identical files (safe to cache/verify). - Caps: 1 MB request; 200 markdown pages / 50,000 cells / 60 slides; images base64-embedded only (max 5 MB decoded); remote image URLs are rejected. - 15 s generation timeout. Nothing is stored; request content is never logged. ## Machine-readable - OpenAPI: /openapi.json