POST/v1/og
An Open Graph card from a title and a few options, no template needed
A 1200×630 social card in the built-in design: site name and logo, an optional tag, the title (shrinks to fit), a description and an accent bar. For a card that renders on demand from a URL, create a signed base and use the template name og.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"title": "Three data stories from OpenFEC, NHTSA and OpenAlex",
"description": "What 2.3 million rows say about September",
"site": "apidirectory.com",
"tag": "Blog",
"theme": "dark",
"accent": "#6366f1"
}
REQUEST
curl -X POST "https://api.imageapis.com/v1/og" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Three data stories from OpenFEC, NHTSA and OpenAlex",
"description": "What 2.3 million rows say about September",
"site": "apidirectory.com",
"tag": "Blog",
"theme": "dark",
"accent": "#6366f1"
}'
import requests
r = requests.post("https://api.imageapis.com/v1/og", headers={"X-API-Key": "YOUR_KEY"}, json={
"title": "Three data stories from OpenFEC, NHTSA and OpenAlex",
"description": "What 2.3 million rows say about September",
"site": "apidirectory.com",
"tag": "Blog",
"theme": "dark",
"accent": "#6366f1"
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/og", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"title": "Three data stories from OpenFEC, NHTSA and OpenAlex",
"description": "What 2.3 million rows say about September",
"site": "apidirectory.com",
"tag": "Blog",
"theme": "dark",
"accent": "#6366f1"
})
});
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": "og",
"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": "og",
"bytes": 48213,
"units": 1,
"created": "2026-10-10T18:04:11Z",
"completed": "2026-10-10T18:04:12Z",
"expires": "2026-11-09T18:04:11Z"
}