Generate Images

How to generate several images at once - Abyssale REST API

Multiple images can be created at once by sending data and customisation parameters to the POST /async/banner-builder/{template_id}/generate endpoint, which will respond synchronously with only a generation_request_id property.

  • Supported template type: Static

  • Generation response type: Asynchronous (Webhooks or Polling)

Generation Request (1 & 2)

The elements property is the same as Generate Image.

The callback_url request parameter and the asynchronous mechanism

As this method is asynchronous you should provide a callback_url. The NewBannerBatch event will be POSTed to this URL when the generation batch finishes.

To discover globally how this system works, check out the following Webhooks guide:

Sample request

​Do not forget to replace {YOUR-API-KEY} and {templateId}

curl -X POST -H "x-api-key:{YOUR-API-KEY}" -H "Content-Type: application/json"  \
-d '{
  "callback_url": "https://webhook.mycompany.com/images",
  "template_format_names": ["facebook-feed", "instagram-post", "iab-medium"],
  "elements": {
    "primary_text": {
        "payload": "New branding available.",
        "color": "#FF0000"
    }
  }
}' \
https://api.abyssale.com/async/banner-builder/{template_id}/generate

All formats of a template can be generated by removing the template_format_names property.

Sample response

{
  "generation_request_id": "df75afa8-5a77-4e03-aeef-6d1b6dd0580a"
}

Last updated