Image APIs
API reference › Collections

Render many images from one template: a CSV with one row per image, or a list of items

POST/v1/collections

POST/v1/collections

Render many images from one template: a CSV with one row per image, or a list of items

One template and up to 1000 images in one call. Send csv (a header row, then one row per image: a column named after a {{placeholder}} fills it, layer.property sets that layer's property, a column starting with _ is kept as metadata) or items; or POST the CSV itself as text/csv, options in the query string.

The answer is 202 with every image's id and final url already assigned, plus csv (how each column was read) and warnings (columns and placeholders that match nothing). Images render in the background: poll GET /v1/collections/{id} or pass webhook_url. It is all reserved first, one image per row: if the plan has fewer left, it's 429 and nothing is charged.

REQUEST BODY · APPLICATION/JSON · REQUIRED
{
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "csv": "title,author,photo.src,_post\nWhat we learned running Postgres at 40 TB,Dana Reyes,https://example.com/a.jpg,101\n\"Queues, retries and idempotency\",Sam Okafor,https://example.com/b.jpg,102\n",
  "scale": 2,
  "webhook_url": "https://example.com/hooks/collection"
}
In the full reference
REQUEST
curl -X POST "https://api.imageapis.com/v1/collections" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "csv": "title,author,photo.src,_post\nWhat we learned running Postgres at 40 TB,Dana Reyes,https://example.com/a.jpg,101\n\"Queues, retries and idempotency\",Sam Okafor,https://example.com/b.jpg,102\n",
  "scale": 2,
  "webhook_url": "https://example.com/hooks/collection"
}'
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
  "id": "col_5kq2wz8xmtnb4hdc7vre",
  "object": "collection",
  "status": "pending",
  "total": 2,
  "completed": 0,
  "failed": 0,
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "format": "png",
  "scale": 1,
  "units": 2,
  "source": "csv",
  "csv": {
    "rows": 2,
    "delimiter": "comma",
    "variables": [
      "title",
      "author"
    ],
    "modifications": [
      "photo.src"
    ],
    "metadata": [
      "_post"
    ]
  },
  "warnings": [],
  "images": [
    {
      "index": 0,
      "id": "img_7hk2mq9ztbw4e6nrcxpd",
      "status": "pending",
      "url": "https://img.imageapis.com/i/img_7hk2mq9ztbw4e6nrcxpd.png",
      "metadata": {
        "post": "101"
      }
    },
    {
      "index": 1,
      "id": "img_9xw4nq2kdtbz7hmc3vpe",
      "status": "pending",
      "url": "https://img.imageapis.com/i/img_9xw4nq2kdtbz7hmc3vpe.png",
      "metadata": {
        "post": "102"
      }
    }
  ],
  "created": "2026-10-10T19:02:11Z",
  "expires": "2026-11-09T19:02:11Z"
}
401Missing or invalid API key (from the gateway)
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.