Search
K

API Reference

request and response description

AI Photoshoot contract

Below, you can see all possible options for the request body. See the AI Photoshoot Options and AI Photoshoot I/O sections to learn more about AI Photoshoot options.
{
"output": {
"destination": "storage://storage-name/path/"
"number_of_images": 4,
"format": "png"
},
"object": {
"image_url": "storage://storage-name/path/image.jpg",
"rotation_degree": 0,
"scale": 1,
"position": {
"x": 0.5,
"y": 0.5
}
},
"scene": {
"template_url": "storage://storage-name/path/template.jpeg",
"color": "#aece8c",
"view": "top",
"prompt": "on the wooden table in the dark room",
"negative_prompt": "watermark, low quality"
}
}
post
/v1-ea/scene/create
Create Scene Api
Request body
POST /v1-ea/scene/create HTTP/1.1
Host: api.claid.ai
Authorization: Bearer 12354567890
Content-Type: application/json
Content-Length: 174
{
"output": "storage://storage-name/path/",
"object": {
"image_url": "storage://storage-name/path/image.jpg",
"scale": 0.4
},
"scene": {
"prompt": "on the wooden table in the dark room"
}
}

Read a response

Once you have made the request to https://api.claid.ai/v1-ea/scene/create you will get a response with information about input text and output images.
Image information is shown in the response:
Parameter
Type
Description
ext
string
File extension. Will have png value
mps
integer
Megapixel count
mime
string
MIME type (also known as ‘media type’)
width
integer
Image width in pixels
height
integer
Image height in pixels
format
string
File format. Will have png value
tmp_url
string
Temporary URL of a processed image. Will be empty if output is specified
Response body
{
"data": {
"input": {
"ext": "png",
"mps": 0.375,
"mime": "image/png",
"format": "PNG",
"width": 500,
"height": 750
},
"output": [
{
"ext": "png",
"mps": 1.048576,
"mime": "image/png",
"format": "PNG",
"width": 1024,
"height": 1024,
"tmp_url": "https://storage.googleapis.com/production-leapi-tmp-public/733a7c8f-1fea-4097-8fd4-17f54c94d998/eyXNp9_1.png"
},
{
"ext": "png",
"mps": 1.048576,
"mime": "image/png",
"format": "PNG",
"width": 1024,
"height": 1024,
"tmp_url": "https://storage.googleapis.com/production-leapi-tmp-public/733a7c8f-1fea-4097-8fd4-17f54c94d998/eyXNp9_2.png"
},
]
}
}

Headers:

See the Request Headers and Response Headers to learn about headers.