Generate a single PDF

How to generate synchronously a single PDF - Abyssale REST API

This feature is available from the Prime plan.


There are 2 ways to obtain a PDF from the Rest API:

1. Using a Print format in your template

Using one of the available Print format & then choosing the "Print Multi-format" Type will enable the PDF type by default when generating that format.

2. Using the image_file_type property

You can add an image_file_type property to the API generation payload with a "pdf" value.

Generate a PDF

A single page PDF 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 PDF.

  • Supported template type: Static

  • Generation response type: Synchronous

Properties available for each type of component are available here.

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}

curl -X POST -H "x-api-key:{YOUR-API-KEY}" -H "Content-Type: application/json"  \
-d '{
  "template_format_name": "main-crisp",
  "image_file_type": "pdf",
  "elements": {
    "image": {
      "image_url": "",
      "fitting_type": "cover",
      "alignment": "middle center"
    "text_title": {
      "payload": "Send best wishes to your lovelies with little easter gifts!",
      "color": "#FFFFFF",
      "font_size": 48,
      "font": "61566327-33c5-11ea-9877-92672c1b8195",
      "font_weight": 700,
      "line_height": 120,
      "alignment": "top left"
}' \{templateId}/generate

Sample response

  "id": "5978e8d9-ab34-4735-a2cb-fe95c2c56251",
  "file": {
    "type": "pdf",
    "url": "",
    "cdn_url": "",
    "filename": "996739f4-b563-428a-a6e8-ec3cb8bd03d4.pdf"
  "format": {
    "id": "Facebook Feed",
    "width": 1200,
    "height": 628
  "template": {
    "id": "46d22c62-d134-44d3-a040-138e4ea9ea08",
    "name": "Abyssale demo - FB Feed",
    "created_at": 1602256303,
    "updated_at": 1602685407


The Abyssale Pdf Generation API can return the following error codes :



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:

  • If a given parameter is invalid (here the given color is invalid):

{"message": "body_validation_errors: {'media': {'text_role': ["The following property is invalid: ({'color': ['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}", "errors": {"media": {"text_role": ["The following property is invalid: ({'color': ['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}}

  • If a text cannot be inserted:

{"id": "cannot_build_banner", "message": "Element text_name error: The text 'Welcome to the Abyssale Developer Hub' cannot fit within the defined space."}

401 403

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 if the error occurs.

Last updated