Navigation

API Documentation

Create a stored image

The createStoredImage endpoint renders a template as an image and returns a public URL, or saves the file to your own S3-compatible bucket.

POST https://api.bannerify.co/v1/templates/createStoredImage

Render a template as an image, save the file, and return its URL. Bannerify saves the file in its own storage and serves it from its CDN at a public URL. Send s3Config to save it to your own S3-compatible bucket instead, which needs the Scale or Enterprise plan. Each render counts toward your quota. See https://bannerify.co/docs/essentials/generate-images.

Request body

NameTypeDescription
apiKey (required)stringYour API key. Create one on the API Keys page of the dashboard, and keep it on the server.
templateId (required)stringThe id of the template to render. In the dashboard, open the menu on a template card and choose Copy Template ID.
formatpng, jpeg, webpThe image format. The value is case-sensitive, so jpg and JPEG are not valid.
qualityintegerEncoder quality for the lossy formats (jpeg, webp), 1-100. Defaults to 90. Ignored for png.
s3ConfigobjectSave 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.
modificationsarray of Modification or object or stringThe 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 stored image.
  • 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.
  • 403: The plan of your workspace does not include the feature. FORBIDDEN means s3Config came from a workspace on the Free or Automate plan.
  • 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.