How to Generate Image Thumbnails with BoltonSea API

file upload into cloud

Here is a tutorial that demonstrates how to upload media to a BoltonSea API.

Prerequisite

  1. Active BoltonSea Account or create a new one
  2. Create API Key. Once logged in, proceed to create a new key with CREATE & READ accesses
  3. Upload an image into a Media Group

Implementation

Open the menu of your media (Image File) and select the View Properties option. This option shows the properties of the media file. In it you will need the MEDIA_ID value for the API request.

To obtain the MEDIA_ID value required for your API request, please follow these steps:

  1. Locate the media file's card that you already uploaded.

  2. Click on the menu icon of the Media card (Top-right circular button).

  3. From the menu, select the View Properties option.

  4. Within the properties pop-up that appears, you will find the MEDIA_ID (Please note this value for your API request).

    properties of a particular media file
    Illustration: Shows the properties of a particular media file

Note:

import requests
import json
url = "https://api.boltonsea.com/media/versions/thumbnail"
payload = json.dumps({
"media_id": 1,
"media_group_id": 113,
"width": "600",
"height": "600",
"maintain_aspect_ratio": "true"
})
headers = {
'X-API-KEY': '00-000E4XXLL555B33EF22222FB...',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Output

Below is the response from the API request with the information of the newly created Image thumbnail

{
id: 9,
width: 600,
height: 600,
maintain_aspect_ratio: true,
is_parent_file: false,
mime_type: "image/jpeg",
private_url: "https://api.boltonsea.com/media/file/140/2025/10/zglinrn8bxxva_600x600_t.jpeg",
public_url: "https://io.boltonsea.com/static_files/140/2025/10/zglinrn8bxxva_600x600_t.jpeg",
original_file_name: "diff_dims.jpeg",
file_size: 72043,
created_on: "2025-10-17T16:09:36.031+00:00",
}

If you have any trouble locating any elements in this article or have further questions, please do not hesitate to ask us through the contact-us page