What's New
Batch OG Image Generation (POST /v1/og/batch)
Generate up to 20 OG images in a single API call. Perfect for:
- Static site generators that need OG images for every page
- CMS systems generating images for all blog posts
- CI/CD pipelines creating images at build time
Request
{
"images": [
{ "id": "hero", "title": "My Product", "template": "product" },
{ "id": "blog-1", "title": "How to X", "template": "blog", "author": "Alice" }
],
"defaults": {
"format": "png",
"width": 1200,
"height": 630,
"domain": "example.com"
}
}Response
{
"results": [
{ "id": "hero", "success": true, "data": "data:image/png;base64,..." },
{ "id": "blog-1", "success": true, "data": "data:image/png;base64,..." }
],
"summary": { "total": 2, "succeeded": 2, "failed": 0, "totalMs": 85 }
}Key Features
- Defaults merging — Set shared params once, override per image
- Parallel rendering — All images render concurrently via
Promise.allSettled - Partial failure handling — One failed image doesn't kill the batch
- Quota pre-check — Validates you have enough quota before rendering
- Efficient billing — Only successful renders count toward usage
Full Changelog
POST /v1/og/batch— New batch generation endpointrecordBatchUsage()— Single-query batch usage recording- Batch types:
BatchRequest,BatchResult,BatchResponse