API Endpoints
Available endpoints for the GenPDF API
Endpoint Version
Switch between v2 and v1 to see the correct endpoints and response formats.
v2 - New, Faster & Reliable
Recommended async workflow. First create a job, then check its status using the job ID.
| Method | Endpoint | Description |
|---|---|---|
| POST | /public/v2/generate-pdfCreate PDF Job | Creates a PDF generation job and returns a queued response with a job ID. |
| GET | /public/v2/jobs/{job_id}Check Job Status | Checks the status of an existing PDF job and returns progress or the finished PDF URL. |
Create PDF Job
Creates a PDF generation job and returns a queued response with a job ID.
POST
/public/v2/generate-pdfExample Request
curl -X POST "https://api.genpdf.app/public/v2/generate-pdf" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"prompt":"Create a simple invoice PDF for John Doe - $500"}'Example Responses
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-1234567890",
"status": "queued",
"check_status_url": "https://api.genpdf.app/public/v2/jobs/a1b2c3d4-e5f6-7890-abcd-1234567890"
}{ "error": "Invalid or missing API key" }
{ "error": "Rate limit exceeded. Try again in 60s" }Notes
- This endpoint starts the job and returns queued metadata.
- It does not return processing, completed, or failed states.
Check Job Status
Checks the status of an existing PDF job and returns progress or the finished PDF URL.
GET
/public/v2/jobs/{job_id}Example Request
curl "https://api.genpdf.app/public/v2/jobs/a1b2c3d4-e5f6-7890-abcd-1234567890" -H "Authorization: Bearer YOUR_API_KEY"
Example Responses
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-1234567890",
"status": "processing"
}{
"job_id": "a1b2c3d4-e5f6-7890-abcd-1234567890",
"status": "completed",
"pdf_url": "https://bjubpqvkpmjxnbmgqfdx.supabase.co/storage/v1/object/public/pdfs/a1b2c3d4.pdf"
}{
"job_id": "a1b2c3d4-e5f6-7890-abcd-1234567890",
"status": "failed",
"error": "Failed to generate PDF: Invalid prompt or generation timeout",
"prompt": "Create a simple invoice PDF"
}{ "error": "Invalid or missing API key" }
{ "error": "Job not found" }
{ "error": "Rate limit exceeded. Try again in 60s" }Notes
- Poll this endpoint using the job_id returned by the create-job call.
- Use pdf_url when the status becomes completed.