Image APIs
API reference › Collections

Render many images from one template in a single request

POST/v1/collections

POST/v1/collections

Render many images from one template in a single request

One template, up to 50 sets of variables and modifications, one call. The response is 202 with every image's id and final url already assigned; renders run in the background, five at a time. Poll GET /v1/collections/{id}, or pass webhook_url to be told when the whole set is done. Costs one image per item, charged up front.

REQUEST BODY · APPLICATION/JSON · REQUIRED
{
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "items": [
    {
      "variables": {
        "title": "Post one"
      },
      "metadata": {
        "post": 101
      }
    },
    {
      "variables": {
        "title": "Post two"
      },
      "metadata": {
        "post": 102
      }
    }
  ],
  "scale": 2
}
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",
  "items": [
    {
      "variables": {
        "title": "Post one"
      },
      "metadata": {
        "post": 101
      }
    },
    {
      "variables": {
        "title": "Post two"
      },
      "metadata": {
        "post": 102
      }
    }
  ],
  "scale": 2
}'
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,
  "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.