POST/v1/signed-bases
Create a signed-URL base: images that render on demand from a URL
A signed base lets you build image URLs in your own code with no API call: https://img.imageapis.com/s/<base>/<template>.png?title=…&sig=<hmac>. The browser or crawler fetching the URL triggers the render; identical URLs are served from cache and cost nothing. Sign the path and query exactly as sent with HMAC-SHA256 and the base's secret, hex encoded. Add exp (unix seconds) to make a URL expire. Each new render costs one image against the key that created the base.
REQUEST BODY · APPLICATION/JSON
{
"name": "Blog cards"
}
REQUEST
curl -X POST "https://api.imageapis.com/v1/signed-bases" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Blog cards"
}'
import requests
r = requests.post("https://api.imageapis.com/v1/signed-bases", headers={"X-API-Key": "YOUR_KEY"}, json={
"name": "Blog cards"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/signed-bases", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Blog cards"
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
201Created
{
"id": "sb_8mz2kq7xvtnw4hbc3dpe",
"object": "signed_base",
"name": "Blog cards",
"template": null,
"secret": "sbs_1f2e3d4c5b6a79880011223344556677889900aabbccddeeff00112233445566",
"url": "https://img.imageapis.com/s/sb_8mz2kq7xvtnw4hbc3dpe/{template}.png?{query}&sig={signature}",
"how_to_sign": "signature = hex(HMAC-SHA256(secret, '/s/sb_8mz2kq7xvtnw4hbc3dpe/tpl_4nq8vzk2hdyw7bxme3rc.png?title=Hello&exp=1760000000')); append &sig=… to the same URL",
"created": "2026-10-10T18:20:00Z"
}
401Missing or invalid API key (from the gateway)
404No such template or record on this account
{
"error": "string",
"message": "string",
"param": "string"
}