A certificate generator API turns a list of recipients into one finished file each. The rendering is the easy part. The work that decides whether the certificates hold up is the identifier, the batching, and the page that proves one is real.
The pipeline
- Design one template with named layers:
full_name,course,date,credential_id, and a Code layer for the QR. - Send one JSON object per recipient to
POST /api/v1/render, withformatset topngfor email orpdffor print. - Batch the list. One batch is 50 jobs, so a cohort of 200 is four batches.
- Collect results by webhook or
wait, keyed by attendee id. - Serve a verification page the QR points to.
{
"template": "<design-id>",
"format": "pdf",
"layers": {
"full_name": { "text": "Ada Lovelace" },
"course": { "text": "Intro to JSON renders" },
"qr": { "text": "https://verify.example/c/0190a7e2-5b1c-7c3e-9f00-2a6d1e4b8c11" }
}
}
PNG or PDF
| Format | Use it for | Credit cost |
|---|---|---|
| PNG, JPG, WebP | Email, LinkedIn, a profile page | 1 per image |
| Anything that gets printed | 1 per page |
Identifiers that can be verified
Use an RFC 9562 UUID, not certificate number 41. A sequential id tells the holder how many you have issued and lets anyone walk to a neighbour’s record. The QR should encode the verification URL containing the id, and the page behind it is what turns a picture into a lookup. A QR code alone proves nothing, because anyone can edit a PNG, but nobody can forge a row in your database.
Legibility on paper
Certificates are printed. WCAG 2.1’s contrast minimum asks for 4.5:1 for body text and 3:1 for large text, and a light-grey name on cream fails that on every copy. Check it once in the template and the whole cohort inherits the result.
Retries and cost
Failed jobs are free, so resend only the failures. A webhook delivers eventId for idempotency; store it and skip repeats. 200 one-page PDFs cost 200 credits, which is $4.00 at the prepaid rate of $0.02 per image.
Go deeper
- Certificate of Completion: 6 Fields Worth Making Layers
- Build a Certificate Generator with QR Layers
- Event Ticket Generator: QR Codes from a Registration List
- PDF Generation API: Multi-Page Templates, Per-Page Credits
- Use cases: certificates, event tickets, name badges, and coupons
FAQ
What is a certificate generator API?
A service that takes a certificate template and a JSON object per recipient and returns a PNG or PDF. jsontoimg fills named layers and draws a QR from a Code layer.
How many certificates can I issue at once?
One batch holds 50 jobs. A cohort of 500 is ten batches, each tracked by attendee id, with failed jobs retried at no cost.
How do I make certificates verifiable?
Print an RFC 9562 UUID on the certificate, encode a verification URL containing it in the QR, and host a page that confirms the id exists in your database.
How much does it cost to issue 200 certificates?
200 one-page PDFs use 200 credits. At the prepaid rate of $0.02 per image that is $4.00, and prepaid packs never expire.
Related Resources
- How JSON-to-image conversion works — the pillar guide
- Certificates use case — the template pattern
- PDF renders docs — format reference
- Batch renders docs — 50-job batches