Create a dynamic image by API

Create dynamic images programmatically by using the Abyssale API.

By sending a POST request to the /designs/{designId}/dynamic-image-url endpoint, you can generate a customized image URL based on your design and the parameters you specify.

You can also use this endpoint to retrieve the dynamic image URLs for a design. If the dynamic image has already been created, it will simply return the existing URLs.

Endpoint

Create a dynamic image

post

Creates a dynamic image URL for a given design. Only one dynamic image is allowed per design. Subsequent calls return the existing dynamic image. Use enable_rate_limit in the request body to enable API rate limiting for this image.

Authorizations
Path parameters
designIdstringRequired

Unique identifier of the design

Body
enable_rate_limitbooleanOptional

Enable API rate limiting for this dynamic image

Default: false
Responses
200

Existing dynamic image retrieved

application/json
post
POST /designs/{designId}/dynamic-image-url HTTP/1.1
Host: api.abyssale.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "enable_rate_limit": true
}
{
  "id": "a12b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
  "design_id": "z9y8x7w6-v5u4-t3s2-r1q0-p9o8n7m6l5k4",
  "formats": [
    {
      "id": "one-format",
      "uid": "11111111-2222-3333-4444-555555555555",
      "width": 3333,
      "unit": "px",
      "height": 666,
      "dynamic_image_url": "https://img.abyssale.com/a12b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6/11111111-2222-3333-4444-555555555555"
    },
    {
      "id": "another-format",
      "uid": "66666666-7777-8888-9999-000000000000",
      "width": 1920,
      "unit": "px",
      "height": 1080,
      "dynamic_image_url": "https://img.abyssale.com/a12b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6/66666666-7777-8888-9999-000000000000"
    }
  ]
}

Important Notes

  • Uniqueness: Only one dynamic image can be created per design.

  • Idempotency: Calling this endpoint multiple times for the same design will return the already created dynamic image rather than creating a new one (and will not modify the existing one).

  • HTTP Status Codes:

    • 201 Created is returned when a new dynamic image is successfully created.

    • 200 OK is returned if the dynamic image already exists and is returned again.

Side Notes

The dynamic image url for each format can also be retrieved in the Get design details endpoint (if the dynamic image has already been created).

Last updated