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 to do is just replace API key placeholder with your actual API key.

This sample request will perform ML-based color adjustment, sharpen the image and turn it into 800x800 square.

POST /v1-beta1/image/edit HTTP/1.1
Host: api.claid.ai
Authorization: Bearer {YOUR_API_KEY}
Content-Type: application/json

{
    "input": "https://claid.ai/doc-samples/bag.jpeg",
    "operations": {
        "resizing": {
            "width": 800,
            "height": 800,
            "fit": "crop"
        },
        "adjustments": {
            "hdr": 60,
            "sharpness": 40
        }
    },
    "output": {
        "format": {
	    "type": "jpeg",
	    "quality": 90
	}
    }
}

Your response should be similar to following:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 319
Connection: keep-alive
ratelimit-limit: 120, 120;w=60, 4;w=1
ratelimit-remaining: 118
ratelimit-reset: 42
x-request-id: 4005f581-723f-4c79-85a1-bdd752718887


{
  "data": {
    "input": {
      "ext": "jpeg",
      "mps": 4.1472,
      "mime": "image/jpeg",
      "format": "JPEG",
      "width": 2880,
      "height": 1440
    },
    "output": {
      "ext": "jpeg",
      "mps": 0.64,
      "mime": "image/jpeg",
      "format": "JPEG",
      "width": 800,
      "height": 800,
      "tmp_url": "....."
    }
  }
}

And here's the sample image we just used in our request (left) and the result it produced (right).

Last updated