{"service":"MacStrong API","version":"3.0.0","description":"PDF generation and document processing","endpoints":{"POST /pdf":"Generate PDF — send \"html\" for browser engine, \"markdown\" or \"document\" for VMPrint engine — 10 credits","POST /pdf-to-img":"Convert PDF page to rasterized image (PNG/JPG) — 10 credits","GET /usage":"Current credit usage and limits","GET /health":"Health check","GET /":"API documentation"},"credits":{"per_request":10,"description":"All endpoints cost 10 credits per request"},"action_pattern":{"description":"All generation endpoints accept an optional \"action\" object to control output delivery","actions":{"return":{"name":"return","description":"Default. Streams raw binary data back in the response."},"upload":{"name":"upload","url":"SIGNED_PUT_URL","description":"Pipes generated file directly to a signed URL via PUT. Returns JSON confirmation."}}},"authentication":"Bearer token or X-API-Key header required","examples":{"pdf_html":{"url":"/pdf","method":"POST","body":{"html":"<h1>Hello</h1>"},"note":"Uses browser engine (Puppeteer)"},"pdf_markdown":{"url":"/pdf","method":"POST","body":{"markdown":"# Invoice\n\n| Item | Price |\n|------|-------|\n| Widget | $10 |"},"note":"Uses VMPrint engine (no browser needed)"},"pdf_upload":{"url":"/pdf","method":"POST","body":{"html":"<h1>Hello</h1>","action":{"name":"upload","url":"https://s3.example.com/signed-put-url"}}},"pdf_to_img":{"url":"/pdf-to-img","method":"POST","body":{"url":"https://example.com/doc.pdf","page":1,"format":"png","scale":2}}}}