New to Corsair? See API access, authentication, and error handling.
Background Generate
backgroundGenerate
backgroundGenerate
Generate an AI background for an image.
Risk: write
await corsair.claidai.api.backgroundGenerate({});
| Name | Type | Required | Description |
|---|---|---|---|
object | object | Yes | Product object to place on the scene |
scene | object | Yes | Scene settings |
output | object | No | Output settings |
object full type
object full type
{
image_url: string,
placement_type?: absolute | original,
rotation_degree?: number,
scale?: number,
position?: {
x: number,
y: number
}
}
scene full type
scene full type
{
prompt?: string | {
generate: boolean,
guidelines?: string
},
negative_prompt?: string,
model?: v1 | v2,
template_url?: string,
template_mode?: transform | adjust | lock,
color?: string,
view?: top | front,
aspect_ratio?: string,
preference?: fast | optimal | best
}
output full type
output full type
{
destination?: string,
number_of_images?: number,
format?: png | jpeg | webp | avif
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: Record<string, JsonValue>,
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Background Remove
backgroundRemove
backgroundRemove
Remove the background from an image using Claid.ai.
Risk: write
await corsair.claidai.api.backgroundRemove({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
color | string | No | Background color, for example “#ffffff” or “transparent” |
output | string | object | No | Output destination: a storage URI or an output settings object |
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
} | {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Create Storage
createStorage
createStorage
Create a Claid.ai storage connection.
Risk: write
await corsair.claidai.api.createStorage({});
object
Input full type
Input full type
{
name: string,
type: s3,
parameters: {
path?: string,
bucket: string,
credentials: {
access_key: string,
secret_access_key: string
}
}
} | {
name: string,
type: gcs,
parameters: {
path?: string,
bucket: string,
credentials: {
access_key: string,
secret_access_key: string
}
}
} | {
name: string,
type: web_folder,
parameters: {
base_url: string
}
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
id: number,
name: string,
type: web_folder | s3 | gcs,
parameters: {
path?: string,
bucket: string,
credentials?: {
access_key: string
}
} | {
base_url: string
},
created_at: string
}
Delete Storage
deleteStorage
deleteStorage
Delete a Claid.ai storage connection.
Risk: write
await corsair.claidai.api.deleteStorage({});
| Name | Type | Required | Description |
|---|---|---|---|
storage_id | number | Yes | Storage ID |
| Name | Type | Required | Description |
|---|---|---|---|
data | JsonValue | No | Deletion result |
Generative Resize
generativeResize
generativeResize
Resize an image using generative expansion.
Risk: write
await corsair.claidai.api.generativeResize({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
width | number | string | Yes | Target width |
height | number | string | Yes | Target height |
feathering | string | No | Transition smoothness, for example “20%“ |
output | string | object | No | Output destination: a storage URI or an output settings object |
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
} | {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Image Ai Edit
imageAiEdit
imageAiEdit
Submit an AI image editing task.
Risk: write
await corsair.claidai.api.imageAiEdit({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
options | object | Yes | AI edit options |
output | object | No | Output settings |
options full type
options full type
{
prompt: string,
model?: v1 | v2,
inference_steps?: number,
guidance_scale?: number,
aspect_ratio?: string
}
output full type
output full type
{
destination?: string,
format?: png | jpeg,
number_of_images?: number
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
id: number,
status: string,
result_url?: string,
created_at?: string,
request?: Record<string, JsonValue>,
errors?: {
error: string,
created_at?: string | number
}[],
result?: {
input_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_objects?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
},
results?: {
input_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_objects?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}[]
}
Image Edit Batch
imageEditBatch
imageEditBatch
Process multiple images using Claid.ai.
Risk: write
await corsair.claidai.api.imageEditBatch({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | string[] | object | Yes | Storage folder URI, list of image URLs, or a source object |
operations | Record<string, JsonValue> | Yes | Image editing operations, for example { resizing: { width: 1000 } } |
output | string | object | No | Output destination: a storage URI or an output settings object |
input full type
input full type
string | string[] | {
source: string,
recursive?: boolean
}
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
id: number,
status: string,
result_url?: string,
created_at?: string,
request?: Record<string, JsonValue>,
errors?: {
error: string,
created_at?: string | number
}[],
result?: {
input_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_objects?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
},
results?: {
input_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_object?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output_objects?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}[]
}
Image Generate
imageGenerate
imageGenerate
Generate an image using Claid.ai.
Risk: write
await corsair.claidai.api.imageGenerate({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text prompt |
options | object | No | Generation options |
output | string | No | Storage folder URI for results |
options full type
options full type
{
number_of_images?: number,
guidance_scale?: number
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: Record<string, JsonValue>,
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
License Plate Blur
licensePlateBlur
licensePlateBlur
Detect and blur license plates in an image.
Risk: write
await corsair.claidai.api.licensePlateBlur({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
output | string | object | No | Output destination: a storage URI or an output settings object |
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
} | {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Patch Storage
patchStorage
patchStorage
Update a Claid.ai storage connection.
Risk: write
await corsair.claidai.api.patchStorage({});
| Name | Type | Required | Description |
|---|---|---|---|
storage_id | number | Yes | Storage ID |
name | string | No | Storage name |
type | web_folder | s3 | gcs | No | Storage connector type |
parameters | object | No | Storage connection parameters to update |
parameters full type
parameters full type
{
base_url: string
} | {
path?: string,
bucket?: string,
credentials?: {
access_key?: string,
secret_access_key?: string
}
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
id: number,
name: string,
type: web_folder | s3 | gcs,
parameters: {
path?: string,
bucket: string,
credentials?: {
access_key: string
}
} | {
base_url: string
},
created_at: string
}
Polish Image
polishImage
polishImage
Polish and restore an image.
Risk: write
await corsair.claidai.api.polishImage({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
output | string | object | No | Output destination: a storage URI or an output settings object |
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
} | {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Smart Frame
smartFrame
smartFrame
Place an image inside a smart frame.
Risk: write
await corsair.claidai.api.smartFrame({});
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Image URL or storage URI of the input image |
width | number | string | Yes | Canvas width |
height | number | string | Yes | Canvas height |
padding | string | No | Space around the object, for example “10%” or “30px” |
background_color | string | No | Canvas color, for example “#ffffff” |
output | string | object | No | Output destination: a storage URI or an output settings object |
output full type
output full type
string | {
destination?: string,
format?: jpeg | png | webp | avif | tiff
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
input?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
},
output?: {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
} | {
ext?: string | null,
mps?: number | null,
mime?: string | null,
format?: string | null,
width?: number | null,
height?: number | null,
tmp_url?: string | null,
object_key?: string | null,
object_bucket?: string | null,
object_uri?: string | null,
claid_storage_uri?: string | null
}[]
}
Storage Details
storageDetails
storageDetails
Get details of a Claid.ai storage connection.
Risk: read
await corsair.claidai.api.storageDetails({});
| Name | Type | Required | Description |
|---|---|---|---|
storage_id | number | Yes | Storage ID |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
id: number,
name: string,
type: web_folder | s3 | gcs,
parameters: {
path?: string,
bucket: string,
credentials?: {
access_key: string
}
} | {
base_url: string
},
created_at: string
}
Storage List
storageList
storageList
List Claid.ai storage connections.
Risk: read
await corsair.claidai.api.storageList({});
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
data full type
data full type
{
id: number,
name: string,
type: web_folder | s3 | gcs,
parameters: {
path?: string,
bucket: string,
credentials?: {
access_key: string
}
} | {
base_url: string
},
created_at: string
}[]
Storage Types
storageTypes
storageTypes
List supported Claid.ai storage types.
Risk: read
await corsair.claidai.api.storageTypes({});
| Name | Type | Required | Description |
|---|---|---|---|
data | (web_folder | s3 | gcs)[] | Yes | — |