Skip to content
Start here

Variants

List variants
client.images.v1.variants.list(VariantListParams { account_id } params, RequestOptionsoptions?): Variant { variants }
GET/accounts/{account_id}/images/v1/variants
Variant details
client.images.v1.variants.get(stringvariantId, VariantGetParams { account_id } params, RequestOptionsoptions?): VariantGetResponse { variant }
GET/accounts/{account_id}/images/v1/variants/{variant_id}
Create a variant
client.images.v1.variants.create(VariantCreateParams { account_id, id, options, neverRequireSignedURLs } params, RequestOptionsoptions?): VariantCreateResponse { variant }
POST/accounts/{account_id}/images/v1/variants
Update a variant
client.images.v1.variants.edit(stringvariantId, VariantEditParams { account_id, options, neverRequireSignedURLs } params, RequestOptionsoptions?): VariantEditResponse { variant }
PATCH/accounts/{account_id}/images/v1/variants/{variant_id}
Delete a variant
client.images.v1.variants.delete(stringvariantId, VariantDeleteParams { account_id } params, RequestOptionsoptions?): VariantDeleteResponse
DELETE/accounts/{account_id}/images/v1/variants/{variant_id}
ModelsExpand Collapse
Variant { variants }
variants?: Variants { hero }
hero?: Hero { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: Options { fit, height, metadata, width }

Allows you to define image resizing sizes for different use cases.

fit: "scale-down" | "contain" | "cover" | 2 more

The fit property describes how the width and height dimensions should be interpreted.

One of the following:
"scale-down"
"contain"
"cover"
"crop"
"pad"
height: number

Maximum height in image pixels.

minimum1
metadata: "keep" | "copyright" | "none"

What EXIF data should be preserved in the output image.

One of the following:
"keep"
"copyright"
"none"
width: number

Maximum width in image pixels.

minimum1
neverRequireSignedURLs?: boolean

Indicates whether the variant can access an image without a signature, regardless of image access control.

VariantGetResponse { variant }
variant?: Variant { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: Options { fit, height, metadata, width }

Allows you to define image resizing sizes for different use cases.

fit: "scale-down" | "contain" | "cover" | 2 more

The fit property describes how the width and height dimensions should be interpreted.

One of the following:
"scale-down"
"contain"
"cover"
"crop"
"pad"
height: number

Maximum height in image pixels.

minimum1
metadata: "keep" | "copyright" | "none"

What EXIF data should be preserved in the output image.

One of the following:
"keep"
"copyright"
"none"
width: number

Maximum width in image pixels.

minimum1
neverRequireSignedURLs?: boolean

Indicates whether the variant can access an image without a signature, regardless of image access control.

VariantCreateResponse { variant }
variant?: Variant { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: Options { fit, height, metadata, width }

Allows you to define image resizing sizes for different use cases.

fit: "scale-down" | "contain" | "cover" | 2 more

The fit property describes how the width and height dimensions should be interpreted.

One of the following:
"scale-down"
"contain"
"cover"
"crop"
"pad"
height: number

Maximum height in image pixels.

minimum1
metadata: "keep" | "copyright" | "none"

What EXIF data should be preserved in the output image.

One of the following:
"keep"
"copyright"
"none"
width: number

Maximum width in image pixels.

minimum1
neverRequireSignedURLs?: boolean

Indicates whether the variant can access an image without a signature, regardless of image access control.

VariantEditResponse { variant }
variant?: Variant { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: Options { fit, height, metadata, width }

Allows you to define image resizing sizes for different use cases.

fit: "scale-down" | "contain" | "cover" | 2 more

The fit property describes how the width and height dimensions should be interpreted.

One of the following:
"scale-down"
"contain"
"cover"
"crop"
"pad"
height: number

Maximum height in image pixels.

minimum1
metadata: "keep" | "copyright" | "none"

What EXIF data should be preserved in the output image.

One of the following:
"keep"
"copyright"
"none"
width: number

Maximum width in image pixels.

minimum1
neverRequireSignedURLs?: boolean

Indicates whether the variant can access an image without a signature, regardless of image access control.

VariantDeleteResponse = unknown | string
One of the following:
unknown
string