How do I generate images from templates via API?
You generate images in three steps: design a template, choose which layers are dynamic, then send a POST request with the template ID and the values you want to change. The API renders the image and returns a hosted URL.
Step 1: Design the template
Build your layout in the visual editor with all the elements you need, such as text, background, logo, and images. Give a clear name to each layer that should change, for example title or product_photo. Named layers become the fields you fill through the API. Copy the template ID once the design is ready.
Step 2: Decide what changes
Look at your template and decide which layers vary per image and which stay fixed. A price card might change the title, price, and photo on every render while the logo and background stay the same. Only the layers you name in the request are changed.
Step 3: Send the request
Send a POST request to the render endpoint with your API key, the template ID, and a JSON object of layer values:
POST /v1/render
Authorization: Bearer YOUR_API_KEY
{
"template": "TEMPLATE_ID",
"layers": {
"title": { "text": "Summer Sale" },
"price": { "text": "$29" },
"photo": { "image_url": "https://example.com/shoe.jpg" }
}
}The API renders the image and returns a URL to the finished file, usually within a few seconds.
Generating many images
To create images in bulk, loop through your data and send one request per record. Each row produces one image. You can do this from code, or from a no-code tool that sends the same request for every new row in a sheet or database.
Try it with your own data
Create a free account and render your first image in minutes. 50 render credits, no credit card required.