API Reference
Bannx API for rendering templates, managing templates and variables, webhooks, and authentication.
Bannx API Reference
Use the Bannx API to generate marketing assets (banners, OG images, social graphics) programmatically. The API supports rendering by page ID, inline page data, variables, and webhooks.
Base URL
All API requests use your app base URL, for example:
https://your-app.bannx.app
Quick start
- Create an API key in your space: Settings → Space → Developers. Copy the token (shown only once).
- Authenticate every request with the
Authorization: Bearer <token>header. - Publish a template so its pages are available for rendering via the Render API.
API overview
| Area | Description |
|---|---|
| Authentication | API keys, Bearer token, and token scope |
| Rendering API | Render a page to PNG, SVG, or WebP (GET by page ID, POST with inline data) |
| Template API | List and fetch templates and their pages |
| Variables | Page, template, and global variables; overrides via query or body |
| Template Expressions | Functions and syntax for dynamic bindings (use, isDefined, colors, etc.) |
| Webhooks | Callbacks after render (e.g. upload result, logging) |
Response formats
- JSON endpoints return
application/json. - Rendering endpoints return binary image data (
image/png,image/svg+xml, orimage/webp). Use theformatquery (GET) or body field (POST) to choose.
Rate limits and credits
Rendering consumes credits for your space. Check your plan and usage in Settings → Space → Billing. Invalid or missing tokens return 401 Unauthorized.