Image APIs
API reference › Images

Render an image from a template, an inline template or HTML

POST/v1/images

POST/v1/images

Render an image from a template, an inline template or HTML

One request, one image. Pass a stored template's id with modifications and variables, an inline template object, or raw html. The response carries a hosted url (30 days on Free, a year on paid plans). Set response to binary to get the file itself, or webhook_url to render in the background.

REQUEST BODY · APPLICATION/JSON · REQUIRED
{
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "modifications": [
    {
      "name": "title",
      "text": "Launch week starts Monday"
    },
    {
      "name": "photo",
      "src": "https://example.com/hero.jpg"
    }
  ],
  "format": "png",
  "scale": 2
}
In the full reference
REQUEST
curl -X POST "https://api.imageapis.com/v1/images" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "modifications": [
    {
      "name": "title",
      "text": "Launch week starts Monday"
    },
    {
      "name": "photo",
      "src": "https://example.com/hero.jpg"
    }
  ],
  "format": "png",
  "scale": 2
}'
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
201Created
{
  "id": "img_7hk2mq9ztbw4e6nrcxpd",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_7hk2mq9ztbw4e6nrcxpd.png",
  "format": "png",
  "width": 1200,
  "height": 630,
  "scale": 1,
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "bytes": 48213,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z"
}
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
  "id": "img_7hk2mq9ztbw4e6nrcxpd",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_7hk2mq9ztbw4e6nrcxpd.png",
  "format": "png",
  "width": 1200,
  "height": 630,
  "scale": 1,
  "template": "tpl_4nq8vzk2hdyw7bxme3rc",
  "bytes": 48213,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.