API Documentation
Render a signed URL
Render an image from a signed URL that carries the template id, your modifications, and a signature. Bannerify caches the image for up to 7 days.
GET https://api.bannerify.co/v1/templates/signedurl
Render a template as an image. This is the endpoint that a signed URL calls: you build the URL yourself, or with an SDK, and anyone who opens it gets the image. The URL carries the template id, the modifications, and a signature, so nobody can change them. Bannerify caches the image at the edge for up to 7 days. A render counts toward your quota, and a cache hit does not. See https://bannerify.co/docs/essentials/signed-urls for how to build and sign the URL.
Query parameters
| Name | Type | Description |
|---|---|---|
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. |
sign (required) | string | The signature, in hex. It is the HMAC-SHA256 of the other query parameters, sorted by name and encoded like URLSearchParams, with your API key as the secret. See https://bannerify.co/docs/essentials/signed-urls. |
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. |
nocache | boolean or string | By default, Bannerify caches the rendered image at the edge for up to 7 days. Set this to true to skip the cache and render a new image on every request. Every uncached render counts toward your quota. |
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. |
apiKeyHashed | string | The SHA-256 hash of your API key, in hex. It tells Bannerify which key signed the URL, and it cannot sign anything. Send it with every request. |
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.
GET https://api.bannerify.co/v1/templates/signedurl
Render a template as an image. This is the endpoint that a signed URL calls: you build the URL yourself, or with an SDK, and anyone who opens it gets the image. The URL carries the template id, the modifications, and a signature, so nobody can change them. Bannerify caches the image at the edge for up to 7 days. A render counts toward your quota, and a cache hit does not. See https://bannerify.co/docs/essentials/signed-urls for how to build and sign the URL.
Query parameters
| Name | Type | Description |
|---|---|---|
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. |
sign (required) | string | The signature, in hex. It is the HMAC-SHA256 of the other query parameters, sorted by name and encoded like URLSearchParams, with your API key as the secret. See https://bannerify.co/docs/essentials/signed-urls. |
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. |
nocache | boolean or string | By default, Bannerify caches the rendered image at the edge for up to 7 days. Set this to true to skip the cache and render a new image on every request. Every uncached render counts toward your quota. |
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. |
apiKeyHashed | string | The SHA-256 hash of your API key, in hex. It tells Bannerify which key signed the URL, and it cannot sign anything. Send it with every request. |
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.