Skip to content
jsontoimg
Start free
← All use cases

Certificate Generator API: Create PDF & PNG Certificates from JSON

An API certificate generator: name, course, date, and a QR Code layer. PNG for email or PDF billed per page.

Certificate Generator API: Automated PDF & PNG Certificates from JSON

jsontoimg provides a dedicated certificate generator API that automates the creation of verified completion certificates, diplomas, licenses, and accreditation awards. With one visual template in J2I Studio and one JSON object per recipient, our render engine fills names, dates, course titles, and scannable verification QR codes—delivering high-resolution PNGs for LinkedIn and email, or vector-sharp PDFs for high-quality printing.

The Anatomy of an Automated Certificate

A robust digital certificate requires more than static text replacement. It requires dynamic vector handling, tamper-evident verification, and reliable batch delivery:

  1. Auto-Fitting Text Layers: Names vary dramatically in length. In J2I Studio, set the full_name layer to auto-fit so long names like "Mariana Fernanda de Oliveira Rodrigues" shrink proportionately to fit the plate without overflowing margins.
  2. Dynamic Code Layers (QR & Barcodes): Add a native Code layer set to format qrcode. You don't need to generate separate QR images—simply pass the verification URL in layers.qr.text. jsontoimg draws the vector QR code directly onto the canvas.
  3. Multi-Page Vector PDF Output: Print-ready certificates demand vector crispness. Specifying "format": "pdf" generates vector-embedded PDF files billed at 1 credit per page.
  4. Tamper-Evident Verification IDs: Mint an RFC 9562 UUID (v4 or v7) per recipient. Print the credential ID on the plate and embed its verification URL into the QR code, turning the certificate into an unforgeable database record.

Generating a Single Certificate via REST

Issue an instant PDF or PNG certificate using POST /api/v1/render:

curl -X POST "https://app.jsontoimg.com/api/v1/render?wait=60" \
  -H "Authorization: Bearer $JSONTOIMG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "tpl_course_certificate",
    "version": 1,
    "format": "pdf",
    "layers": {
      "recipient_name": { "text": "Ada Lovelace" },
      "course_title": { "text": "Advanced Distributed Systems & Cloud Architecture" },
      "issue_date": { "text": "November 17, 2026" },
      "credential_id": { "text": "CRD-9482-UUIDv7" },
      "qr_code": { "text": "https://verify.example.com/crd/9482" }
    }
  }'

Batch Processing: Issuing Hundreds of Certificates

When graduating a cohort of 200 or 2,000 students, avoid firing hundreds of isolated single requests. Use POST /api/v1/renders/batch to process jobs in chunks of up to 50 certificates per request:

  • Cohort of 200: Four sequential or parallel batches of 50 jobs.
  • Webhook Delivery: Receive a webhook notification (render.completed) when each batch finishes, or stream events via SSE.
  • Failures Never Count: Failed jobs do not consume credits; your application can simply re-queue failed IDs without double-billing.

For a full code walkthrough on batching registration lists and handling webhook callbacks, read our Batch Certificate Generation Guide.

Print Legibility & Contrast Standards

Certificates are frequently printed and framed. Ensure your template design conforms to accessible contrast standards:

  • Maintain WCAG 2.1 contrast minimums: 4.5:1 for body copy and 3:1 for large display headers. Light gold text on cream paper often disappears when printed.
  • Test edge cases in J2I Studio before running cohorts: verify names with diacritics, hyphenated surnames, and long course descriptions.

Related Resources & Tutorials

Frequently Asked Questions

What is a certificate generator API?

A certificate generator API is a programmatic service that takes structured JSON data (names, course titles, dates, credential UUIDs) and dynamically renders personalized, high-resolution certificates (PNG, JPG, or PDF) based on visual templates.

Does jsontoimg support QR codes for verification?

Yes. With native Code layers, you specify format qrcode and provide the destination URL in layers.<layer_name>.text. The API renders the vector QR code directly onto the certificate without requiring external QR generation services.

Can I generate multi-page certificates or diplomas?

Yes. Templates designed with multiple pages in J2I Studio render directly as multi-page PDFs when requested with "format": "pdf". Each PDF page costs exactly 1 credit.

How does batching work for graduating classes?

You can submit up to 50 certificate render jobs in a single request to POST /api/v1/renders/batch. Track batch status via webhooks or server-sent events (SSE).

How much does certificate generation cost?

jsontoimg Starter is $29/mo for 1,000 certificates or PDF pages ($0.029/cert). Prepaid packs start at $5 for 250 certificates ($0.020/cert) with credits that never expire.

Get 25 free images →

Your first 25 images are on us.

Design a template, grab an API key, and render your first PNG or PDF in minutes. No card required.