Async API Reference
Image AI Fashion Models contract
This endpoint is asynchronous, it returns a response without waiting for an actual result. The actual result should be queried with another request. Or received by a webhook notification, see Webhook notification for more info.
{
"input": {
"model": "https://images.claid.ai/models/ai-fashion-model/d0ad3dafbd1d4fcfac4012ee810e7463.jpg",
"clothing": [
"https://images.claid.ai/photoshoot-templates/assets/images/f4945a28e9874eaa89fd43313f373040.png",
"https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg"
]
},
"output": {
"destination": "storage://storage-name/result-path/image-name.jpg",
"format": "png",
"number_of_images": 1
},
"options": {
"pose": "full body, front view, neutral stance, arms relaxed",
"background": "minimalistic studio background",
"aspect_ratio": "3:4"
}
}See AI Fashion Models I/O and AI Fashion Models Options learn about request data.
AI Fashion Models generation
Customize output format, destination and number of images.
{"number_of_images":1,"format":"png"}Input model and clothing images for the generation.
Customize the generation.
Successful Response
Authorization is required.
No API calls left.
Not enough permissions.
Unprocessable Entity.
Too many requests.
POST /v1/image/ai-fashion-models HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 374
{
"output": {
"number_of_images": 1,
"destination": "https://example.com",
"format": "png"
},
"input": {
"model": "storage://storage_1/path/image.jpg",
"clothing": [
"storage://storage_1/path/clothing1.png",
"storage://storage_1/path/clothing2.png"
]
},
"options": {
"pose": "full body, front view, neutral stance, arms relaxed",
"background": "minimalistic studio background",
"aspect_ratio": "1:1"
}
}{
"data": {
"id": 1,
"status": "ACCEPTED",
"created_at": "2025-10-28T16:22:33.693Z",
"request": {},
"result_url": "https://example.com"
}
}Request
POST /v1/image/ai-fashion-models HTTP/1.1
Host: api.claid.ai
Authorization: Bearer {YOUR_API_KEY}
Content-Type: application/json
{
"input": {
"clothing": [
"https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg"
]
},
"options": {
"pose": "full body, front view, neutral stance, arms relaxed",
}
}curl -X POST --location "https://api.claid.ai/v1/image/ai-fashion-models" --http1.1 \
-H "Host: api.claid.ai" \
-H "Authorization: Bearer {YOUR_API_KEY}" \
-H "Content-Type: application/json" \
-d "{
\"input\": {
\"clothing\": [
\"https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg\"
]
},
\"options\": {
\"pose\": \"full body, front view, neutral stance, arms relaxed\"
}
}"Read a response
Once you have made the request to https://api.claid.ai/v1/image/ai-fashion-models you will get a response with information about request status and some other details (listed below).
Request information shown in the response:
id
integer
Task ID.
status
string
Request processing status. For a valid request can only have one value: ACCEPTED.
result_url
string
URL of GET endpoint that can be used to get the result manually and get request status while it is still in process.
created_at
string
Exact time when the processing was requested.
request
object
The body of the request that was used for processing.
Response body
{
"data": {
"id": 1,
"status": "ACCEPTED",
"result_url": "https://api.claid.ai/v1/image/ai-fashion-models/1",
"created_at": "2025-03-13T11:37:09.160554+00:00",
"request": {
"input": {
"clothing": [
"https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg"
]
},
"options": {
"pose": "full body, front view, neutral stance, arms relaxed"
}
}
}
}See the Request Headers and Response Headers to learn about headers.
Webhook notification
See Webhook notification to learn about webhook handling.
Result of request processing contract
To get result, you need to know the ID of the processing request. Or you can take a ready-to-use link from the result_url property of the response body described above.
AI Fashion Models generation result
Successful Response
Authorization is required.
Not enough permissions.
Web image not found.
Validation Error
GET /v1/image/ai-fashion-models/{processing_request_id} HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"data": {
"id": 1,
"status": "ACCEPTED",
"created_at": "2025-10-28T16:22:33.693Z",
"request": {},
"errors": [
{
"error": "text",
"created_at": "2025-10-28T16:22:33.693Z"
}
],
"result": {
"input_objects": [
{
"ext": "text",
"mps": 1,
"mime": "text",
"format": "text",
"width": 1,
"height": 1
}
],
"output_objects": [
{
"ext": "text",
"mps": 1,
"mime": "text",
"format": "text",
"width": 1,
"height": 1,
"tmp_url": "text",
"object_key": "text",
"object_bucket": "text",
"object_uri": "text",
"claid_storage_uri": "text"
}
]
}
}
}Request
GET /v1/image/ai-fashion-models/1 HTTP/1.1
Host: api.claid.ai
Authorization: Bearer {YOUR_API_KEY}curl -X GET --location "https://api.claid.ai/v1/image/ai-fashion-models/1" --http1.1 \
-H "Host: api.claid.ai" \
-H "Authorization: Bearer {YOUR_API_KEY}"Read a response
Once you have made the request to https://api.claid.ai/v1/image/ai-fashion-models/<task_id> you will get a response with information about the request, input and output images.
Image information shown in the response:
id
integer
Task ID.
status
string
Request processing status. Can have values: ACCEPTED, PROCESSING, ERROR, DONE.
created_at
string
Exact time when the processing was requested.
request
object
The body of the request that was used for processing.
errors
list
List of errors, if any are occurred during image processing (status will have ERROR value), in other cases - will be empty.
result
object
Result object that is contain 2 properties input_objects and output_objects, in case of processing errors - will be empty. Details are listed below.
Read a input_objects and output_objects properties of response result property:
ext
string
File extension. Can have values: jpg, png.
mps
float
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. Can have values: jpeg, png.
tmp_url
string
Temporary URL of a processed image. Is available only for output_objects.
Read an item from errors property:
error
string
Error message in text.
created_at
integer
Exact time when the error was caught.
Response body
{
"data": {
"id": 1,
"status": "DONE",
"created_at": "2025-03-13T11:37:09.160554+00:00",
"request": {
"input": {
"clothing": [
"https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg"
]
},
"options": {
"pose": "full body, front view, neutral stance, arms relaxed"
}
},
"errors": [],
"result": {
"input_objects": [
{
"ext": "jpeg",
"mps": 0.5,
"mime": "image/jpeg",
"format": "JPEG",
"width": 500,
"height": 500
}
],
"output_objects": [
{
"ext": "jpeg",
"mps": 1.0,
"mime": "image/jpeg",
"format": "JPEG",
"width": 1024,
"height": 1024,
"tmp_url": "https://dl.claid.ai/path-to-output/image-name.png"
}
]
}
}
}See Response headers to learn about headers.
Last updated
