Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /mcp | POST | Streamable HTTP transportRecommended |
| /sse | GET | SSE transportDeprecated |
Server URL
http://asset-management.mcp.cloudinary.com/mcp
Configuration
Add this to your MCP client configuration. OAuth is used by default when no headers are provided.
{
"mcpServers": {
"@cloudinary/asset-management-mcp": {
"url": "http://asset-management.mcp.cloudinary.com/mcp"
}
}
}
{
"mcpServers": {
"@cloudinary/asset-management-mcp": {
"url": "http://asset-management.mcp.cloudinary.com/mcp",
"headers": {
"cloudinary-url": "cloudinary://api_key:api_secret@cloud_name"
}
}
}
}
Authentication
| Method | Description |
|---|---|
| OAuth 2.0 | Default. The OAuth flow is initiated automatically when the client connects with no auth headers. |
| API Key | Pass cloudinary-url header, or individual cloudinary-cloud-name, cloudinary-api-key, cloudinary-api-secret headers. |
Configuration Headers
Optional headers to customize server behavior. Applied at session creation time.
| Header | Description |
|---|---|
cloudinary-region |
API region: api, api-eu, or api-ap |
cloudinary-tools |
Comma-separated list of tools to enable (e.g. search-assets,list-images) |
Response Headers
API response headers are collected into _meta.headers on each tool result. The debug preset is active by default.
| Header | Description |
|---|---|
cloudinary-collect-headers |
Control which response headers are returned. Accepts:
debug — rate-limit + request ID (default)
ratelimit — rate-limit headers only
all — every response header
Or a comma-separated list of exact names, prefix:<value>, regex:<pattern>, and preset names
|
cloudinary-embed-headers |
Set to true to also include collected headers in the response body as _headers, for clients that don't surface _meta |
{
"_meta": {
"headers": {
"x-featureratelimit-limit": "5000",
"x-featureratelimit-remaining": "4998",
"x-featureratelimit-reset": "Thu, 13 Feb 2026 00:00:00 GMT",
"x-request-id": "bfeaccc60050594832508590a358a1a4"
}
},
"content": [{ "type": "text", "text": "{...}" }]
}
Available Tools (23)
Uploads media assets (images, videos, raw files) to your Cloudinary product environment
Uploads media assets (images, videos, raw files) to your Cloudinary product environment. The file is securely stored
in the cloud with backup and revision history. Cloudinary automatically analyzes and saves important data about each
asset, such as format, size, resolution, and prominent colors, which is indexed to enable searching on those attributes.
Supports uploading from:
- Local file paths (SDKs/MCP server only). For MCP server path MUST start with file://
- Remote HTTP/HTTPS URLs
- Base64 Data URIs (max ~60 MB)
- Private storage buckets (S3 or Google Storage)
- FTP addresses
The uploaded asset is immediately available for transformation and delivery upon successful upload.
Transform media files using transformation syntax in delivery URLs, which creates derived files accessible immediately without re-uploading the original.
| Parameter | Type | Description |
|---|---|---|
resource_type |
Abcstring | The type of resource (image, video, raw, or auto). |
upload_request required |
{ }object | The file to upload and associated parameters. |
access_control |
[ ]array | Restricts access to the asset by specifying one or more access types. |
access_mode |
Abcstring | Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. |
accessibility_analysis |
◉boolean | Whether to return accessibility analysis values for the image. |
allowed_formats |
Abcstring | A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions. |
asset_folder |
Abcstring | The asset folder to assign to the asset. |
async |
◉boolean | When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false. |
auto_chaptering |
◉boolean | Whether to trigger automatic generation of video chapters. Chapters will be generated and saved as a .vtt file with -chapters appended to the public ID of the video. You can enable chapters as part of the Cloudinary Video Player. Relevant for videos only. |
auto_tagging |
#number | Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.
|
auto_transcription |
◉boolean{ }object | |
background_removal |
Abcstring | Automatically remove the background of an image using an add-on.
|
backup |
◉boolean | Whether to backup the uploaded asset. When set to true, backs up uploaded assets to a secondary storage bucket. |
callback |
Abcstring | A URL to redirect to after the upload/explicit is completed instead of returning the upload response. |
categorization |
Abcstring | A comma-separated list of the categorization add-ons to run on the asset. |
cinemagraph_analysis |
◉boolean | Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0. |
clear_invalid |
◉boolean | Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false. |
colors |
◉boolean | Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned. |
context |
Abcstring | A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). The =, ", and | characters can be escaped with a prepending backslash (\). |
custom_coordinates |
Abcstring | Custom coordinates as comma-separated values, with multiple coordinates separated by pipes. |
detection |
Abcstring | Invokes the relevant add-on to return a list of detected content.
|
discard_original_filename |
◉boolean | Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the flag disposition:attachment in delivery URLs). |
display_name |
Abcstring | A display name for the asset. |
eager |
Abcstring | A list of transformations to eagerly generate for the asset. Accepts either a single transformation or a pipe-separated list of transformations. |
eager_async |
◉boolean | Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed. |
eager_notification_url |
Abcstring | A URL to notify when eager transformations are completed. |
eval |
Abcstring | Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file. |
face_coordinates |
Abcstring | Face coordinates as comma-separated values, with multiple faces separated by pipes. |
faces |
◉boolean | Whether to detect faces in the asset. |
file required |
Abcstring | One of the following:
|
filename_override |
Abcstring | Overrides the originally uploaded asset's file name in downloads that use flags like fl_attachment or fl_force_original. |
folder |
Abcstring | Folder name where the uploaded asset will be stored. This parameter applies when using the Admin API, or when specifying the upload preset for unsigned uploading with the Upload API. |
format |
Abcstring | An optional format to convert the uploaded asset to before saving in the cloud. |
headers |
Abcstring | An HTTP header or a list of headers lines for adding as response HTTP headers when delivering the asset to your users. Supported headers: Link, Authorization, X-Robots-Tag. |
invalidate |
◉boolean | Whether to invalidate CDN cache copies of a previously uploaded asset that shares the same public ID. Default: false. |
media_metadata |
◉boolean | Whether to return IPTC, XMP, and detailed Exif metadata of the uploaded asset in the response.
|
metadata |
Abcstring{ }object | A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset. |
moderation |
Abcstring | For all asset types, set to:
For images only, set to:
For videos only, set to:
To request multiple moderations in a single API call:
Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes. |
notification_url |
Abcstring | A URL to notify when the asset is ready. |
ocr |
Abcstring | Set to adv_ocr to extract all text elements in an image as well as the bounding box |
on_success |
Abcstring | Allows you to update an asset by specifying custom logic with JavaScript that is executed after the upload to Cloudinary is completed successfully. This can be useful for conditionally adding tags, contextual metadata, and structured metadata, depending on the results of using the detection parameter on upload. |
overwrite |
◉boolean | Whether to overwrite existing assets with the same public ID. When set to false, return immediately if an asset with the same public ID already exists. Default: true (when using unsigned upload, the default is false and cannot be changed to true). |
phash |
◉boolean | Whether to return the perceptual hash (pHash) on the uploaded image for image similarity detection. |
proxy |
Abcstring | A proxy to use for fetching remote URLs. The format should be http://hostname:port. |
public_id |
Abcstring | The identifier that is used for accessing the uploaded asset. If not specified, a unique ID is generated automatically. |
public_id_prefix |
Abcstring | A string or path that's automatically prepended to the public_id with a forward slash. The value can contain the same characters as the public_id including additional forward slashes. This prefix can be useful to provide context and improve the SEO of an asset's filename in the delivery URL, but the value does not impact the location where the asset is stored. |
quality_analysis |
◉boolean | Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Relevant for images only. |
raw_convert |
Abcstring | Generates a related file based on the uploaded file.
|
regions |
Abcstring{ }object | Named region coordinate groups for cropping with region gravity. |
responsive_breakpoints |
[ ]array{ }object | Settings to automatically generate breakpoints for responsive images. |
return_delete_token |
◉boolean | Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call. |
tags |
Abcstring[ ]array | A comma-separated list of tag names, or an array of tag names. |
transformation |
Abcstring | An incoming transformation to run on the uploaded asset before its storage. In contrast to eager, this parameter is applied before the file is stored. |
type |
Abcstring | The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). |
unique_display_name |
◉boolean | Whether the display name should be unique. |
unique_filename |
◉boolean | When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed). |
upload_preset |
Abcstring | (Required for unsigned uploading / optional for signed uploading) |
use_asset_folder_as_public_id_prefix |
◉boolean | Whether to add the asset_folder value as a prefix to the public_id value (prepended with a forward slash). This ensures that the public ID path will always match the initial asset folder, and can help to retain the behavior that previously existed in fixed folder mode. However, keep in mind that even when this option is used during upload, an asset with a certain public ID path can later be moved to a completely different asset folder hierarchy without impacting the public ID. This option only ensures path matching for the initial upload. Relevant only when public_id_prefix (or folder) has not been separately specified. |
use_filename |
◉boolean | Whether to use the original file name of the uploaded asset if available for the public ID. The file name is normalized and random characters are appended to ensure uniqueness if the file name already exists. Default: false. |
use_filename_as_display_name |
◉boolean | Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set. |
visual_search |
◉boolean | Whether to index the image for use with visual searches. Relevant for images only. |
Updates an existing asset's identifier (public ID) and optionally other metadata in your Cloudinary account
| Parameter | Type | Description |
|---|---|---|
resource_type required |
Abcstring | The type of resource (image, video, or raw). |
RequestBody required |
{ }object | The rename request parameters. |
context |
◉boolean | Whether to include contextual metadata in the response. Default is false. |
from_public_id required |
Abcstring | The public ID of the asset to rename. |
invalidate |
◉boolean | Whether to invalidate CDN cache copies of the renamed asset. Default is false. |
metadata |
◉boolean | Whether to include structured metadata in the response. Default is false. |
notification_url |
Abcstring | URL to notify when the operation is complete. |
overwrite |
◉boolean | Whether to overwrite the target asset if it already exists. Default is false. |
to_public_id required |
Abcstring | The new public ID for the asset. |
to_type |
Abcstring | The target delivery type for the renamed asset. If omitted, the delivery type remains unchanged. |
type |
Abcstring | The current delivery type of the asset. |
Creates an archive (ZIP or TGZ file) that contains a set of assets from your product environment.
Creates a downloadable ZIP or other archive format containing the specified resources.
| Parameter | Type | Description |
|---|---|---|
resource_type required |
Abcstring | The type of resource for archive generation (image, video, or raw). |
RequestBody required |
{ }object | The archive generation parameters. |
allow_missing |
◉boolean | Whether to allow missing assets in the archive. If false, the operation will fail if any asset is not found. |
asset_folders |
[ ]arrayAbcstring | A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account. |
async |
◉boolean | ("create" mode only), specifies whether to generate the archive asynchronously. |
expires_at |
#integer | ("download" mode only) Unix timestamp indicating when the generated archive URL should expire. |
flatten_folders |
◉boolean | Whether to flatten all files to be in the root of the archive file. |
flatten_transformations |
◉boolean | Whether to flatten the folder structure of the derived assets. |
fully_qualified_public_ids |
[ ]array | A list of fully qualified public IDs (resource_type/type/public_id) to include in the archive. |
keep_derived |
◉boolean | Whether to keep the derived assets used for generating the archive. |
mode |
Abcstring | The method for generating and delivering the archive. Options: |
notification_url |
Abcstring | ("create" mode only), specifies the URL to notify when the archive generation is complete. |
prefixes |
[ ]array | Select all assets where the public ID starts with this prefix. |
public_ids |
[ ]array | The list of public IDs to include in the archive. |
search_expression |
Abcstring | A search expression to select assets to include in the archive. |
skip_transformation_name |
◉boolean | Whether to skip adding the transformation details to the file names in the archive. |
tags |
[ ]array | Tags to filter which assets to include in the archive. Assets matching any of the specified tags are included. |
target_asset_folder |
Abcstring | The folder in your product environment where the generated archive should be stored. |
target_filename |
Abcstring | The filename for the downloaded archive file. Extension must match target_format (zip or tgz). |
target_format |
Abcstring | The format of the generated archive. |
target_public_id |
Abcstring | The public ID to assign to the generated archive, or the filename of the downloaded archive file. |
target_tags |
[ ]array | A list of tag names to assign to the generated archive. |
transformations |
Abcstring | The transformations to apply to the assets before including them in the archive (separated by "|"). |
type |
Abcstring | All supported delivery types. |
use_original_filename |
◉boolean | Whether to use the original filenames of the assets in the archive instead of public IDs (when available). |
Download a backup copy of an asset
| Parameter | Type | Description |
|---|---|---|
asset_id required |
Abcstring | The asset ID of the resource. Must be a 32-character hexadecimal string. |
version_id required |
Abcstring | The version ID of the backup to download. Must be a 32-character hexadecimal string. |
Delete asset by asset ID
Deletes an asset using its immutable asset ID.
| Parameter | Type | Description |
|---|---|---|
request required |
{ }object | The asset to delete and related options. |
asset_id required |
Abcstring | A 32-character hexadecimal asset ID. |
callback |
Abcstring | URL for redirect after operation completion. |
invalidate |
◉boolean | Whether to invalidate CDN cache. Default is false. |
notification_url |
Abcstring | URL to receive completion notification. |
Get image assets
Retrieves a list of image assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
| Parameter | Type | Description |
|---|---|---|
type |
Abcstring | The delivery type to filter by. When omitted, returns assets of all delivery types. |
prefix |
Abcstring | A public_id prefix. When specified, all assets with that prefix are returned. |
public_ids |
[ ]array | An array of public IDs to return. |
tags |
◉boolean | Whether to include the list of tag names assigned to each asset. Default is false. |
next_cursor |
Abcstring | Cursor for pagination. |
max_results |
#integer | Maximum number of results to return (1-500). |
direction |
Abcstring | The sort direction for the results. Default is "desc". |
start_at |
Abcstring | An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither |
fields |
Abcstring[ ]array | Additional fields to include in the response. The fields public_id and asset_id are always included. |
Get video assets
Retrieves a list of video assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
| Parameter | Type | Description |
|---|---|---|
type |
Abcstring | The delivery type to filter by. When omitted, returns assets of all delivery types. |
prefix |
Abcstring | A public_id prefix. When specified, all assets with that prefix are returned. |
public_ids |
[ ]array | An array of public IDs to return. |
tags |
◉boolean | Whether to include the list of tag names assigned to each asset. Default is false. |
next_cursor |
Abcstring | Cursor for pagination. |
max_results |
#integer | Maximum number of results to return (1-500). |
direction |
Abcstring | The sort direction for the results. Default is "desc". |
start_at |
Abcstring | An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither |
fields |
Abcstring[ ]array | Additional fields to include in the response. The fields public_id and asset_id are always included. |
Get raw assets
Retrieves a list of raw assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
| Parameter | Type | Description |
|---|---|---|
type |
Abcstring | The delivery type to filter by. When omitted, returns assets of all delivery types. |
prefix |
Abcstring | A public_id prefix. When specified, all assets with that prefix are returned. |
public_ids |
[ ]array | An array of public IDs to return. |
tags |
◉boolean | Whether to include the list of tag names assigned to each asset. Default is false. |
next_cursor |
Abcstring | Cursor for pagination. |
max_results |
#integer | Maximum number of results to return (1-500). |
direction |
Abcstring | The sort direction for the results. Default is "desc". |
start_at |
Abcstring | An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither |
fields |
Abcstring[ ]array | Additional fields to include in the response. The fields public_id and asset_id are always included. |
Get resource by asset ID
Returns the details of a single resource specified by its asset ID.
| Parameter | Type | Description |
|---|---|---|
asset_id required |
Abcstring | The asset ID of the resource. Must be a 32-character hexadecimal string. |
colors |
◉boolean | Whether to include color information (predominant colors and histogram of 32 leading colors). Default: false. |
media_metadata |
◉boolean | Whether to include IPTC, XMP, and detailed Exif metadata in the response. Default: false. |
faces |
◉boolean | Whether to include a list of coordinates of detected faces. Default: false. |
quality_analysis |
◉boolean | Whether to return quality analysis scores for the image. Default: false. |
accessibility_analysis |
◉boolean | Whether to return accessibility analysis scores for the image. Default: false. |
pages |
◉boolean | Whether to report the number of pages in multi-page documents (e.g., PDF). Default: false. |
phash |
◉boolean | Whether to include the perceptual hash (pHash) of the uploaded photo for image similarity detection. Default: false. |
coordinates |
◉boolean | Whether to include previously specified custom cropping coordinates and faces coordinates. Default: false. |
versions |
◉boolean | Whether to include details of all the backed up versions of the asset. Default: false. |
max_results |
#integer | Maximum number of derived assets to return. Default: 10. |
derived_next_cursor |
Abcstring | The cursor for the next page of derived assets when there are more derived images than max_results. |
Updates an existing asset's metadata, tags, and other attributes using its asset ID
Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. Note that you can also update attributes of an existing asset using the explicit API endpoint.
| Parameter | Type | Description |
|---|---|---|
asset_id required |
Abcstring | The asset ID of the resource. Must be a 32-character hexadecimal string. |
ResourceUpdateRequest required |
{ }object | The asset attributes to update. |
access_control |
[ ]array | Restricts access to the asset by specifying one or more access types. |
asset_folder |
Abcstring | The folder where the asset should be placed. |
auto_tagging |
#number | Confidence threshold for auto-tagging. |
background_removal |
Abcstring | The background removal provider to use for the resource. Optionally append a template suffix (e.g., cloudinary_ai:fine_edges). |
categorization |
Abcstring | The type of categorization to perform on the resource. Optionally append a language code suffix (e.g., google_tagging:fr). |
clear_invalid |
◉boolean | Whether to clear invalid metadata fields. If false, invalid fields will be preserved. Default: false |
context |
Abcstring | A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). The =, ", and | characters can be escaped with a prepending backslash (\). |
custom_coordinates |
Abcstring | Custom coordinates as comma-separated values, with multiple coordinates separated by pipes. |
detection |
Abcstring | The type of detection to perform on the resource. |
display_name |
Abcstring | The display name of the resource. |
face_coordinates |
Abcstring | Face coordinates as comma-separated values, with multiple faces separated by pipes. |
metadata |
Abcstring{ }object | A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset. |
moderation_status |
Abcstring | The moderation status of the resource. |
ocr |
Abcstring | The type of OCR to perform on the resource. Set to adv_ocr, optionally with options (e.g., adv_ocr:document). |
quality_override |
Abcstring | Quality override value that will override any automatic quality transformations. |
raw_convert |
Abcstring | The conversion to apply for raw files (e.g., aspose, google_speech, extract_text). |
regions |
Abcstring | A JSON-encoded object of named groups of coordinate pairs representing regions. Each region name may contain only letters, numbers, or hyphens, and must have at least two coordinate pairs. |
tags |
Abcstring[ ]array | A comma-separated list of tag names, or an array of tag names. |
unique_display_name |
◉boolean | Whether to ensure the display name is unique across all resources. If false, the operation will fail if a resource with the same display name exists. Default: false |
visual_search |
◉boolean | Whether to index the resource with visual search. If true, the resource will be indexed for visual search capabilities. Default: false |
Retrieves a list of tags currently applied to assets in your Cloudinary account
Retrieves a comprehensive list of all tags that exist in your product environment for assets of the specified type.
[Cloudinary Admin API documentation](https://cloudinary.com/documentation/admin_api)
| Parameter | Type | Description |
|---|---|---|
resource_type required |
Abcstring | The type of resource (image, video, or raw). |
prefix |
Abcstring | Limit the returned tags to those that start with the specified prefix. |
next_cursor |
Abcstring | Cursor for pagination. |
max_results |
#integer | Maximum number of results to return (1-500). |
Delete derived resources
Deletes derived resources by derived resource ID
| Parameter | Type | Description |
|---|---|---|
request required |
{ }object | The derived resource IDs to delete. |
derived_resource_ids required |
[ ]array | Array of derived resource IDs to delete specific derived resources |
invalidate |
◉boolean | Whether to invalidate the CDN cache for the deleted resources |
Retrieves comprehensive usage metrics and account statistics
A report on the status of product environment usage, including storage, credits, bandwidth, requests, number of resources, and add-on usage. No date parameter needed to get current usage statistics.
| Parameter | Type | Description |
|---|---|---|
date |
Abcstring | The date for which to retrieve usage details (YYYY-MM-DD). If not specified, returns the current usage. |
Add related assets by asset ID
Relates an asset to other assets by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be added as a related_asset to all the other assets specified. The relation is also a one to many relationship, where the asset is related to all the assets specified, but those assets aren't also related to each other.
| Parameter | Type | Description |
|---|---|---|
asset_id required |
Abcstring | The asset ID of the resource. Must be a 32-character hexadecimal string. |
relate_assets_by_asset_id_request required |
{ }object | The asset IDs to relate. |
assets_to_relate required |
[ ]array | Relates the asset to all the assets specified in this array of up to 10 assets, specified by their asset IDs. |
Delete asset relations by asset ID
Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.
| Parameter | Type | Description |
|---|---|---|
asset_id required |
Abcstring | The asset ID of the resource. Must be a 32-character hexadecimal string. |
unrelate_assets_by_asset_id_request required |
{ }object | The asset IDs to unrelate. |
assets_to_unrelate required |
[ ]array | Unrelates the asset from all the assets specified in this array of assets, specified by their asset IDs. |
Renames or moves an entire folder (along with all assets it contains) to a new location
Renames or moves an entire folder (along with all assets it contains) to a new location within your Cloudinary media library.
| Parameter | Type | Description |
|---|---|---|
folder required |
Abcstring | The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes. |
move_folder_request required |
{ }object | The new folder path. |
to_folder required |
Abcstring | The new path for the folder. |
Creates a new empty folder in your Cloudinary media library
Creates a new folder at the specified path
| Parameter | Type | Description |
|---|---|---|
folder required |
Abcstring | The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes. |
Deletes an existing folder from your media library
Deletes a folder and all assets within it.
| Parameter | Type | Description |
|---|---|---|
folder required |
Abcstring | The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes. |
Searches for folders whose attributes match a given expression
Lists the folders that match the specified search expression. Limited to 2000 results. If no parameters are passed, returns the 50 most recently created folders in descending order of creation time.
| Parameter | Type | Description |
|---|---|---|
expression |
Abcstring | The (Lucene-like) string expression specifying the search query. If not passed, returns all folders (up to max_results). |
sort_by |
[ ]array | Sort order for the results. Each item maps a field name to a direction. |
max_results |
#integer | Maximum number of folders to return (max 500, default 50). |
next_cursor |
Abcstring | The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results. |
Provides a powerful query interface to filter and retrieve assets and their details
Returns a list of resources matching the specified search criteria.
Uses a Lucene-like query language to filter assets by descriptive attributes (public_id, asset_id, filename, display_name, folder / asset_folder, tags, context.<key>), file details (resource_type, type, format, bytes, width, height, duration, pages, aspect_ratio, transparent, grayscale), lifecycle dates (uploaded_at, created_at, taken_at, updated_at, last_updated.<kind>), moderation and lifecycle state (status, moderation_status, moderation_kind), embedded data (image_metadata.*), structured metadata (metadata.<external_id>), and analysis fields (face_count, colors, quality_score, illustration_score, accessibility_analysis.*). Supports sorting, aggregate counts, and complex boolean expressions. See the expression parameter for the full field reference.
Expression syntax
- Match:
field:value(token match) orfield=value(exact match). Examples:tags:shirt,tags=cotton. - Comparisons:
>,<,>=,<=for numbers and dates. Example:bytes>10000000. - Ranges:
field:[from TO to]inclusive,field:{from TO to}exclusive. Example:width:{200 TO 1028}. - Booleans:
AND,OR,NOT(uppercase), or+(must),-(must not).NOTmust appear between clauses — a bare leadingNOTis a parse error; use-field:valueto negate the first clause. Group with parentheses:(shirt OR pants) AND clothes. - Wildcards: trailing
*only, for prefix match (public_id:shoes_*,format:jp*,tags:shirt*). Not supported onfolder,asset_folder,resource_type, ortype. Leading*, middle*,?, and bare*(folder:*,context.alt:*) are all parse errors — wildcards cannot be used as a "field is present" probe. - Tokenized vs exact fields:
tags,filename,display_name,context.<key>, andmetadata.<id>match on tokens split by whitespace and punctuation —tags:analysismatches the tagfull-analysis.public_id,folder,asset_folder, andformatmatch the whole value —public_id:dogwill not matchdog_pldcwy; usepublic_id="dog_pldcwy"(exact) orpublic_id:dog*(prefix). These exact-match fields still accept a trailing*for prefix match (exceptfolder/asset_folder, where wildcards are ignored). - Dates: ISO-8601 in quotes (
uploaded_at>"2024-01-15") or relative shorthandNh,Nd,Nw,Nm,Ny(uploaded_at>1d,created_at:[4w TO 1w]). Send raw</>, never HTML-escaped. - Quoting: wrap any value containing a space, colon, or other reserved character (
! ( ) { } [ ] ^ ~ ? \ = & < > |) in double quotes, or escape each character with\. Examples:tags:"service:mantels",aspect_ratio:"16:9",folder:"My Folder".
Common mistakes
- Use
folder:orasset_folder:(singular);folders:,asset_folder_id:, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here. - There is no "has any value" / presence probe.
folder:*,metadata.alt:*,context.key:*,tags:*, and-tags:*are all parse errors. See *"Which assets have any value formetadata.<id>?"* under Common tasks for workarounds. NOT foo AND baris a parse error. Write it asbar AND NOT fooor-foo AND bar, and keep everyNOTbetween two clauses (a AND NOT b AND NOT cis fine;NOT b AND NOT c …is not).public_id:dogwill not matchdog_pldcwy. Usepublic_id="dog_pldcwy"(exact) orpublic_id:dog*(prefix).tags=service:mantelsfails because the unquoted colon is parsed as a field separator. Usetags="service:mantels"ortags=service\:mantels.- Do not HTML-escape operators. Send
uploaded_at<1h, notuploaded_at<1h. - Do not leave an operand empty (e.g.
tags: AND -tags:foo). Omit the empty clause entirely.
Tips
- Set
max_results: 0to return onlytotal_countandaggregationswithout any resource payload — useful for counts and aggregation-only queries. total_countis always present in the response; prefer it over running an aggregation just to get a count.aggregate(both simple and range variants) and themetadata,image_metadata,image_analysisvalues ofwith_fieldrequire a Tier 2 search plan.- Range aggregations require each range to include a
keylabel (1–20 chars,[a-zA-Z0-9_-]+) and at least one offrom/to.
Common tasks
- Count matching assets — put the filter in
expressionwithmax_results: 0and readtotal_countfrom the response. Works on every tier; noaggregateneeded. - Preview one matching asset — set
max_results: 1; addwith_field: ["tags", "context"](ormetadata, Tier 2) to inspect values. Prefer this over fetching and scanning a full page. - Distribution of values for a field — Tier 2:
aggregate: [format|resource_type|type]for enum counts, or range aggregations onbytes,image_pixels,video_pixels, orduration. Tier 1 fallback: run N small queries withmax_results: 0, one per candidate value, and readtotal_countfrom each. - "Which assets have any value for
metadata.<id>?" — not expressible directly (metadata.X:*is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate —metadata.region:(apac OR emea OR amer); (b) query broadly withwith_field: ["metadata"](Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag. - Newest / largest N — keep the filter in
expressionand sort explicitly:sort_by: [{uploaded_at: "desc"}]withmax_results: 10. - Filter by folder — both
asset_folder:"parent/child"andfolder:"parent/child"match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate:asset_folder:("campaigns/2024" OR "campaigns/2025"). - Filter by metadata when you only know the label — first call
list-metadata-fieldsto resolve the label to anexternal_id, then querymetadata.<external_id>:value. - Multiple independent filters in one turn — prefer one
expressionwithOR/ parentheses over firing many parallel calls:metadata.region:apac OR metadata.region:emeain a single request is faster and more reliable than two parallel requests.
Examples
tags:shirt AND uploaded_at>1dresource_type:image AND bytes>1000000 AND (format:png OR format:jpg)folder:products AND context.category:electronicstags:"service:mantels" AND -tags:discontinued
| Parameter | Type | Description |
|---|---|---|
request required |
{ }object | The search query parameters. |
aggregate |
[ ]array | Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response. |
expression |
Abcstring | The Lucene-like search expression. Supports token match ( Wrap values containing spaces, colons, or other reserved characters ( Wildcards are prefix-only (trailing Dates: ISO-8601 in quotes, or relative shorthand Supported fields: See the [search expressions guide](https://cloudinary.com/documentation/search_expressions.md) for the full reference. |
fields |
Abcstring | A comma-separated list of fields to include in the response.
|
max_results |
#integer | The maximum number of results to return. Default - 50. Maximum - 500. |
next_cursor |
Abcstring | The cursor value to get the next page of results. Available when a previous search returned more results than max_results. |
sort_by |
[ ]array | An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'. |
with_field |
[ ]array | The additional asset attributes to include in each search result. The |
Finds images in your asset library based on visual similarity or content
Returns a list of resources that are visually similar to a specified image. You can provide the source image for comparison in one of three ways:
- Provide a URL of an image
- Specify the asset ID of an existing image
- Provide a textual description
| Parameter | Type | Description |
|---|---|---|
request required |
{ }object | The visual search parameters. |
Get Cloudinary transformation rules documentation from official docs
🚨 WHEN TO USE:
- MANDATORY before creating, modifying, or discussing Cloudinary transformations
- REQUIRED when user asks for image/video effects, resizing, cropping, filters, etc.
- NOT needed for simple asset management (upload, list, delete, etc.)
- ⚠️ CALL ONLY ONCE per session - documentation doesn't change, reuse the knowledge
🚨 STRICT REQUIREMENTS (when transformations are involved):
- MUST call this tool BEFORE any transformation-related task (but only once)
- MUST read and understand the returned documentation
- DO NOT attempt transformations without consulting this reference
- DO NOT make up transformation parameters
- DO NOT guess syntax - only use documented parameters
- DO NOT call this tool multiple times - the docs are static, remember them
This tool returns the complete, authoritative Cloudinary transformation reference that contains all valid parameters, syntax rules, and best practices.
| Parameter | Type | Description |
|---|
Generate derived transformations for existing assets using Cloudinary's explicit API with eager transformations
⚠️ CRITICAL PREREQUISITES:
1. MUST call get-tx-reference tool first
2. MUST validate transformation syntax against official docs
3. MUST use only documented parameters from the reference
4. MUST follow proper URL component structure (slashes between components, commas within)
📋 VALIDATION CHECKLIST:
- ✅ Called get-tx-reference tool
- ✅ Verified all parameters exist in official docs
- ✅ Used correct syntax (e.g., f_auto/q_auto not f_auto,q_auto)
- ✅ Applied proper component chaining rules
- ✅ Included crop mode when using width/height
This tool creates actual derived assets on Cloudinary using the explicit API.
| Parameter | Type | Description |
|---|---|---|
publicId required |
Abcstring | The public ID of the existing asset to transform |
transformations required |
Abcstring | VALIDATED transformation string using ONLY parameters from get-tx-reference docs. Examples: 'c_fill,w_300,h_200' or 'e_sepia/a_90'. MUST follow component rules: commas within components, slashes between components. |
resourceType |
Abcstring | The resource type of the asset |
invalidate |
◉boolean | Whether to invalidate cached versions |