Batch render template
curl --request POST \
--url https://api.pictify.io/templates/{uid}/batch-render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variableSets": [
{}
],
"format": "png",
"quality": 0.9,
"layout": "<string>",
"layouts": [
"<string>"
],
"concurrency": 5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variableSets: [{}],
format: 'png',
quality: 0.9,
layout: '<string>',
layouts: ['<string>'],
concurrency: 5
})
};
fetch('https://api.pictify.io/templates/{uid}/batch-render', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/templates/{uid}/batch-render"
payload = {
"variableSets": [{}],
"format": "png",
"quality": 0.9,
"layout": "<string>",
"layouts": ["<string>"],
"concurrency": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/templates/{uid}/batch-render"
payload := strings.NewReader("{\n \"variableSets\": [\n {}\n ],\n \"format\": \"png\",\n \"quality\": 0.9,\n \"layout\": \"<string>\",\n \"layouts\": [\n \"<string>\"\n ],\n \"concurrency\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/templates/{uid}/batch-render")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variableSets\": [\n {}\n ],\n \"format\": \"png\",\n \"quality\": 0.9,\n \"layout\": \"<string>\",\n \"layouts\": [\n \"<string>\"\n ],\n \"concurrency\": 5\n}"
response = http.request(request)
puts response.read_body{
"batchId": "<string>",
"status": "pending",
"totalItems": 123,
"message": "<string>"
}Batch
Batch Operations
Generate multiple images efficiently with batch processing
POST
/
templates
/
{uid}
/
batch-render
Batch render template
curl --request POST \
--url https://api.pictify.io/templates/{uid}/batch-render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variableSets": [
{}
],
"format": "png",
"quality": 0.9,
"layout": "<string>",
"layouts": [
"<string>"
],
"concurrency": 5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variableSets: [{}],
format: 'png',
quality: 0.9,
layout: '<string>',
layouts: ['<string>'],
concurrency: 5
})
};
fetch('https://api.pictify.io/templates/{uid}/batch-render', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pictify.io/templates/{uid}/batch-render"
payload = {
"variableSets": [{}],
"format": "png",
"quality": 0.9,
"layout": "<string>",
"layouts": ["<string>"],
"concurrency": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictify.io/templates/{uid}/batch-render"
payload := strings.NewReader("{\n \"variableSets\": [\n {}\n ],\n \"format\": \"png\",\n \"quality\": 0.9,\n \"layout\": \"<string>\",\n \"layouts\": [\n \"<string>\"\n ],\n \"concurrency\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.pictify.io/templates/{uid}/batch-render")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variableSets\": [\n {}\n ],\n \"format\": \"png\",\n \"quality\": 0.9,\n \"layout\": \"<string>\",\n \"layouts\": [\n \"<string>\"\n ],\n \"concurrency\": 5\n}"
response = http.request(request)
puts response.read_body{
"batchId": "<string>",
"status": "pending",
"totalItems": 123,
"message": "<string>"
}Batch Operations
Generate multiple images from a single template with different variables. Ideal for bulk generation of social cards, certificates, or personalized content.Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /templates/{uid}/batch-render | Start batch job |
GET | /templates/batch/{batchId}/results | Get results |
POST | /templates/batch/{batchId}/cancel | Cancel batch |
Two input modes
The same endpoint accepts rows either inline or from a spreadsheet: Rows mode — sendvariableSets, an array of variable objects, one per render:
{
"variableSets": [
{ "name": "Maya Chen", "course": "Advanced TypeScript" },
{ "name": "Sam Ortiz", "course": "Advanced TypeScript" }
],
"format": "png"
}
{
"csvUrl": "https://example.com/recipients.csv",
"mappings": {
"name": "attendee_name",
"course": "session"
},
"format": "png"
}
mappings is { "templateVariable": "CSV Column" } — the key is the template variable, the value is the CSV column that fills it. The CSV must be publicly fetchable — the server downloads it once when the batch starts.
Batch Status
| Status | Description |
|---|---|
pending | Job created, waiting to start |
processing | Currently rendering images |
completed | All items processed successfully |
partial | Completed with some failures |
failed | All items failed |
cancelled | Job was cancelled |
Webhook Notification
When a batch job completes, Pictify sends abatch.completed event to your webhook URL (if provided):
{
"event": "batch.completed",
"data": {
"batchId": "batch_xyz789",
"status": "completed",
"totalCount": 100,
"completedCount": 100,
"failedCount": 0
}
}
Limits
| Plan | Max Items per Batch | Concurrent Batches |
|---|---|---|
| Free | 10 | 1 |
| Pro | 100 | 3 |
| Business | 1,000 | 10 |
| Enterprise | 10,000 | Unlimited |
Best Practices
- Use webhooks — don’t poll for results; use webhooks for notification
- Handle failures gracefully — some items may fail; implement retry logic
- Batch appropriately — group related renders; avoid tiny batches
- Monitor progress — track batch status for long-running jobs
- Clean up — results are stored for 7 days; download and store permanently if needed
Authorizations
API key obtained from the Pictify dashboard
Path Parameters
Body
application/json
Required array length:
1 - 100 elementsAvailable options:
png, jpeg, webp Required range:
0.1 <= x <= 1Layout variant to use for all batch items. Omit for default layout.
Pattern:
^[a-z0-9-]{1,64}$Array of layout variant names to render for all batch items. Use instead of layout to render multiple layouts per item.
Pattern:
^[a-z0-9-]{1,64}$Required range:
1 <= x <= 10