Cloudimage - Documentation

Accounts created before Nov. 1st, 2021

Accounts created before November 1, 2021 have to include /v7/ in the path, like shown below.

//token.cloudimg.io/v7/original_image_url?operations&filters

Accounts created on or after November 1, 2021 do not require /v7/ and documentation have been updated accordingly.
To verify the type of configuration on your Cloudimage account, log in to your Cloudimage admin panel and look at the syntax provided on the Welcome page.

[NOTE] If you are an existing Cloudimage customer and wish to be able to remove the v7 from your URL syntax, please contact our support.

Warm-up API

Warm-up allows you to proactively cache your images in the Cloudimage infrastructure (including CDNs) for faster processing before receiving the first request from your end users. We recommend to warm-up Cloudimage in the following cases:

  • upon launching a new collection of thousands/millions of images - to make sure that at launch time, all images will be pre-processed and rocket fast for end users;
  • at upload - to make sure that the uploaded image is already pre-processed to be immediately accessible for end users;
  • when dealing with large images (large animated GIF files, gigapixels pictures, etc.) - as pre-processing is important to save time on first load;
  • performance is a top priority even if it’s on the first load.

Creating a warmup task

You can provide a list of your images either in a txt/csv file or in the request's body.

POST https://warmup.api.cloudimage.com/warmup/urls

URL list from a file

List file format

You need to provide a text file with all your images for the warmup (one URL per line):

/sample.li/logo-cloudimg-black.png?w=200
/sample.li/logo-cloudimg-white.png?w=200
/sample.li/logo-cloudimg-yellow.png?w=200
/sample.li/hotel.jpg?pixellate=5
/sample.li/house.jpg?pixellate=5
/sample.li/eye.jpg?w=500&h=280
...

Request

curl --location --request POST 'https://warmup.api.cloudimage.com/warmup/urls' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX' \
--form 'file=@url_list.csv'

X-Client-Key is the client's API key (can be found in Admin Console left menu : Settings / CDN Invalidation).

Response

{
    "status": "success",
    "count_added": 10304
}

URL list in request body

Request

curl --location --request POST 'https://warmup.api.cloudimage.com/warmup/urls' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX' \
--header 'Content-type: application/json' \
--data-raw '{"data": ["/sample.li/logo-cloudimg-black.png?w=200", "/sample.li/logo-cloudimg-white.png?w=200", "/sample.li/logo-cloudimg-yellow.png?w=200"]}'

X-Client-Key is the client's API key (can be found in Admin Console left menu : Settings / CDN Invalidation).

Response

{
    "status": "success",
    "count_added": 3
}

Warm-up status

You can check the status of the warmup tasks for the last 5 days.

GET https://warmup.api.cloudimage.com/warmup/stats

Request

curl --location --request GET 'https://warmup.api.cloudimage.com/warmup/stats' \
--header 'X-Client-Key: client_XXXXXXXXXXXXXXX'

Response

{
    "status": "success",
    "msg": "This is the status count of your requests for the last 5 days. The new requests appear as added and once the warmup is complete, they will increase the failed or the success counters",
    "stats": {
        "added": 9543,
        "success": 749,
        "failed": 12
     }
}