Search…
Quick Start
Get up and running with Claid API within minutes

Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error. You can generate and manage API keys in your Claid account.

Make an image processing request

To make your first request, send an authenticated request to the image editing endpoint, all you need is just substitute API key placeholder for the real API key. This sample request will perform ML-based color adjustment, increase image sharpness and turn the image into 800x800 square.
HTTP request
cURL
1
POST /v1-beta1/image/edit HTTP/1.1
2
Host: api.claid.ai
3
Authorization: Bearer YOUR-API-KEY
4
Content-Type: application/json
5
6
{
7
"input": "https://claid.ai/doc-samples/bag.jpeg",
8
"operations": {
9
"resizing": {
10
"width": 800,
11
"height": 800,
12
"fit": "crop"
13
},
14
"adjustments": {
15
"hdr": 60,
16
"sharpness": 40
17
}
18
},
19
"output": {
20
"format": {
21
"type": "jpeg",
22
"quality": 90
23
}
24
}
25
}
Copied!
1
curl https://api.claid.ai/v1-beta1/image/edit -X POST \
2
-H "Authorization: Bearer YOUR-API-KEY" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"input": "https://claid.ai/doc-samples/bag.jpeg",
6
"operations": {
7
"resizing": {
8
"width": 800,
9
"height": 800,
10
"fit": "crop"
11
},
12
"adjustments": {
13
"hdr": 60,
14
"sharpness": 40
15
}
16
},
17
"output": {
18
"format": {
19
"type": "jpeg",
20
"quality": 90
21
}
22
}
23
}'
Copied!
Your response should be similar to following:
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Content-Length: 319
4
Connection: keep-alive
5
ratelimit-limit: 120, 120;w=60, 4;w=1
6
ratelimit-remaining: 118
7
ratelimit-reset: 42
8
x-request-id: 4005f581-723f-4c79-85a1-bdd752718887
9
10
11
{
12
"data": {
13
"input": {
14
"ext": "jpeg",
15
"mps": 4.1472,
16
"mime": "image/jpeg",
17
"format": "JPEG",
18
"width": 2880,
19
"height": 1440
20
},
21
"output": {
22
"ext": "jpeg",
23
"mps": 0.64,
24
"mime": "image/jpeg",
25
"format": "JPEG",
26
"width": 800,
27
"height": 800,
28
"tmp_url": "....."
29
}
30
}
31
}
Copied!
Input image
Output image, 800x800 square