Generate a single image
How to generate synchronously a single image - Abyssale REST API
A single image is created by sending data and customisation parameters to the POST
/banner-builder/{templateId}/generate
endpoint, which will respond synchronously with a payload containing the URL of the generated image
Supported template type: Static
Generation response type: Synchronous
Properties available for each type of component are available here.
If no parameter is sent, the generated image will correspond to the first format of the template with the default properties.
What type of image file is returned?
Only 2 image filetypes are supported (jpeg
& png
).
By default, Abyssale automatically determine the filetype from the format background color:
If the background color contains transparency (alpha < 100), the generated image will be a PNG.
Otherwise, the generated image will be a JPEG.
The default behavior can be overriden by using the image_file_type
property (accepted values: png or jpeg).
Note that if you use jpeg for a template that contains transparency, it will be generated using a black opaque colour (as jpeg does not support transparency).
Get the default payload
To ease the creation of your payload, just go to one of your Template
and choose Abyssale Rest API
in the Generation Methods list. You will find the default associated payload in the console (Feel free to remove unnecessary properties/elements):
Sample request
Do not forget to replace {YOUR-API-KEY}
and {templateId}
Sample response
What are the 2 image URLs?
As you can see in the sample response, 2 image urls are returned:
A link (the
url
property) pointing directly to the Abyssale object storage service (S3).Hotlinking is allowed (a fair usage policy applies) but is not recommended as those URLs are not designed to have low latency and high transfer speeds features.
A CDN link (the
cdn_url
property):Example (not reachable): https://cdn.abyssale.com/demo/996739f4-b563-428a-a6e8-ec3cb8bd03d4.jpeg
Those URL are designed for high-speed & low-latency performance. A limited bandwidth applies to all plans (see the pricing table).
Errors
The Abyssale Image Generation API can return the following error codes :
Last updated