← Image automation guides

Developer pattern

JSON to Image API

Map a JSON payload to dynamic fields in an approved template and return a consistent image for an application or workflow.

Quick answer

With Duply, JSON supplies the changing content for a visual template; it does not need to describe the entire layout on every request.

Best-fit use cases

Backend services
CMS webhooks
SaaS features
Queue and batch workers

Implementation

A reliable four-step workflow

1

Define the schema

Document required strings, numbers, public image URLs, and allowed optional values.

2

Map fields

Connect JSON keys to stable dynamic layer names in one approved template.

3

Validate

Reject missing fields, oversized text, and inaccessible source images before rendering.

4

Return evidence

Save the image URL, source record ID, template ID, and generation status together.

Concrete example
trigger
A POST request arrives
inputs
{ title, price, image_url, badge }
output
A template-rendered PNG
destination
Product response or object storage

Frequently asked questions

Does JSON control every design property?

Not in the recommended Duply workflow. The template controls design, while JSON changes only approved dynamic fields.

Should clients call the API directly?

Keep credentials server-side and proxy requests through a trusted backend when end users can initiate generation.

Continue the workflow

Build one production-shaped example

Start with one approved template, realistic data, and the exact trigger your team intends to use.

Start free