EN IT

Images

Endpoints for retrieving and on-the-fly resizing of image assets.

Base URL: https://api.contit.cloud

GET /images/{assetId}

Get or resize image

Retrieve an image asset, optionally resized on-the-fly by specifying width, height, and quality parameters. Returns binary image data.

Requires ReadAccess policy

Path Parameters

NameTypeRequiredDescription
assetId string The asset ID (GUID) of the image

Query Parameters

NameTypeRequiredDescription
width integer Desired width in pixels. Omit to preserve original width.
height integer Desired height in pixels. Omit to preserve original height.
quality integer JPEG/WebP quality (1-100). Default is original quality.

Responses

200 Success — binary image data (FileStreamResult)
(binary) binary Raw image bytes
401 Unauthorized
404 Not Found — asset does not exist or is not an image

Code examples

curl -X GET "https://api.contit.cloud/images/{assetId}" \
  -H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var response = await http.GetAsync("https://api.contit.cloud/images/{assetId}");

response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
  "https://api.contit.cloud/images/{assetId}",
  {
    method: "GET",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
    }
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}

response = requests.get(
    "https://api.contit.cloud/images/{assetId}",
    headers=headers
)

data = response.json()
Example Request
GET /images/c3d4e5f6-a7b8-9012-cdef-123456789012?width=300&height=200&quality=85
Example Response 200
(binary image data — Content-Type: image/png)
Try it Live
GET /images/bypath/{path}

Get image by path

Retrieve an image asset by its storage path, optionally resized on-the-fly. Returns binary image data.

Requires ReadAccess policy

Path Parameters

NameTypeRequiredDescription
path string The storage path of the image (e.g. 'products/hero-banner.jpg')

Query Parameters

NameTypeRequiredDescription
width integer Desired width in pixels
height integer Desired height in pixels
quality integer JPEG/WebP quality (1-100)

Responses

200 Success — binary image data (FileStreamResult)
(binary) binary Raw image bytes
401 Unauthorized
404 Not Found

Code examples

curl -X GET "https://api.contit.cloud/images/bypath/{path}" \
  -H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var response = await http.GetAsync("https://api.contit.cloud/images/bypath/{path}");

response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
  "https://api.contit.cloud/images/bypath/{path}",
  {
    method: "GET",
    headers: {
      "X-Api-Key": "YOUR_API_KEY",
    }
  }
);

const data = await response.json();
import requests

headers = {"X-Api-Key": "YOUR_API_KEY"}

response = requests.get(
    "https://api.contit.cloud/images/bypath/{path}",
    headers=headers
)

data = response.json()
Example Request
GET /images/bypath/products/hero-banner.jpg?width=800&quality=90
Example Response 200
(binary image data — Content-Type: image/jpeg)
Try it Live