JSONtoIMG

Author: Balaji

  • Image Generation MCP Server: The Render Loop in 11 Tools

    An MCP server for image generation lets an agent in Cursor, Claude Desktop, or VS Code render images without hand-written HTTP clients. jsontoimg's server exposes eleven tools shaped around one loop: find a template, read its schema, render, and fetch the result. It is not a text-to-image model; the agent fills a template you designed.

    Connect

    Create an API key, open Integrations, then MCP, in the dashboard for copy-paste config, and point your client at the HTTP endpoint at /mcp. The endpoint accepts an API key only; sessions are not accepted. The Model Context Protocol specification describes the transport, and Cursor documents client setup in its MCP guide.

    For background on how clients discover and call tools, read the MCP introduction.

    The eleven tools

    Tool Purpose
    list_templates A page of templates (name and description); pass offset while hasMore is true
    get_template_schema Named layers and attributes for a template
    create_render Queue a render
    wait_for_render Long-poll until done or failed
    get_render Job status
    get_render_asset_url Signed download URL that works in <img>
    create_batch Queue up to 50 jobs
    get_batch Batch status and child jobs
    sign_image_url Mint a signed CMS or Open Graph URL
    sign_image_urls Mint up to 50 signed URLs; does not queue renders
    get_signed_image Fetch a signed image and return its bytes

    The agent flow

    1. list_templates, then pick the template that matches the prompt.
    2. get_template_schema to learn the layer names.
    3. create_render with layers, then wait_for_render.
    4. Return get_render_asset_url to the user.

    For <img> or og:image links, call sign_image_url instead. That path mints a URL without queuing a render.

    Why a small surface helps

    An agent chooses tools by their names and descriptions, and a broad suite adds ways to choose wrong. This server does the render loop and nothing else: no social publishing, no video, no account management. Give each template a clear description and name its layers like fields, headline and price, because the schema is all the agent sees.

    What to watch

    • Credits. Each render consumes the same credits as any API call. Put a spending cap on any agent you leave unattended.
    • Template quality. A template with layers named text1 and text2 produces bad renders from a good agent.
    • Scope. The agent can only fill layers. It cannot redesign the template.

    The agent-side overview is on the agents page, and the other trigger types are in the Image Automation API guide.

    FAQ

    What is an MCP server for image generation?

    A server that exposes image rendering as tools an AI agent can call. jsontoimg's has eleven tools covering templates, renders, batches, and signed URLs.

    Is the jsontoimg MCP server an AI image generator?

    No. The agent fills named layers on a template you designed. It does not invent images from a prompt.

    How do I authenticate to the MCP server?

    Use an API key against the HTTP endpoint at /mcp. Sessions are not accepted. Copy-paste config is in the dashboard under Integrations, then MCP.

    Can an agent render Open Graph images?

    Yes. It calls sign_image_url, or sign_image_urls for up to 50, to mint signed URLs without queuing renders.

    Related Resources

  • Zapier and Make Image Generation: The HTTP Step, Honestly

    Zapier and Make image generation with jsontoimg both use an HTTP step today. Native Zapier and Make apps are not shipped. That is a smaller gap than it sounds, because any tool that can send a JSON POST can render, and the request body is six lines.

    The request

    In Zapier use Webhooks by Zapier with a custom request. In Make use the HTTP module's "Make a request". Both need the same three things:

    • Method and URL: POST https://app.jsontoimg.com/api/v1/render?wait=60
    • Header: Authorization: Bearer <your key>, per the Authorization header convention
    • Body:
    {
      "template": "<design-id>",
      "format": "png",
      "layers": { "headline": { "text": "Welcome, Alex" } }
    }
    

    Map the earlier step's fields into layers. With wait=60 the response comes back when the job finishes, and a done job includes a signed assetUrl.

    Use the result

    assetUrl works in an <img> tag or an email with no key attached. Pass it to the next step: Gmail, Slack, Google Drive, or a CMS. If your next step needs the bytes, add a second HTTP step that fetches the URL.

    What to expect

    Concern Behaviour
    Long renders wait blocks for 60 seconds at most; beyond that, poll the job or use a webhookUrl
    Retries A repeated step sends a second request. Dedupe on your own record id first, since POST is not idempotent
    Cost Failed jobs are free; a quota overrun returns 402
    Unknown layer name 422 error, so the zap or scenario fails loudly instead of shipping placeholder text

    Native versus HTTP

    n8n has a community node, WordPress has a plugin, and Airtable and Sheets have add-ons. Zapier, Make, and Pipedream use HTTP. If you want the node-style experience with typed operations, use n8n. If you already live in Zapier or Make, the HTTP step costs one extra configuration screen.

    Trigger options across all of these are in the Image Automation API guide, and the request reference is in the HTTP docs.

    FAQ

    Does jsontoimg have a native Zapier app?

    No. A native Zapier app is not shipped. Use Webhooks by Zapier to send a POST to /api/v1/render, which works with the same body as every other client.

    Does jsontoimg work with Make?

    Yes, through the HTTP module. Native Make apps are not shipped, but the module can call POST /api/v1/render with a Bearer key and a JSON body.

    How do I get the image URL back in Zapier or Make?

    Send the render with ?wait=60. A finished job returns a signed assetUrl you can pass to the next step or embed in an email.

    What if a Zap retries and renders twice?

    POST is not idempotent, so dedupe on your own record id before the HTTP step. Failed jobs are free, but a duplicate successful job uses a credit.

    Related Resources

  • n8n Image Generation: The Community Node Workflow

    An n8n image generation workflow with the jsontoimg community node is three steps long: get the schema, create the render, download the file. The node covers templates, renders, batches, and signed images, so you rarely need the raw HTTP Request node.

    Install

    n8n 1.60.0 or later is required. In Settings, open Community nodes, choose Install, and enter @j2i/n8n-nodes-j2i. Self-hosted instances must enable community packages with N8N_COMMUNITY_PACKAGES_ENABLED, as described in the community nodes installation guide and the environment variable reference.

    Add jsontoimg API credentials with your key. Requests send Authorization: Bearer <key> to /api/v1, and signed image downloads do not send the key.

    The three-step flow

    1. Template, Get Schema returns the named layers, optionally pinned to a version.
    2. Render, Create with wait in the payload:
    {
      "format": "png",
      "wait": 60,
      "layers": { "headline": { "text": "{{ $json.title }}" } }
    }
    
    1. Render, Download Asset returns the image as binary for the next node, such as email, Drive, or Slack.

    The template is the Template field, not part of the JSON. If wait is a number, Create blocks until the job finishes, up to 60 seconds. Without wait it queues the job, and you follow with Wait, Get, or Download Asset.

    Operations at a glance

    Resource Operations
    Template Get Many, Get Schema
    Render Create, Wait, Get, Get Asset URL, Download Asset
    Batch Create (up to 50 jobs), Get
    Signed Image Sign, Sign Many (up to 50), Download

    Many rows

    Do not loop a 500-row sheet through single waits. Use Batch, Create in groups of 50, or pass a webhook URL and let n8n receive render.completed. Signed Image, Sign Many mints up to 50 URLs without queuing renders, which is the right tool for CMS and Open Graph links.

    Use it from an AI agent

    The node is marked usableAsTool, so an n8n AI agent can call it. Give the agent templates with clearly named layers, because the layer names are the only interface it sees.

    Where this fits

    n8n covers the event-driven case that the Sheets and Airtable buttons cannot. See the Image Automation API guide for the comparison, and the n8n docs for the full reference.

    FAQ

    Is there an n8n node for jsontoimg?

    Yes. Install the community node @j2i/n8n-nodes-j2i in n8n 1.60.0 or later. It covers templates, renders, batches, and signed images.

    How do I get the image as a file in n8n?

    Use Render, Download Asset. It returns the image as binary data, ready for an email, Drive, or Slack node.

    How many images can one n8n batch render?

    Batch, Create accepts up to 50 jobs. For larger lists, queue several batches or use webhooks instead of waiting in the node.

    Can an n8n AI agent use jsontoimg?

    Yes. The node is marked usableAsTool, so n8n AI agents can call it. Name template layers clearly so the agent knows what to fill.

    Related Resources

  • Airtable Image Automation: Render Selected Records

    Airtable image automation with jsontoimg runs as a custom extension. You select records, click Render selected, and the extension writes the signed image URL back, and optionally uploads the file into an attachment field. Three constraints decide whether it suits you: the plan, the token, and the file size.

    Requirements

    • An Airtable Pro or Enterprise workspace for collaborators to run custom extensions. You can develop against any base where you have creator permission.
    • The Blocks CLI: install @airtable/blocks-cli, run block init, copy in the jsontoimg frontend, then block run.
    • A jsontoimg API key, plus an Airtable personal access token with data.records:write if you want attachment write-back. Airtable describes tokens in personal access tokens.

    block run listens on https://localhost:9000. That address is a dev server, not a webpage: opening it in a browser tab shows "Not found", and that is expected. Paste it into Edit extension inside Airtable and accept the self-signed certificate once.

    First render

    1. Pick a table, template, and format.
    2. Map each layer to a field. Text layers stringify the field; image layers take the first attachment URL or an http string.
    3. Choose a URL field, an attachment field, or both.
    4. Select records in the grid and click Render selected.

    Each record mints a signed URL, writes it to the URL field, then downloads the file, retrying on 503, and uploads the bytes to the attachment field.

    Limits

    Limit Value
    Records per run 50 selected
    Attachment upload 5 MB per file
    Trigger A button; it does not fire on record create or update
    Key visibility Collaborators who can edit the base can read the stored keys

    The last row matters. Credentials live in the extension's globalConfig, so create keys you can revoke and do not reuse your main one.

    When to use something else

    Event-driven work, such as "render when a record enters Approved", needs an automation that can listen for changes. Use n8n or an HTTP step. A 5 MB attachment cap also rules out very large high-scale PNGs; send those to a URL field and skip the attachment.

    The overview of triggers is in the Image Automation API guide.

    FAQ

    Can I generate images from Airtable records?

    Yes. Install the jsontoimg custom extension, map fields to template layers, select up to 50 records, and render. The signed URL is written back, and the file can be uploaded as an attachment.

    Do I need a paid Airtable plan?

    Collaborators need a Pro or Enterprise workspace to run custom extensions. You can develop against a base where you have creator permission.

    Why does localhost:9000 show Not found?

    It is the Blocks CLI dev server, not a webpage. Paste the URL into Edit extension in Airtable; it is not meant to be opened in a tab.

    Does the extension run when a record changes?

    No. It runs when you click Render selected. For triggers on create or update, use n8n or an HTTP step.

    Related Resources

  • Google Sheets Image Generation: Render Selected Rows

    Google Sheets image generation with jsontoimg is a button, not a background job. You select rows, click Render selected, and each row becomes a signed image URL written back into the sheet. Knowing that up front prevents the most common misunderstanding about it.

    How it works

    The add-on is an Apps Script project you install with clasp. You map header columns to named layers, choose a template and format, and pick where results go. For each selected row it mints POST /api/v1/img/sign, warms the signed GET /api/v1/img/{template} URL, and writes that URL to a URL column. For PNG, JPG, WebP, and AVIF it also inserts the image into the cell with SpreadsheetApp.newCellImage.

    Set up

    1. Create an API key under Integrations, then API keys.
    2. In the sidebar open Settings, paste the key, and click Test connection. Leave Base URL blank for the hosted service.
    3. Pick the header row, template, and format.
    4. Map each layer to a column. Text layers stringify the cell; image layers take an http or https URL.
    5. Choose a URL column, an image column, or both.

    The key is stored in UserProperties for your Google account, and the mapping lives in DocumentProperties on the spreadsheet. Use a dedicated key you can revoke.

    Limits to plan around

    • 50 selected rows per run. The header row is skipped. A 500-row sheet is ten runs.
    • Button-driven. It does not run when a cell changes. For edit-driven or scheduled work, use n8n or an HTTP step.
    • In-cell images are raster only. PDF returns a URL, not a picture in the cell.
    • First fetch bills a credit. Re-running a row with identical values is a cache hit; changing a value renders again.

    If the first render is still running, the signed URL responds 503, and the add-on retries for you.

    A sheet layout that works

    name course photo_url image_url (result)
    Ada Lovelace JSON renders https://example.com/ada.jpg written back

    Keep one row per output file and one column per changing layer. Anything constant stays in the template, not a column.

    Where it fits

    For a one-off cohort or a catalog refresh that a person triggers, this is the shortest route. For recurring automation, use the pattern in the Image Automation API guide. Apps Script itself is documented at developers.google.com/apps-script.

    FAQ

    How do I generate images from Google Sheets?

    Install the jsontoimg Apps Script add-on, map columns to template layers, select up to 50 rows, and click Render selected. Each row's signed image URL is written back to the sheet.

    Does the Sheets add-on run automatically on edit?

    No. It is button-driven and renders only the rows you select. For edit-driven automation, use n8n or an HTTP step.

    Can I render more than 50 rows?

    Run it again on the next 50. The cap is 50 selected rows per run, so a 500-row sheet takes ten runs.

    Can the sheet show PDFs as in-cell images?

    No. In-cell images work for PNG, JPG, WebP, and AVIF only. PDF output is written as a URL.

    Related Resources

  • Image Automation API: Row In, Image Out

    An image automation API connects a data row to a finished image without a person opening a design tool. The rendering call is the same everywhere. What differs is the trigger: who or what decides that a row needs an image. Choose the trigger first and the tooling follows.

    Three trigger types

    Trigger Tools Fits
    A person selects rows and clicks Google Sheets add-on, Airtable extension Ops teams generating a batch on demand
    An event fires n8n node, HTTP from Zapier or Make, webhooks, the WordPress plugin Signups, orders, new posts
    An agent decides MCP server Cursor, Claude Desktop, and other MCP clients

    All of them use the same /api/v1 contract, so a template built for one works in the others.

    What is native and what is HTTP

    Tool Status
    n8n Community node, @j2i/n8n-nodes-j2i
    WordPress Plugin v1.0.0 with block, shortcode, and PHP helpers
    Google Sheets Apps Script add-on, 50 selected rows per run
    Airtable Custom extension, 50 selected records per run
    MCP Hosted endpoint, 11 tools
    Zapier, Make, Pipedream Not native; use an HTTP step

    Saying "native" for Zapier or Make would be wrong, so this guide does not.

    The loop every tool runs

    1. Get the schema so you know the layer names.
    2. Create a render with ?wait=60 for one row, or a batch of up to 50 for many.
    3. Use the result. Done jobs return a signed assetUrl that works in <img> and email without an API key.

    For backlogs, queue batches of 50 and let a webhook announce completion instead of holding a connection open. The batch guide is in Batch Image Generation: 50 Jobs at a Time.

    Pick by volume

    Under about 50 rows, a button in a sheet is enough. A recurring or event-driven flow belongs in n8n or an HTTP step. If the asker is a language model, give it the MCP server and a template whose layers have clear names. The Model Context Protocol defines how those tools are exposed.

    Go deeper

    The n8n community node install guide covers the install step, and Zapier documents its webhook integration.

    FAQ

    What is an image automation API?

    An API that turns structured data, such as a spreadsheet row or a webhook payload, into a finished image with no manual design step. jsontoimg does this by filling named layers on a template.

    Does jsontoimg have a Zapier or Make app?

    No. Native Zapier and Make apps are not shipped. Both can call the render API from an HTTP step with the same request body used everywhere else.

    Which tool should I use to automate image generation?

    Use the Sheets add-on or Airtable extension for button-driven batches, n8n or HTTP for event-driven flows, and the MCP server when an AI agent makes the request.

    Can one template work across all these tools?

    Yes. Every tool uses the same /api/v1 contract and named layers, so a template designed once renders from any of them.

    Related Resources

  • Multi-Page PDF Generation API: Templates and Per-Page Credits

    A PDF generation API usually means one of two things: converting HTML, Markdown, or a URL to PDF, or filling a designed template and exporting it. jsontoimg is the second kind. Set format to pdf on the same render call you use for images, and a multi-page template becomes a multi-page PDF.

    The request

    curl -X POST "$JSONTOIMG_BASE_URL/api/v1/render?wait=60" \
      -H "Authorization: Bearer $JSONTOIMG_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"template":"<design-id>","format":"pdf","layers":{"full_name":{"text":"Ada Lovelace"}}}'
    

    Layer overrides work exactly as they do for images, and so do wait, batch, and webhooks. A misspelled layer name returns 422 Unprocessable Content instead of a PDF with placeholder text.

    What a PDF costs

    One credit per page.

    Output Credits
    1-page certificate 1
    5-page proposal 5
    12-page report 12
    One PNG of the same design 1

    Failed jobs are free, and a quota overrun returns 402 Payment Required. At the prepaid rate of $0.02 per image, a 12-page report costs $0.24. Design to the page count you need: a template with a spare page costs a credit on every render.

    Rules to know

    • transparent is not valid with PDF. It works with PNG, WebP, and AVIF only.
    • wait blocks for at most 60 seconds. Longer jobs return a job id; use a webhook or poll.
    • A batch accepts up to 50 jobs, and each job sets its own format.
    • Layout comes from the editor. Content that must reflow, such as a table that grows to a second page by itself, belongs in a template where you chose the page count.

    What it does not do

    jsontoimg does not turn arbitrary HTML, Markdown, or a live URL into a PDF. Tools such as APITemplate.io are built around HTML-to-PDF. If your source is a web page, use a tool that renders web pages. If your source is a design with named fields, this is the shorter path.

    Pairing PDF with PNG

    Many certificate and ticket flows render both: a PNG for the email body and a PDF for printing, from the same template and payload. That is two credits per recipient. The pipeline is in the bulk certificate generation from a CSV, and the format reference is in the PDF docs. The PDF format overview covers what the file type guarantees.

    FAQ

    How does jsontoimg generate PDFs?

    Send POST /api/v1/render with format set to pdf. A multi-page template becomes a multi-page PDF, and layer overrides work as they do for images.

    How are PDFs billed?

    One credit per page. A 12-page report uses 12 credits, a failed job uses none, and prepaid packs work out to $0.02 per image.

    Can I convert HTML or a URL to PDF with jsontoimg?

    No. jsontoimg renders designs from its editor with named layers. For arbitrary HTML, Markdown, or URL conversion, use a tool built for that.

    Can I make a transparent PDF?

    No. The transparent option is not valid with PDF and works only with PNG, WebP, and AVIF.

    Related Resources

  • QR Code Ticket Generator: Registration List to Scannable Passes

    QR Code Ticket Generator: From Registration List to Scannable Passes

    Looking for the commercial overview and format specs? Visit our dedicated Event Ticket Generator API hub.

    A QR code ticket generator transforms attendee registration records into branded, scannable passes with tamper-evident barcodes. While rendering an image takes under 300ms, building a production door check-in system requires handling symbology choices, request idempotency, HMAC signing, and offline scanner verification.

    Here is how to architect an end-to-end registration-to-ticket pipeline using jsontoimg's native vector Code layers.

    The Production Event Flow

    1. Attendee Registers: An attendee submits a registration form (via your backend, Stripe Checkout, or Eventbrite webhook).
    2. Backend Mints Cryptographic Ticket ID: Generate an RFC 9562 UUID v7 and append an HMAC-SHA256 signature.
    3. Dispatch Render Request: Call POST /api/v1/render with format: "png" or "pdf", passing attendee fields and the signed ticket string in the Code layer.
    4. Deliver Asset: Send the signed assetUrl directly inside confirmation emails or mobile push notifications.
    {
      "template": "tpl_conference_pass",
      "version": 1,
      "format": "png",
      "layers": {
        "name": { "text": "Grace Hopper" },
        "tier": { "text": "General Admission" },
        "gate": { "text": "Gate 4, Hall B" },
        "code": { "text": "TKT-0190a7e2-5b1c-7c3e.f9a8b2c1d4" }
      }
    }
    

    Symbology: QR Codes vs Barcodes for Venue Scanners

    jsontoimg native Code layers support four vector formats:

    • qrcode: Best for mobile screens, Apple Wallet/Google Wallet cards, and general smartphone cameras.
    • code128: Industry-standard 1D high-density barcode for handheld laser scanners at high-throughput turnstiles.
    • ean13 & code39: Legacy retail and badge tracking symbologies.

    Verify venue hardware capabilities before finalizing your template design to ensure rapid read rates at entry gates.

    Idempotency: Never Issue Duplicate Tickets

    HTTP POST is non-idempotent by default (RFC 9110). If a webhook fires twice or a network blip causes a retry, you risk minting duplicate passes.

    • Deduplicate on Order/Attendee ID: Check your database before initiating a render.
    • Verify Webhook Signatures: Inbound webhooks from jsontoimg carry an X-Render-Signature header (HMAC-SHA256 over raw request body as defined in RFC 2104). Verify this signature to ensure authenticity.
    • Track by eventId: Each batch or render event includes a unique eventId. Discard repeated deliveries.

    Batching Pre-Registration Runs

    When issuing passes for a 500-attendee cohort before an event:

    • Batch jobs in chunks of 50 via POST /api/v1/renders/batch.
    • Ten 50-job batches process in parallel or sequential queues.
    • Synchronous individual registrations at checkout use ?wait=30 for instant delivery.

    Security at the Door

    jsontoimg draws the visual pass and encodes the vector barcode; your door check-in app verifies it. Build an offline verification step into your mobile scanner that validates the HMAC signature locally, ensuring instant validation even if convention center Wi-Fi drops.

    Related Resources

    Frequently Asked Questions

    How do I generate event tickets with QR codes automatically?

    Capture registration submissions via webhooks, generate a secure ticket ID with an HMAC signature, and send a POST request to jsontoimg specifying your template and named Code layer. Email the resulting asset URL to the attendee.

    Which barcode format works best for mobile tickets?

    QR codes (qrcode) are ideal for mobile screens because smartphone cameras and modern 2D imagers scan them from any angle. For dedicated 1D laser turnstile scanners, code128 is recommended.

    How do I prevent duplicate tickets when requests retry?

    Use your internal database attendee ID as an idempotency key before dispatching render jobs, and log eventId tokens delivered by render webhooks.

    Get 25 free images →

  • Certificate of Completion: 6 Fields Worth Making Layers

    A certificate of completion looks like one design, but only some of it changes per person. Making everything a layer produces a fragile template. Making too little a layer produces a hand-edited one. These six fields are the ones worth naming.

    The six layers

    Layer Why it changes Watch for
    full_name One per recipient Long names; turn on auto-fit and test the worst case
    course One per programme Titles of two lines or more
    date Per completion Format it before sending; the API does not localize dates
    credential_id One per certificate Use an RFC 9562 UUID, not a counter
    qr (Code layer) Verification link Payload is your URL with the id in it
    signature (image layer) Per issuer, if you have several Must be a public https file ending .png, .jpg, .jpeg, or .webp

    Everything else stays in the design: border, logo, seal, and the fixed sentence "has successfully completed". Locking it means a typo fix is one template edit, not 200 corrections.

    Test with the names that break layouts

    Size for the longest realistic name, not "Ada Lovelace". Render at least these before the run:

    • A two-word name and a six-word name, such as "Mariana Fernanda de Oliveira Rodrigues"
    • A name with diacritics
    • A course title that wraps to two lines
    • A name in a non-Latin script, if your audience has them

    Use dryRun first

    Send "dryRun": true (or ?dryRun=1) with the real payload. It validates layer names and values and returns { "valid": true } with no job and no credit. A misspelled layer returns 422 instead of a certificate with placeholder text, as described under 422 Unprocessable Content.

    Colour and contrast

    Check the name against the background once, in the template. WCAG 2.1 asks for 4.5:1 for body text and 3:1 for large text, and the check applies to every certificate you issue.

    The QR is only as good as the page

    The QR code carries a string. Make the string a URL on your domain, and make that page confirm the id. The pipeline around this is in the bulk certificate generation from a CSV, and the full request is in the certificates use case.

    FAQ

    What fields go on a certificate of completion?

    Recipient name, course title, completion date, a credential id, and a verification QR. An issuer signature is a sixth layer when several people sign.

    How do I stop long names overflowing?

    Turn on auto-fit for the name layer and test the longest realistic name before the run, not the demo name.

    Can I validate a certificate payload without spending credits?

    Yes. Send dryRun: true with the real payload. jsontoimg validates layers and values and returns valid: true with no job and no credit.

    Why use a UUID for the credential id?

    A sequential number reveals how many certificates you issued and lets anyone guess a neighbour's id. An RFC 9562 UUID cannot be guessed.

    Related Resources

  • Bulk Certificate Generation from a CSV or Registration List

    Batch Certificate Generation: From Registration List to 50 PDFs

    Looking for the commercial API overview? Visit our primary Certificate Generator API hub to review features, print contrast guidelines, and template layer models.

    Automating certificate generation for hundreds of course graduates or event attendees requires an efficient batching architecture. While rendering an individual certificate is trivial, generating a cohort of 500 or 5,000 certificates demands chunked batch ingestion, idempotent webhook handling, and error-tolerant retries.

    Here is the exact pipeline for ingesting a registration list and exporting print-ready vector PDFs using the jsontoimg Batch API.

    The 5-Step Batch Pipeline

    1. Design the Master Template: In J2I Studio, establish named layers for full_name, course, date, credential_id, and a vector Code layer (format qrcode) for online verification.
    2. Chunk Attendees into Batches of 50: jsontoimg accepts up to 50 render jobs in a single request to POST /api/v1/renders/batch. A cohort of 200 attendees is divided into four 50-job batches.
    3. Submit Batch Payload: Pass an array of jobs, each containing attendee-specific layer overrides and format settings (format: "pdf" or "png").
    4. Collect Asynchronous Renders: Monitor batch progress via Server-Sent Events (SSE) or handle incoming render.completed webhook events.
    5. Serve Verification Lookup: Direct the rendered QR code to a verification URL that proves certificate authenticity against your database.

    Batch Payload Example (POST /api/v1/renders/batch)

    {
      "template": "tpl_cohort_cert",
      "version": 1,
      "format": "pdf",
      "jobs": [
        {
          "id": "att_101",
          "layers": {
            "full_name": { "text": "Ada Lovelace" },
            "course": { "text": "Systems Engineering" },
            "credential_id": { "text": "0190a7e2-5b1c-7c3e" },
            "qr": { "text": "https://verify.example.com/c/0190a7e2-5b1c-7c3e" }
          }
        },
        {
          "id": "att_102",
          "layers": {
            "full_name": { "text": "Charles Babbage" },
            "course": { "text": "Systems Engineering" },
            "credential_id": { "text": "0190a7e2-5b1c-7c3f" },
            "qr": { "text": "https://verify.example.com/c/0190a7e2-5b1c-7c3f" }
          }
        }
      ]
    }
    

    PDF vs PNG: Choosing the Output Format

    Format Recommended Use Case Credit Cost
    PDF High-resolution print delivery, physical diplomas, framed credentials 1 credit per page
    PNG, JPG, WebP Instant email delivery, social sharing (LinkedIn, X), user profile embeds 1 credit per image

    Tamper-Evident Verification Architecture

    A digital certificate without verification is merely an unverified image. To make certificates legally defensible and tamper-evident:

    • Mint RFC 9562 UUIDs: Avoid sequential IDs (#001, #002) which expose cohort volumes. Use UUID v7 to provide chronological sorting while remaining unguessable.
    • Encode Verification URL in QR: Use the native Code layer so jsontoimg renders crisp vector QR codes directly on the canvas.
    • Host a Verification Endpoint: Point the QR code to a public verification page on your domain that displays the recipient's name, issue date, and credential status directly from your database.

    Retries, Idempotency, and Economics

    • Failed Renders Are Free: If an asset fails to generate due to network timeouts, jsontoimg never deducts credits. Resubmit only failed attendee IDs.
    • Webhook Idempotency: Each webhook payload includes an eventId. Store processed event IDs in Redis or Postgres to prevent duplicate email dispatches.
    • Predictable Cost: 200 single-page PDF certificates consume exactly 200 credits ($4.00 total on our $5/250 prepaid pack rate of $0.02 per image).

    Related Guides & Resources

    Frequently Asked Questions

    What is the maximum batch size for certificate generation?

    Each call to POST /api/v1/renders/batch accepts up to 50 individual render jobs. For larger cohorts (e.g., 500 graduates), iterate across 10 sequential or queued batches.

    Can I generate certificates directly from Google Sheets?

    Yes. You can read attendee rows via Google Apps Script or low-code tools like n8n and dispatch batches of 50 to the jsontoimg Batch API.

    How does QR code rendering work inside the template?

    In J2I Studio, add a Code layer and configure its type to qrcode. In your JSON payload, supply the target URL inside layers.<code_layer_name>.text. The API renders the vector QR code directly into the design.

    Get 25 free images →