Skip to content
Start here

V1

List images
Deprecated
GET/accounts/{account_id}/images/v1
Image details
GET/accounts/{account_id}/images/v1/{image_id}
Upload an image
POST/accounts/{account_id}/images/v1
Update image
PATCH/accounts/{account_id}/images/v1/{image_id}
Delete image
DELETE/accounts/{account_id}/images/v1/{image_id}
ModelsExpand Collapse
Image { id, creator, filename, 4 more }
id: optional string

Image unique identifier.

maxLength32
creator: optional string

Can set the creator field with an internal user ID.

maxLength1024
filename: optional string

Image file name.

maxLength255
meta: optional unknown

User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes.

requireSignedURLs: optional boolean

Indicates whether the image can be a accessed only using it’s UID. If set to true, a signed token needs to be generated with a signing key to view the image.

uploaded: optional string

When the media item was uploaded.

formatdate-time
variants: optional array of string

Object specifying available variants for an image.

V1ListResponse { images }
images: optional array of Image { id, creator, filename, 4 more }
id: optional string

Image unique identifier.

maxLength32
creator: optional string

Can set the creator field with an internal user ID.

maxLength1024
filename: optional string

Image file name.

maxLength255
meta: optional unknown

User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes.

requireSignedURLs: optional boolean

Indicates whether the image can be a accessed only using it’s UID. If set to true, a signed token needs to be generated with a signing key to view the image.

uploaded: optional string

When the media item was uploaded.

formatdate-time
variants: optional array of string

Object specifying available variants for an image.

V1DeleteResponse = unknown or string
One of the following:
unknown
string

V1Keys

List Signing Keys
GET/accounts/{account_id}/images/v1/keys
Create a new Signing Key
PUT/accounts/{account_id}/images/v1/keys/{signing_key_name}
Delete Signing Key
DELETE/accounts/{account_id}/images/v1/keys/{signing_key_name}
ModelsExpand Collapse
Key { name, value }
name: optional string

Key name.

value: optional string

Key value.

KeyListResponse { keys }
keys: optional array of Key { name, value }
name: optional string

Key name.

value: optional string

Key value.

KeyUpdateResponse { keys }
keys: optional array of Key { name, value }
name: optional string

Key name.

value: optional string

Key value.

KeyDeleteResponse { keys }
keys: optional array of Key { name, value }
name: optional string

Key name.

value: optional string

Key value.

V1Stats

Images usage statistics
GET/accounts/{account_id}/images/v1/stats
ModelsExpand Collapse
Stat { count }
count: optional { allowed, current }
allowed: optional number

Cloudflare Images allowed usage.

current: optional number

Cloudflare Images current usage.

V1Variants

List variants
GET/accounts/{account_id}/images/v1/variants
Variant details
GET/accounts/{account_id}/images/v1/variants/{variant_id}
Create a variant
POST/accounts/{account_id}/images/v1/variants
Update a variant
PATCH/accounts/{account_id}/images/v1/variants/{variant_id}
Delete a variant
DELETE/accounts/{account_id}/images/v1/variants/{variant_id}
ModelsExpand Collapse
Variant { variants }
variants: optional { hero }
hero: optional { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: { fit, height, metadata, width }

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

fit: "scale-down" or "contain" or "cover" or 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" or "copyright" or "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: optional boolean

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

VariantGetResponse { variant }
variant: optional { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: { fit, height, metadata, width }

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

fit: "scale-down" or "contain" or "cover" or 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" or "copyright" or "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: optional boolean

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

VariantCreateResponse { variant }
variant: optional { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: { fit, height, metadata, width }

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

fit: "scale-down" or "contain" or "cover" or 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" or "copyright" or "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: optional boolean

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

VariantEditResponse { variant }
variant: optional { id, options, neverRequireSignedURLs }
id: string
maxLength99
options: { fit, height, metadata, width }

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

fit: "scale-down" or "contain" or "cover" or 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" or "copyright" or "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: optional boolean

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

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

V1Blobs

Base image
GET/accounts/{account_id}/images/v1/{image_id}/blob