API DOCUMENTATION
Banner Rendering API
Generate dynamic banner images using a simple HTTP API designed for SaaS platforms, automation workflows, ecommerce systems, and developer tooling.
Quick Start
Send a POST request with your banner payload and receive a generated PNG image response.
cURL Example
curl -X POST https://api.banner.codes/api/render \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "Summer Sale",
"subtitle": "Up to 50% OFF",
"theme": "dark",
"template": "promo"
}' --output banner.pngAuthentication
Authenticate requests using thex-api-keyrequest header.
API Key Header
Required for all requests
x-api-key: YOUR_API_KEY
Render Endpoint
POST
/api/renderGenerates a banner image using the provided request payload and rendering template.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Required | Primary banner title |
subtitle | string | Optional | Secondary text content |
theme | string | Optional | Theme variant (dark or light) |
template | string | Optional | Template identifier |
Example JSON Payload
{
"title": "Summer Sale",
"subtitle": "Up to 50% OFF",
"theme": "dark",
"template": "promo"
}Response
Success Response
HTTP/1.1 200 OK Content-Type: image/png
Rendering Notes
- • Requests may be cached automatically
- • Render duration depends on template complexity
- • Unsupported assets may fallback automatically
Error Codes
400Invalid request payload401Missing or invalid API key429Rate limit exceeded500Rendering service unavailableCode Examples
JavaScript Fetch
const response = await fetch(
"https://api.banner.codes/api/render",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.BANNER_API_KEY!
},
body: JSON.stringify({
title: "Summer Sale",
subtitle: "Up to 50% OFF",
theme: "dark",
template: "promo"
})
}
)
const imageBlob = await response.blob()Node.js
import fs from "node:fs/promises"
const response = await fetch(
"https://api.banner.codes/api/render",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.BANNER_API_KEY!
},
body: JSON.stringify({
title: "Version 2.1 Released",
subtitle: "Rendering Infrastructure",
theme: "dark"
})
}
)
const arrayBuffer = await response.arrayBuffer()
await fs.writeFile(
"banner.png",
Buffer.from(arrayBuffer)
)Production Ready
Banner.codes is designed for API integrations, automation systems, and scalable rendering workflows. Additional infrastructure capabilities may evolve over time as the platform matures.
