API for Images
What can you do?
Initiate upload
POST /api/v3/companies/{company_id}/subjects/{subject_id}/upload/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"front": "example_front.jpg",
"left": "example_left.jpg",
"right": "example_right.jpg",
"meta": {}
}
{
"front": {
"url": "text",
"method": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"content_type": "text"
},
"left": {
"url": "text",
"method": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"content_type": "text"
},
"right": {
"url": "text",
"method": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"content_type": "text"
},
"image_batch_id": "123e4567-e89b-12d3-a456-426614174000"
}
Request
Note that you only use text keys for different sides of face: front, left, right. The value should be the name of the file or whatever you want to name it.
Response
{
"front": {
"url": "https://storage.googleapis.com/...",
"method": "PUT",
"headers": {
"Content-Type": "application/octet-stream",
"X-Goog-Content-Length-Range": "1,31457280",
"Host": "storage.googleapis.com"
},
"content_type": "application/octet-stream",
"id": "adcf1265-dbd8-495c-afa4-f7aceb2e4fbe"
},
"image_batch_id": "5243ab6a-bd30-4932-b98c-45e43edfdc36"
}
Don't forget to save image_batch_id
from the response.
Upload image(s) to storage
Perform upload to the url from previous response
import pathlib
import httpx
upload_response = ... # response from upload method
httpx.put(
url=upload_response["front"]["url"],
headers=upload_response["front"]["headers"],
data=pathlib.Path("my_selfiie.jpg").read_bytes(),
)
curl -X PUT \
{url} \
-H 'content-type: application/octet-stream' \
-H 'X-Goog-Content-Length-Range: 1,31457280' \
-d @my_selfie.jpg
Send image batch to computation by algorithms
No response body
No content
POST /api/v3/companies/{company_id}/batches/{image_batch_id}/compute/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"app_args": null
}
No content
Fetch results per Algorithm Application for single image batch
Expiration seconds for signed URLs
3600
Whether to include masks in the response
true
Whether to return masks as SVG images in the response
true
No response body
No content
GET /api/v3/companies/{company_id}/batches/{image_batch_id}/results/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No response body
No content
Fetch all computed parameters for subject
GET /api/v3/companies/{company_id}/subjects/{subject_id}/parameters/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"image_batch_id": "text",
"subject_id": "text",
"parameters": {
"puffiness": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sagging": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"nasolabial_wrinkles": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"jowls": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"enlarged_pores": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"melasma": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"skintone": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"skin_type": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"freckles": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"dark_circles": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ita": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"age": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"inflammation": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"moles": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"pimples": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sun_spots": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"pigmentation": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"redness": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"deep_lines": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"lacrimal_grooves": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"breakouts": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"eyes_age": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"lines": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"irritation": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"fine_lines": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"marionette_lines": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"pores": {
"tag": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"survey_results": [
{
"question": "text",
"answer": "text",
"created_at": "2025-10-08T20:04:22.814Z"
}
],
"all_algorithms_calculated": false,
"sc_app_id": "text",
"can_watch_predicted_images": false,
"predicted_images": {
"front": {
"original": "text",
"anonymised": "text",
"aligned_face": "text"
},
"left": {
"original": "text",
"anonymised": "text",
"aligned_face": "text"
},
"right": {
"original": "text",
"anonymised": "text",
"aligned_face": "text"
}
},
"detection_errors": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
]
Get batch info
GET /api/v3/companies/{company_id}/batches/{image_batch_id}/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"images": {
"front": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"created_at": "2025-10-08T20:04:22.814Z",
"signed_url": null,
"original_image_id": "123e4567-e89b-12d3-a456-426614174000",
"meta": null
},
"left": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"created_at": "2025-10-08T20:04:22.814Z",
"signed_url": null,
"original_image_id": "123e4567-e89b-12d3-a456-426614174000",
"meta": null
},
"right": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"created_at": "2025-10-08T20:04:22.814Z",
"signed_url": null,
"original_image_id": "123e4567-e89b-12d3-a456-426614174000",
"meta": null
}
},
"subject": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
},
"dataset": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text"
},
"connected_applications": [
"text"
],
"created_at": "2025-10-08T20:04:22.814Z",
"meta": null
}
List all batches (for company, dataset or subject)
Which field to use when ordering the results.
A search term.
A page number within the paginated result set.
Number of results to return per page.
GET /api/v3/companies/{company_id}/batches/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"creation_time": "2025-10-08T20:04:22.814Z",
"subject_id": null,
"images": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"side": {
"id": 1,
"name": "text",
"tech_name": "text"
},
"light": "text",
"image_type": {
"id": 1,
"name": "text",
"tech_name": "text"
},
"side_name": "text",
"side_tech_name": "text",
"light_name": null,
"light_tech_name": null,
"image_type_name": "text",
"image_type_tech_name": "text",
"creation_time": "2025-10-08T20:04:22.814Z",
"quality_score": null,
"quality_feedback": null,
"quality_result": null,
"quality_issues": [
"text"
],
"problems": [
"text"
],
"stage_step_number": null,
"stage_number": null,
"urls": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"signed_url": null,
"original_image_id": null
}
],
"connected_applications": [
"text"
],
"meta": null
}
]
}
Tell us that everything was uploaded
/api/v3/companies/{company_id}/batches/{image_batch_id}/compute/
How to get results for 1 images batch?
/api/v3/companies/{company_id}/batches/{image_batch_id}/results/
How to get historical parameters for subject?
/api/v3/companies/{company_id}/subjects/{subject_id}/parameters/
How to get all batches in your company, dataset or subject
/api/v3/companies/{company_id}/batches/
Last updated
Was this helpful?