Polling

How to retrieve progress of an asynchronous generation request - Abyssale REST API

You can check the progress of an asynchronous generation by periodically calling the GET /generation-request/{generation_request_id} endpoint with your initial generation_request_id.

  • A generation request will become unavailable after 7 days.

  • The endpoint is rate limited. Make sure you do not flood it or you will be blocked.

  • Abyssale uses a retry system, so a generation request can take a maximum of 10 minutes before being completed.

The payload response is exactly like the NEW_BANNER_BATCH event, except it contains an additional is_finalized boolean property. Once this property is true, the generation request is completed and will never change in the future.

Response example:

{
  "is_finalized": true,
  "id": "e38c8e09-5b0e-43ff-b5da-25be6b6e96ae",
  "banners": [
    {
      "id": "28e973cf-1514-4d9b-9db6-cbaca229b040",
      "format": {
        "id": "half-page",
        "width": 300,
        "height": 600
      },
      "template": {
        "id": "840420c2-7bd9-45c4-a7cb-c741b16edfcf",
        "name": "Test demo",
        "created_at": 1692800820,
        "updated_at": 1692867258
      },
      "file": {
        "type": "jpeg",
        "url": "https://s3abyssale/.../image.jpeg",
        "filename": "image.jpeg",
        "cdn_url": "https://cdnabyssale/.../image.jpeg"
      }
    },
    {
      "id": "660bfd64-9715-47c7-a152-9058da61b562",
      "format": {
        "id": "facebook-post",
        "width": 1200,
        "height": 1200
      },
      "template": {
        "id": "840420c2-7bd9-45c4-a7cb-c741b16edfcf",
        "name": "Test demo",
        "created_at": 1692800820,
        "updated_at": 1692867258
      },
      "file": {
        "type": "jpeg",
        "url": "https://s3abyssale/.../image2.jpeg",
        "filename": "image2.jpeg",
        "cdn_url": "https://cdnabyssale/.../image2.jpeg"
      }
    }
  ],
  "errors": []
}

Last updated