Cloudinary Asset Metadata API

Enables you to manage the tags, contextual metadata, and structured metadata values stored on specific assets.

GitHub OpenAPI

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1_1/{cloud_name}/{resource_type}/tags Tag or untag assets in bulk · Adds, removes, or replaces tags on multiple assets #
Ask an LLM
“How do I add tags to several images at once?”
“Can I remove tags from a batch of assets?”
Tell an agent
Apply tag command {command} with tags {tags} to assets {public_ids} in {cloud_name}/{resource_type}.
Add tags {tags} to {resource_type} assets {public_ids} in {cloud_name}.
POST /v1_1/{cloud_name}/{resource_type}/context Set or clear contextual metadata on assets · Adds or clears contextual metadata on multiple assets #
Ask an LLM
“Can I attach contextual metadata to a batch of assets?”
“What happens to context keys I leave out of an update?”
Tell an agent
Apply context command {command} with context {context} to assets {public_ids} in {cloud_name}/{resource_type}.
Set context {context} on {resource_type} assets {public_ids} in {cloud_name}.
POST /v1_1/{cloud_name}/{resource_type}/metadata Set structured metadata on assets · Sets structured metadata values on multiple assets #
Ask an LLM
“How do I set custom structured metadata on several assets?”
“Does updating metadata clear fields I leave out?”
Tell an agent
Set structured metadata {metadata} on assets {public_ids} in {cloud_name}/{resource_type}.
Update {resource_type} assets {public_ids} in {cloud_name} with metadata {metadata}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudinary:cloudinary-asset-metadata-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudinary-asset-metadata-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudinary Asset Metadata API
  version: 0.7.10
  contact:
    name: Cloudinary Support
    email: support@cloudinary.com
    url: https://support.cloudinary.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://cloudinary.com/tou
  description: 'Operations tagged asset_metadata across 3 of this provider''s published API definitions: cloudinary-api-schema.yml, cloudinary-asset-management-openapi.yml, cloudinary-platform-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{region}.cloudinary.com
  description: Regional API endpoints for optimal performance.
  variables:
    region:
      default: api
      description: Regional endpoint selection
      enum:
      - api
      - api-eu
      - api-ap
- url: https://{host}
  description: Custom domains for enterprise deployments.
  variables:
    host:
      default: api.cloudinary.com
      description: API host domain.
security:
- basicAuth: []
- oauth2:
  - asset_management
  - upload
  - media_generation
tags:
- name: asset_metadata
  description: Enables you to manage the tags, contextual metadata, and structured metadata values stored on specific assets.
paths:
  /v1_1/{cloud_name}/{resource_type}/tags:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    - $ref: '#/components/parameters/resource_type'
    post:
      x-speakeasy-mcp:
        name: manage-asset-tags
        scopes:
        - librarian
        title: Manage Asset Tags
        destructiveHint: true
      summary: Adds, removes, or replaces tags on multiple assets
      description: 'Applies a tag command to the given assets, addressing them by public ID.


        The number of tags multiplied by the number of public IDs must not exceed 10,000.'
      tags:
      - asset_metadata
      operationId: updateAssetsTags
      requestBody:
        description: The tag command, the tags to apply, and the assets to apply them to.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags_update_request'
            example:
              command: add
              public_ids:
              - sample
              - product_image
              - banner_2023
              tags:
              - animal
              - dog
      responses:
        '200':
          description: Tag command applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/public_ids_response'
              example:
                public_ids:
                - sample
                - product_image
                - banner_2023
        '400':
          description: Bad request (e.g., invalid command, blank tag, tag containing a comma, or the 10,000 tags-times-assets limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: 'Invalid command - bogus. Must be one of: add, remove, replace, remove_all'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: api_secret mismatch
        '403':
          description: Forbidden (e.g., insufficient permissions for the requested assets)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: This token is unauthorized to perform the requested action
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
  /v1_1/{cloud_name}/{resource_type}/context:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    - $ref: '#/components/parameters/resource_type'
    post:
      x-speakeasy-mcp:
        name: manage-asset-context
        scopes:
        - librarian
        title: Manage Asset Contextual Metadata
        destructiveHint: true
      summary: Adds or clears contextual metadata on multiple assets
      description: Applies a contextual-metadata command to the given assets, addressing them by public ID.
      tags:
      - asset_metadata
      operationId: updateAssetsContext
      requestBody:
        description: The context command, the metadata to apply, and the assets to apply it to.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/context_update_request'
            example:
              command: add
              public_ids:
              - sample
              - product_image
              - banner_2023
              context: alt=My image|caption=Nice photo
      responses:
        '200':
          description: Context command applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/public_ids_response'
              example:
                public_ids:
                - sample
                - product_image
                - banner_2023
        '400':
          description: Bad request (e.g., invalid command, or `context` missing when adding)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: Missing required parameter - context
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: api_secret mismatch
        '403':
          description: Forbidden (e.g., insufficient permissions for the requested assets)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: This token is unauthorized to perform the requested action
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
  /v1_1/{cloud_name}/{resource_type}/metadata:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    - $ref: '#/components/parameters/resource_type'
    post:
      x-speakeasy-mcp:
        name: manage-asset-metadata
        scopes:
        - librarian
        title: Manage Asset Structured Metadata
        destructiveHint: true
      summary: Sets structured metadata values on multiple assets
      description: 'Assigns structured metadata field values to the given assets, addressing them by public ID.


        Values are merged into each asset''s existing structured metadata: fields not mentioned

        keep their current values, and an empty value clears the field. Every referenced field

        must already exist in the product environment. Conditional metadata rules are evaluated

        as part of the update.'
      tags:
      - asset_metadata
      operationId: updateAssetsMetadata
      requestBody:
        description: The structured metadata values to assign and the assets to assign them to.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/metadata_update_request'
            example:
              public_ids:
              - sample
              - product_image
              - banner_2023
              metadata:
                in_stock_id: 50
                color_id:
                - green
                - red
      responses:
        '200':
          description: Structured metadata applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/public_ids_response'
              example:
                public_ids:
                - sample
                - product_image
                - banner_2023
        '400':
          description: Bad request (e.g., unknown metadata field, invalid value for the field type, or no metadata fields defined in the product environment)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: 'The following metadata fields do not exist: ["colour_id"]'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: api_secret mismatch
        '403':
          description: Forbidden (e.g., insufficient permissions for the requested assets)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
              example:
                error:
                  message: This token is unauthorized to perform the requested action
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
components:
  schemas:
    structured_metadata_param:
      description: '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.

        '
      oneOf:
      - type: string
        description: A pipe-separated list of custom metadata fields (by external_id) and the values to assign to each of them.
        example: in_stock_id=50|color_id=["green","red"]
      - $ref: '#/components/schemas/structured_metadata_value'
    asset_delivery_type:
      type: string
      enum:
      - asset
      description: Static asset delivery type.
    structured_metadata_value:
      type: object
      description: A map of custom metadata fields (by external_id) and the values to assign to each of them.
      additionalProperties:
        oneOf:
        - type: string
        - type: integer
        - type: array
          items:
            type: string
      example:
        in_stock_id: 50
        color_id:
        - green
        - red
        caption_id: Summer collection
        shot_date_id: '2024-06-15'
    delivery_type_all:
      anyOf:
      - $ref: '#/components/schemas/managed_delivery_type'
      - $ref: '#/components/schemas/asset_delivery_type'
      - $ref: '#/components/schemas/fetch_delivery_type'
      - $ref: '#/components/schemas/social_delivery_type'
      - $ref: '#/components/schemas/generated_delivery_type'
      - type: string
        enum:
        - media_optimization
      description: All supported delivery types.
    metadata_update_request:
      description: Structured metadata values plus the assets they apply to.
      allOf:
      - $ref: '#/components/schemas/asset_metadata_common_parameters'
      - type: object
        properties:
          metadata:
            $ref: '#/components/schemas/structured_metadata_param'
          clear_invalid:
            type: boolean
            description: Whether to clear a value already stored on the asset that is no longer valid — for example because its datasource entry was deleted — instead of failing the update for that asset. Applies only to fields governed by an active conditional metadata rule; an invalid value sent in this request is always rejected. Default is false.
        required:
        - metadata
    managed_delivery_type:
      type: string
      enum:
      - upload
      - private
      - authenticated
      description: Managed delivery types for assets uploaded and stored by Cloudinary.
    asset_metadata_common_parameters:
      type: object
      description: Fields common to every bulk metadata-management operation.
      properties:
        public_ids:
          $ref: '#/components/schemas/public_ids_param'
        type:
          allOf:
          - $ref: '#/components/schemas/delivery_type_all'
          description: The delivery type of the assets to operate on. Defaults to `upload`.
      required:
      - public_ids
    context_update_request:
      description: A contextual-metadata command plus the assets it applies to.
      allOf:
      - $ref: '#/components/schemas/asset_metadata_common_parameters'
      - type: object
        properties:
          command:
            type: string
            enum:
            - add
            - remove_all
            description: "The contextual-metadata operation to apply.\n\n- `add` merges the given key-value pairs into each asset's existing context. Keys\n  already present are overwritten; keys not mentioned are left intact. `context`\n  is required.\n- `remove_all` clears all contextual metadata. The `context` field is ignored."
          context:
            allOf:
            - $ref: '#/components/schemas/context_param'
            description: 'The key-value pairs to merge. Required for `add`; ignored for `remove_all`.

              An empty value deletes that key rather than storing an empty string, so `"alt="` removes `alt` while leaving other keys intact. Deletes and sets may be combined: `"alt=|owner=new"`.

              A literal `=` or `|` inside a value must be escaped with a prepending backslash, and a literal backslash must be doubled. A double quote must not be escaped.'
        required:
        - command
    resource_type:
      type: string
      enum:
      - image
      - video
      - raw
      description: The type of resource.
    context_param:
      type: string
      description: 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"). A literal = or | inside a value must be escaped with a prepending backslash, and a literal backslash must be doubled. A double quote must not be escaped.
      example: alt=My image|caption=Nice photo
    public_ids_param:
      type: array
      items:
        type: string
      maxItems: 1000
      description: The public IDs of the assets to apply the operation to. At most 1000 are processed per request; any beyond the first 1000 are ignored rather than rejected. Public IDs that do not exist, or that the caller lacks update permission for, are skipped rather than failing the request, so the returned `public_ids` may be shorter than the requested list.
      example:
      - sample
      - product_image
      - banner_2023
    generated_delivery_type:
      type: string
      enum:
      - multi
      - sprite
      - text
      - list
      description: Delivery types for assets generated by Cloudinary operations.
    fetch_delivery_type:
      type: string
      enum:
      - fetch
      - url2png
      description: Fetch-based delivery types for assets retrieved from remote URLs.
    social_delivery_type:
      type: string
      enum:
      - facebook
      - twitter
      - twitter_name
      - instagram
      - instagram_name
      - gravatar
      - youtube
      - hulu
      - vimeo
      - animoto
      - dailymotion
      - worldstarhiphop
      description: Delivery types for assets fetched from third-party platforms.
    tags_update_request:
      description: A tag command plus the assets it applies to.
      allOf:
      - $ref: '#/components/schemas/asset_metadata_common_parameters'
      - type: object
        properties:
          command:
            type: string
            enum:
            - add
            - remove
            - replace
            - remove_all
            description: 'The tag operation to apply.


              - `add` adds the given tags, leaving existing tags untouched.

              - `remove` removes the given tags, leaving other tags untouched.

              - `replace` overwrites the full tag list with the given tags.

              - `remove_all` clears every tag. The `tags` field is ignored.'
          tags:
            type: array
            items:
              type: string
            description: The tag names to apply. Required for `add`, `remove`, and `replace`; ignored for `remove_all`. A tag name must not contain a comma.
            example:
            - animal
            - dog
        required:
        - command
    api_error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
          - message
      required:
      - error
    public_ids_response:
      type: object
      description: The result of a bulk operation addressed by public ID.
      properties:
        public_ids:
          type: array
          items:
            type: string
          description: The public IDs the operation was actually applied to. Shorter than the requested list when assets were missing, unauthorized, or beyond the 1000-asset limit.
        unauthorized:
          type: array
          items:
            type: string
          description: The public IDs the caller lacks update permission for. Present only when at least one requested asset was unauthorized.
  parameters:
    cloud_name:
      name: cloud_name
      in: path
      required: true
      schema:
        type: string
      description: The cloud name of your product environment.
      example: my_cloud
    resource_type:
      name: resource_type
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/resource_type'
      description: The type of resource (image, video, or raw).
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using Cloudinary API Key and API Secret.
    oauth2:
      type: oauth2
      description: OAuth2 Authorization Code flow for user authentication
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.cloudinary.com/oauth2/auth
          tokenUrl: https://oauth.cloudinary.com/oauth2/token
          scopes:
            asset_management: Allows managing assets, including reading, updating, and deleting.
            upload: Allows uploading new assets.
            media_generation: Generate media
x-refined-from:
- cloudinary-api-schema.yml
- cloudinary-asset-management-openapi.yml
- cloudinary-platform-openapi.yml