API URL
POST /api/v1/pdf-generation/from-url
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
url
required
string
Public http/https URL to render after SSRF validation
html
required
string
Sanitized HTML string input capped at 512000 characters
format
optional
string
PDF page format A4 Letter Legal Tabloid
responseType
optional
string
Response mode binary or base64
Example Request
Code
POST https://datpaq.com/api/v1/pdf-generation/from-url?api_key=your-api-keySuccessful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"pdfBase64": "JVBERi0xLjQK...",
"metadata": {
"source": "url",
"url": "https://example.com",
"format": "A4",
"byteLength": 12345,
"timingMs": 4200,
"landscape": true,
"pageRanges": "1",
"displayHeaderFooter": true
},
"correlationId": "req_abc123"
}Field
Type
success
boolean
pdfBase64
string
metadata
object
metadata.source
string
metadata.url
string
metadata.format
string
metadata.byteLength
number
metadata.timingMs
number
metadata.landscape
boolean
metadata.pageRanges
string
metadata.displayHeaderFooter
boolean
correlationId
string
status
string
service
string
version
string
error
string
Error Response
Example
Code
400 ValidationError - Invalid request body malformed options blocked destination or blocked redirect: Request rejected before successful render
401 AuthenticationError - Gateway rejects missing or invalid API key: Authentication failure before business handler
404 NotFound - Unknown endpoint path: No matching route for requested path
429 RateLimitError - Rate limiter threshold exceeded: Too many requests in active window
503 PoolSaturated - Browser pool at concurrency capacity: Service busy and unable to open new page
504 TimeoutError - Chromium navigation or rendering timed out: Rendering exceeded timeout threshold
500 GenerationError - Unexpected failure during rendering pipeline: Unhandled PDF generation failureLast Updated: May 4, 2026