Let's Enhance Image API
Encompasses operations with images.
Encompasses operations with images.
openapi: 3.1.0
info:
title: Claid REST Image API
version: v1
description: Claid REST API v1 - the AI image editing, enhancement, generation and image-to-video API operated by Let's Enhance (Claid.ai). Covers synchronous and asynchronous image editing, batch processing, direct upload, AI edit by natural-language instruction, AI fashion models, AI background scene creation, image generation, image-to-video generation, and cloud storage connector management. Consolidated verbatim from the per-endpoint OpenAPI 3.1 definitions published in the Claid API reference at https://docs.claid.ai/.
servers:
- url: https://api.claid.ai
description: Claid API production
tags:
- name: Image
description: Encompasses operations with images.
paths:
/v1/scene/create:
post:
tags:
- Image
summary: Create Scene Api
description: "Specifies: \n- object to place on the scene and its properties (`object`)\n- scene properties (`scene`)\n- how many images will be created and where they will be stored (`output`)"
operationId: create_scene_api_v1_scene_create_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SceneCreateAPIIn'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_ScenePipelineResponseOut_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer:
- image_generation
- OAuth2PasswordBearer: []
/v1/image/ai-fashion-models:
post:
tags:
- Image
summary: Async Try On Generation Api
description: AI Fashion Models generation
operationId: async_try_on_generation_api_v1_image_ai_fashion_models_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TryOnAPIRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_TryOnAPIAcceptedResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer:
- image_editing
- OAuth2PasswordBearer: []
/v1/image/ai-fashion-models/{processing_request_id}:
get:
tags:
- Image
summary: Async Try On Generation Async Status
description: AI Fashion Models generation result
operationId: async_try_on_generation_async_status_v1_image_ai_fashion_models__processing_request_id__get
parameters:
- required: true
schema:
title: Processing Request Id
type: integer
name: processing_request_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_TryOnAPIResultResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'404':
description: Web image not found.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- OAuth2PasswordBearer:
- image_editing
/v1/image/ai-edit:
post:
tags:
- Image
summary: Async Ai Edit Generation Api
description: AI Edit
operationId: async_ai_edit_generation_api_v1_image_ai_edit_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AiEditAPIRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_AiEditAcceptedResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer:
- image_editing
- OAuth2PasswordBearer: []
/v1/image/ai-edit/{ai_edit_id}:
get:
tags:
- Image
summary: Async Ai Edit Generation Api Status
description: Get AI Edit generation result
operationId: async_ai_edit_generation_api_status_v1_image_ai_edit__ai_edit_id__get
parameters:
- required: true
schema:
title: Ai Edit Id
type: integer
name: ai_edit_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_AiEditResultResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'404':
description: Web image not found.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit:
post:
tags:
- Image
summary: Image Edit
description: "Specifies: \n- what image will be processed (`input`)\n- how it will be processed (`operations`)\n- where it will be stored (`output`)"
operationId: image_edit_v1_image_edit_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EditRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_EditResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer: []
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit/async:
post:
tags:
- Image
summary: Async Image Edit
description: "Specifies: \n- what image will be processed (`input`)\n- how it will be processed (`operations`)\n- where it will be stored (`output`)"
operationId: async_image_edit_v1_image_edit_async_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncEditRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_AsyncAcceptedResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer: []
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit/async/{task_id}:
get:
tags:
- Image
summary: Async Image Edit Result
operationId: async_image_edit_result_v1_image_edit_async__task_id__get
parameters:
- required: true
schema:
title: Task Id
type: integer
name: task_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_AsyncResultResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'404':
description: Batch image edit pipeline not found.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit/batch:
post:
tags:
- Image
summary: Process Batch Image Edit
description: "Specifies: \n- what images will be processed (`input`)\n- how they will be processed (`operations`)\n- where they will be stored (`output`)"
operationId: process_batch_image_edit_v1_image_edit_batch_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BatchEditRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_BatchAcceptedResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer: []
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit/batch/{task_id}:
get:
tags:
- Image
summary: Image Edit Batch Async Results
operationId: image_edit_batch_async_results_v1_image_edit_batch__task_id__get
parameters:
- required: true
schema:
title: Task Id
type: integer
name: task_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_BatchResultResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'404':
description: Batch image edit pipeline not found.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer:
- image_editing
/v1/image/edit/upload:
post:
tags:
- Image
summary: Image Edit Upload
description: "Specifies: \n- how the image will be processed (`operations`)\n- where it will be stored (`output`)"
operationId: image_edit_upload_v1_image_edit_upload_post
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_image_edit_upload_v1_image_edit_upload_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_EditResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer: []
- OAuth2PasswordBearer:
- image_editing
/v1/image/generate:
post:
tags:
- Image
summary: Image Generate
description: "Specifies: \n- text prompt for image generation (`input`)\n- image generation options (`options`)\n- where results will be stored (`output`)"
operationId: image_generate_v1_image_generate_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Response_GenerateResponse_'
'401':
description: Authorization is required.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'402':
description: No API calls left.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'403':
description: Not enough permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'422':
description: Unprocessable Entity.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
'429':
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorDetails'
security:
- OAuth2PasswordBearer: []
- OAuth2PasswordBearer:
- image_editing
components:
schemas:
AsyncPipelineResultItem:
title: AsyncPipelineResultItem
required:
- input_object
- output_object
type: object
properties:
input_object:
$ref: '#/components/schemas/PipelineInputObject'
output_object:
$ref: '#/components/schemas/PipelineOutputObject'
AsyncResultResponse:
title: AsyncResultResponse
required:
- id
- status
- created_at
- request
type: object
properties:
id:
title: Id
type: integer
status:
$ref: '#/components/schemas/APIV1Status'
result_url:
title: Result Url
maxLength: 65536
minLength: 1
type: string
format: uri
created_at:
title: Created At
type: string
format: date-time
request:
title: Request
anyOf:
- $ref: '#/components/schemas/BatchEditRequest'
- $ref: '#/components/schemas/AsyncEditRequest'
- type: object
errors:
title: Errors
type: array
items:
$ref: '#/components/schemas/BatchPipelineError'
default: []
result:
title: Result
allOf:
- $ref: '#/components/schemas/AsyncPipelineResultItem'
default: {}
TryOnAPIRequest:
title: TryOnAPIRequest
required:
- input
- options
type: object
properties:
output:
title: Output
anyOf:
- $ref: '#/components/schemas/TryOnAPIRequestOutputObject'
- type: string
minLength: 1
maxLength: 4096
format: uri
description: Customize output format, destination and number of images.
default:
number_of_images: 1
format: png
input:
title: Input
allOf:
- $ref: '#/components/schemas/TryOnAPIRequestInputOptions'
description: Input model and clothing images for the generation.
options:
title: Options
allOf:
- $ref: '#/components/schemas/TryOnAPIRequestOptionsObject'
description: Customize the generation.
additionalProperties: false
BatchEditInputOptions:
title: image input options
required:
- source
type: object
properties:
source:
title: Input folder URL
maxLength: 4096
minLength: 1
type: string
description: URL of the input file or folder. Should be from 1 to 512 characters. Must be accessible by our system.
format: uri
recursive:
title: Recursive
type: boolean
description: 'If `true`, recursively processes all images in subfolders as well, works only if source is folder. '
default: false
additionalProperties: false
PipelineInputObject:
title: PipelineInputObject
required:
- ext
- mps
- mime
- format
- width
- height
type: object
properties:
ext:
title: Ext
type: string
description: 'File extension. Can have values: `"jpg"`, `"png"`, `"avif"`'
mps:
title: Mps
type: number
description: Megapixel count
mime:
title: Mime
type: string
description: MIME type (also known as ‘media type’)
format:
title: Format
type: string
description: 'File format. Can have values: `"jpeg"`, `"png"`, `"avif"`'
width:
title: Width
type: integer
description: Image width in pixels
height:
title: Height
type: integer
description: Image height in pixels
AiEditError:
title: AiEditError
required:
- error
- created_at
type: object
properties:
error:
title: Error
type: string
created_at:
title: Created At
type: string
format: date-time
PipelineInputObjectInError:
title: PipelineInputObjectInError
required:
- ext
- mps
- mime
- format
- width
- height
type: object
properties:
ext:
title: Ext
type: string
description: 'File extension. Can have values: `"jpg"`, `"png"`, `"avif"`'
mps:
title: Mps
type: number
description: Megapixel count
mime:
title: Mime
type: string
description: MIME type (also known as ‘media type’)
format:
title: Format
type: string
description: 'File format. Can have values: `"jpeg"`, `"png"`, `"avif"`'
width:
title: Width
type: integer
description: Image width in pixels
height:
title: Height
type: integer
description: Image height in pixels
CropOptions:
title: crop options
required:
- type
type: object
properties:
type:
title: Type
enum:
- crop
type: string
crop:
title: Crop mode
allOf:
- $ref: '#/components/schemas/FitCropEnum'
description: "Selects the crop mode: \n\n| Value | Description |\n| --- | --- |\n| `\"center\"` | Cropping relative to the center of the image.|\n| `\"smart\"` | Content aware image cropping.|\n"
default: center
additionalProperties: false
EditResponse:
title: EditResponse
required:
- input
- output
type: object
properties:
input:
$ref: '#/components/schemas/PipelineInputObject'
output:
$ref: '#/components/schemas/PipelineOutputObject'
profiling:
title: Profiling
type: object
SceneCreateAPIObjectPaddingIn:
title: SceneCreateAPIObjectPaddingIn
required:
- image_url
- placement_type
- padding
type: object
properties:
image_url:
title: Object image file URL
maxLength: 4096
minLength: 1
type: string
description: URL of the input image. Should be from 1 to 4096 characters. Image must be accessible by our system. For better results, the background of the image should be transparent.
format: uri
placement_type:
title: Placement Type
enum:
- padding
type: string
description: '`"padding"` placement type allows to add a space around the object equally to each of 4 sides, or for height&width separately.'
padding:
title: Padding around the object
type: string
description: Add a space around the object equally to each of 4 sides, or for height&width separately. Can not be bigger than half of image width/height.
additionalProperties: false
TryOnAPIAcceptedResponse:
title: TryOnAPIAcceptedResponse
required:
- id
- status
- created_at
- request
- result_url
type: object
properties:
id:
title: Id
type: integer
status:
$ref: '#/components/schemas/APIV1Status'
created_at:
title: Created At
type: string
format: date-time
request:
title: Request
type: object
result_url:
title: Result Url
maxLength: 65536
minLength: 1
type: string
format: uri
ScenePipelineResponseOut:
title: ScenePipelineResponseOut
required:
- input
- output
type: object
properties:
input:
$ref: '#/components/schemas/PipelineInputObject'
output:
title: Output
type: array
items:
$ref: '#/components/schemas/PipelineOutputObject'
profiling:
title: Profiling
type: object
TiffLossyCompressionOptions:
title: TiffLossyCompressionOptions
required:
- type
type: object
properties:
type:
title: Type
enum:
- lossy
type: string
description: Must have value `"lossy"`
quality:
title: Quality
maximum: 100
minimum: 1
type: integer
default: 75
additionalProperties: false
SceneEffectEnum:
title: Additional scene effect
enum:
- shadows
type: string
description: 'Selects the scene effect.
| Value | Description |
| --- | --- |
| `"shadows"` | Apply shadow generation on the image.|
'
ColorEnum:
title: Transparent
enum:
- transparent
type: string
description: Makes the background of the image transparent, only works for `"png"` output format.
BatchPipelineError:
title: BatchPipelineError
required:
- error
- created_at
type: object
properties:
error:
title: Error
type: string
created_at:
title: Created At
type: string
input_object:
$ref: '#/components/schemas/PipelineInputObjectInError'
AsyncAcceptedResponse:
title: AsyncAcceptedResponse
required:
- id
- status
- created_at
- request
type: object
properties:
id:
title: Id
type: integer
status:
$ref: '#/components/schemas/APIV1Status'
result_url:
title: Result Url
maxLength: 65536
minLength: 1
type: string
format: uri
created_at:
title: Created At
type: string
format: date-time
request:
title: Request
anyOf:
- $ref: '#/components/schemas/BatchEditRequest'
- $ref: '#/components/schemas/AsyncEditRequest'
- type: object
errors:
title: Errors
type: array
items:
$ref: '#/components/schemas/BatchPipelineError'
default: []
result:
title: Result
allOf:
- $ref: '#/components/schemas/AsyncPipelineResultItem'
default: {}
MetadataOptions:
title: image color space options
type: object
properties:
dpi:
title: DPI
type: integer
description: Dots per inch.
color_space:
title: Color Space
anyOf:
- $ref: '#/components/schemas/ColorSpaceEnum'
- $ref: '#/components/schemas/RGBColorSpaceOptions'
- $ref: '#/components/schemas/CMYKColorSpaceOptions'
description: Specifies desirable color space of the output image. By default, preserves the color space of the original image.
additionalProperties: false
SceneCreateAPIScenePromptIn:
title: Template-free scene
required:
- prompt
type: object
properties:
model:
title: Scene creation model
allOf:
- $ref: '#/components/schemas/SceneCreateModelEnum'
description: Selects the scene creation model. By default, the model is 'v1'.
default: v1
prompt:
title: Text prompt for scene creation
anyOf:
- type: string
minLength: 3
maxLength: 2048
- $ref: '#/components/schemas/ScenePromptAdvancedIn'
description: Text prompt that will be used to create the scene. Should be from 3 to 2048 characters.
negative_prompt:
title: Negative text prompt for scene creation
maxLength: 2048
minLength: 3
type: string
description: 'Text prompt that will exclude things from the scene. Should be from 3 to 2048 characters. '
steps:
title: Number of inference steps
# --- truncated at 32 KB (110 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lets-enhance/refs/heads/main/openapi/lets-enhance-image-api-openapi.yml