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
}
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
}'
import requests
r = requests.post("https://api.imageapis.com/v1/images", headers={"X-API-Key": "YOUR_KEY"}, json={
"template": "tpl_4nq8vzk2hdyw7bxme3rc",
"modifications": [
{
"name": "title",
"text": "Launch week starts Monday"
},
{
"name": "photo",
"src": "https://example.com/hero.jpg"
}
],
"format": "png",
"scale": 2
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/images", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"template": "tpl_4nq8vzk2hdyw7bxme3rc",
"modifications": [
{
"name": "title",
"text": "Launch week starts Monday"
},
{
"name": "photo",
"src": "https://example.com/hero.jpg"
}
],
"format": "png",
"scale": 2
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
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"
}