API Documentation
Create an image
The createImage endpoint renders a template as a PNG, JPEG, or WebP image. Send the template id and your modifications, and get the image file back.
POST https://api.bannerify.co/v1/templates/createImage
Render a template as an image and return the image file in the response body. The request waits for the render, and each render counts toward your quota. See https://bannerify.co/docs/essentials/generate-images.
Request body
| Name | Type | Description |
|---|---|---|
apiKey (required) | string | Your API key. Create one on the API Keys page of the dashboard, and keep it on the server. |
templateId (required) | string | The id of the template to render. In the dashboard, open the menu on a template card and choose Copy Template ID. |
format | png, jpeg, webp | The image format. The value is case-sensitive, so jpg and JPEG are not valid. |
quality | integer | Encoder quality for the lossy formats (jpeg, webp), 1-100. Defaults to 90. Ignored for png. |
s3Config | object | Save the file to your own S3-compatible bucket. Without it, Bannerify saves the file in its own storage and serves it from its CDN. Only the stored endpoints use this field, and the Scale and Enterprise plans include it. Other plans get the error code FORBIDDEN. |
modifications | array of Modification or object or string | The values to change in the template, as an array of modifications. Each modification names a layer and sets one or more fields, and a layer without a modification keeps the values from the template. An object keyed by layer name and a JSON string of either shape also work. See https://bannerify.co/docs/essentials/modifications. |
Responses
200: The image file. The Content-Type header tells the format. The RateLimit-Remaining and RateLimit-Reset headers show the state of your rate limit.400: The request cannot be processed. BAD_REQUEST means a field is invalid, the API key is unknown, or a signed URL has a wrong signature. FETCH_IMAGE_ERROR means Bannerify could not download an image from a src URL. A rate limit on the PDF and stored endpoints also uses status 400 with the code TOO_MANY_REQUESTS. Read error.code to tell them apart.404: The template does not exist.500: The server could not finish the request. INTERNAL_SERVER_ERROR means an unexpected failure, such as a render error or a failed upload to your S3 bucket. USAGE_EXCEEDED means your workspace reached its daily or monthly generation limit, and RATE_LIMITED means the API key sent too many requests. Read error.code to tell them apart.
POST https://api.bannerify.co/v1/templates/createImage
Render a template as an image and return the image file in the response body. The request waits for the render, and each render counts toward your quota. See https://bannerify.co/docs/essentials/generate-images.
Request body
| Name | Type | Description |
|---|---|---|
apiKey (required) | string | Your API key. Create one on the API Keys page of the dashboard, and keep it on the server. |
templateId (required) | string | The id of the template to render. In the dashboard, open the menu on a template card and choose Copy Template ID. |
format | png, jpeg, webp | The image format. The value is case-sensitive, so jpg and JPEG are not valid. |
quality | integer | Encoder quality for the lossy formats (jpeg, webp), 1-100. Defaults to 90. Ignored for png. |
s3Config | object | Save the file to your own S3-compatible bucket. Without it, Bannerify saves the file in its own storage and serves it from its CDN. Only the stored endpoints use this field, and the Scale and Enterprise plans include it. Other plans get the error code FORBIDDEN. |
modifications | array of Modification or object or string | The values to change in the template, as an array of modifications. Each modification names a layer and sets one or more fields, and a layer without a modification keeps the values from the template. An object keyed by layer name and a JSON string of either shape also work. See https://bannerify.co/docs/essentials/modifications. |
Responses
200: The image file. The Content-Type header tells the format. The RateLimit-Remaining and RateLimit-Reset headers show the state of your rate limit.400: The request cannot be processed. BAD_REQUEST means a field is invalid, the API key is unknown, or a signed URL has a wrong signature. FETCH_IMAGE_ERROR means Bannerify could not download an image from a src URL. A rate limit on the PDF and stored endpoints also uses status 400 with the code TOO_MANY_REQUESTS. Read error.code to tell them apart.404: The template does not exist.500: The server could not finish the request. INTERNAL_SERVER_ERROR means an unexpected failure, such as a render error or a failed upload to your S3 bucket. USAGE_EXCEEDED means your workspace reached its daily or monthly generation limit, and RATE_LIMITED means the API key sent too many requests. Read error.code to tell them apart.