Generate a single image
How to generate synchronously a single image - Abyssale REST API
Last updated
How to generate synchronously a single image - Abyssale REST API
Last updated
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.
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).
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):
Do not forget to replace {YOUR-API-KEY}
and {templateId}
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).
The Abyssale Image Generation API can return the following error codes :
Code | Description |
---|---|
| Bad Request Your request is invalid. Either one of the parameter sent in the request is wrong or the generation failed due to one of the given property. A payload will be returned in the HTTP response explaining the error. For instance, here are payloads returned:
|
| Unauthorized Ensure your API key is the right one. |
| Not Found The route (or the given template) cannot be found. |
| Method Not Allowed You tried to access Abyssale with an invalid method. |
| API Limits reached All of your image generation API calls are consumed: You should upgrade to a higher plan. |
| Internal Server Error
Try again later: Contact us on |
Unique identifier (UUID) of the template
A dictionary
containing all elements with properties you would like to override form the default template (keys correspond to layer names)
Corresponds to the format ID you would like to generate (only mandatory when your template contains several formats).
"facebook-post"
Percentage of compression applied.
80
Ok
"64238d01-d402-474b-8c2d-fbc957e9d290"