Generate animated GIFs

How to generate animated GIFs - Abyssale REST API

This feature is available from the Business plan.

Animated GIFs can be created by sending data and customisation parameters to the POST /async/banner-builder/{template_id}/generate endpoint (with the image_file_type property equals to gif), which will respond synchronously with only a generation_request_id property.

Once the generation is completed, the result will then be posted to the callback_url (webhooks system).

  • Supported template type: Animated

  • Generation response type: Asynchronous (Webhooks or Polling)

  • The animated GIF is exported at maximum 9 fps.

  • All duplicated frames will be removed.

  • By default, infinite looping is defined.

In addition to the supported image properties, a gif property can be sent through the Abyssale REST API call to customise the generated GIF. Here are the available options:

  • repeat: Sets the number of times that the GIF should repeat after its first iteration.

    • Default value is -1 : The GIF will repeat indefinitely.

    • Value of 0: Play only once.

    • Value of 1: Play twice

    • ....

  • max_fps: Maximum number of frame per second. Default value is 9

    • Min: 2

    • Max: 9

File compression level

You can optionally set the file_compression_level. The "File Compression Level" option allows you to fine-tune the balance between file size and quality when processing files. You can choose a value between 1 and 100, where 1 represents the highest compression for the smallest file size (lower quality), and 100 signifies the best quality with larger file sizes. The default value is 100.

"file_compression_level": 100

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": "",
  "image_file_type": "gif",
  "gif": {
    "max_fps": 9,
    "repeat": -1
  "template_format_names": ["facebook-feed", "instagram-post", "iab-medium"],
  "elements": {
    "primary_text": {
        "payload": "New branding available.",
        "color": "#FF0000"
}' \{template_id}/generate

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

Last updated