API Reference
Complete reference for the Paperbase REST API.
The Paperbase REST API lives at https://api.paperbase.dev. The full OpenAPI 3.1 spec
is available at api.paperbase.dev/openapi.json.
Authentication
Pass your API key as a Bearer token:
Free tier: 100 renders/month, no credit card required.
POST /v1/pdf/generate
Generate a PDF from Markdown or HTML.
Request body
Input types
Markdown:
HTML:
Theme
RenderOptions
Response 200
A 200 with non-empty warnings is still a success — the PDF was rendered. See
Warning catalog for what each warning means and how to fix it.
Error responses
| Status | Code | Meaning |
|---|---|---|
400 | INVALID_REQUEST | Malformed body |
401 | UNAUTHORIZED | Missing or invalid API key |
422 | RENDER_FAILED | Rendering failed; details in error.details |
429 | QUOTA_EXCEEDED | Monthly render limit reached |
GET /v1/pdf/:jobId
Retrieve a previously generated PDF by job ID.
Returns the same shape as the generate response.
POST /v1/keys
Create a new API key for the authenticated workspace.
The key field in the response is returned once only — store it securely.
OpenAPI spec
The spec is also served locally at /api/openapi during development.