API Overview
The Pdflet API is a RESTful JSON API for generating PDFs from HTML content.Base URL
All API requests should be made to:Request Format
- All requests must include a
Content-Type: application/jsonheader - Request bodies must be valid JSON
- Authentication is required for all endpoints
Response Format
All responses return JSON with consistent structure:Success Response
Error Response
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async processing started) |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing authentication |
402 | Payment Required - No credits remaining |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Rate Limits
Rate limits vary by plan:| Plan | Requests per Minute |
|---|---|
| Free | 10 |
| Starter | 30 |
| Pro | 100 |
Pagination
List endpoints support pagination via query parameters:| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
page_size | 20 | Items per page (max 100) |
Idempotency
For safe retries, include anIdempotency-Key header: