Cloudinary Asset Relations API

Enables you to manage relationships between assets.

GitHub OpenAPI

Operations 4

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}/resources/related_assets/{asset_id} Relate an asset to other assets by asset ID · Add related assets by asset ID #
Ask an LLM
“Can I relate one asset to several others using only their 32-character asset IDs?”
“Is the asset relation created by asset ID bidirectional?”
Tell an agent
Relate asset {asset_id} in cloud {cloud_name} to {assets_to_relate}.
Create asset relations by asset ID for {asset_id} in {cloud_name}.
DELETE /v1_1/{cloud_name}/resources/related_assets/{asset_id} Unrelate an asset from other assets by asset ID · Delete asset relations by asset ID #
Ask an LLM
“How do I remove an asset from the other assets it's related to by asset ID?”
“Does unrelating an asset by asset ID work on both sides?”
Tell an agent destructive · confirm first
Unrelate asset {asset_id} in cloud {cloud_name} from {assets_to_unrelate}.
Delete asset relations by asset ID for {asset_id} in {cloud_name}.
POST /v1_1/{cloud_name}/resources/related_assets/{resource_type}/{type}/{public_id} Relate an asset to others by resource type and public ID · Create asset relations by public ID #
Ask an LLM
“Can I link an image to a video or transcript using their resource_type/type/public_id paths?”
“What's the most assets I can relate to one asset in a single public ID call?”
Tell an agent
Relate the asset at {resource_type}/{type}/{public_id} in cloud {cloud_name} to {assets_to_relate}, using public IDs.
Link the {resource_type} asset with public ID {public_id} (delivery type {type}, cloud {cloud_name}) to {assets_to_relate} as related assets.
DELETE /v1_1/{cloud_name}/resources/related_assets/{resource_type}/{type}/{public_id} Unrelate an asset from others by resource type and public ID · Delete asset relations by public ID #
Ask an LLM
“How do I unlink a video from its transcript when I only know their public IDs?”
“Does removing a relation by public ID also remove it from the other assets' side?”
Tell an agent destructive · confirm first
Unrelate the asset at {resource_type}/{type}/{public_id} in cloud {cloud_name} from {assets_to_unrelate}, using public IDs.
Remove the related-asset links from the {resource_type} asset with public ID {public_id} (delivery type {type}, cloud {cloud_name}) to {assets_to_unrelate}.

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-relations-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-relations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudinary Asset Relations 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_relations 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_relations
  description: Enables you to manage relationships between assets.
paths:
  /v1_1/{cloud_name}/resources/related_assets/{asset_id}:
    post:
      x-speakeasy-mcp:
        name: create-asset-relations
        scopes:
        - librarian
        title: Create Asset Relations
      operationId: createAssetRelationsByAssetId
      summary: Add related assets by asset ID
      description: 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.
      tags:
      - asset_relations
      parameters:
      - $ref: '#/components/parameters/cloud_name'
      - $ref: '#/components/parameters/asset_id'
      requestBody:
        description: The asset IDs to relate.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/relate_assets_by_asset_id_request'
      responses:
        '200':
          description: Successfully created all asset relations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_response'
        '207':
          description: Partially successful - some relations were created, some failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    delete:
      x-speakeasy-mcp:
        name: delete-asset-relations
        scopes:
        - librarian
        title: Delete Asset Relations
        destructiveHint: true
        idempotentHint: true
      operationId: deleteAssetRelationsByAssetId
      summary: Delete asset relations by asset ID
      description: 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.
      tags:
      - asset_relations
      parameters:
      - $ref: '#/components/parameters/cloud_name'
      - $ref: '#/components/parameters/asset_id'
      requestBody:
        description: The asset IDs to unrelate.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unrelate_assets_by_asset_id_request'
      responses:
        '200':
          description: Successfully deleted all asset relations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_delete_response'
        '207':
          description: Partially successful - some relations were deleted, some failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_delete_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    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}/resources/related_assets/{resource_type}/{type}/{public_id}:
    post:
      operationId: createAssetRelationsByPublicId
      summary: Create asset relations by public ID
      description: Relates an asset to other assets by public IDs. This allows you to indicate that the asset is logically related to other assets in some way (e.g., similar content, or a peripheral asset like video/transcript, etc). This is a bidirectional process, meaning that the asset is also 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.
      tags:
      - asset_relations
      parameters:
      - $ref: '#/components/parameters/cloud_name'
      - $ref: '#/components/parameters/resource_type'
      - $ref: '#/components/parameters/delivery_type'
      - $ref: '#/components/parameters/public_id'
      requestBody:
        description: The assets to relate by public ID.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/relate_assets_by_public_id_request'
      responses:
        '200':
          description: Successfully created all asset relations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_response'
        '207':
          description: Partially successful - some relations were created, some failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    delete:
      operationId: deleteAssetRelationsByPublicId
      summary: Delete asset relations by public ID
      description: Unrelates the asset from other assets, specified by public IDs. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.
      tags:
      - asset_relations
      parameters:
      - $ref: '#/components/parameters/cloud_name'
      - $ref: '#/components/parameters/resource_type'
      - $ref: '#/components/parameters/delivery_type'
      - $ref: '#/components/parameters/public_id'
      requestBody:
        description: The assets to unrelate by public ID.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unrelate_assets_by_public_id_request'
      responses:
        '200':
          description: Successfully deleted all asset relations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_delete_response'
        '207':
          description: Partially successful - some relations were deleted, some failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asset_relations_delete_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    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:
    relate_assets_by_public_id_request:
      description: The asset relation request.
      type: object
      required:
      - assets_to_relate
      properties:
        assets_to_relate:
          type: array
          description: Relates the asset to all the other assets specified in this array of up to 10 assets, specified as resource_type/type/public_id.
          items:
            type: string
          maxItems: 10
          example:
          - raw/upload/dog_subtitles.srt
          - image/authenticated/dog_license
    api_error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
          - message
      required:
      - error
    asset_id:
      type: string
      pattern: ^[0-9a-f]{32}$
      description: A 32-character hexadecimal asset ID.
    resource_type:
      type: string
      enum:
      - image
      - video
      - raw
      description: The type of resource.
    managed_delivery_type:
      type: string
      enum:
      - upload
      - private
      - authenticated
      description: Managed delivery types for assets uploaded and stored by Cloudinary.
    asset_relations_delete_response:
      type: object
      properties:
        failed:
          type: array
          items:
            $ref: '#/components/schemas/asset_relation_info'
        success:
          type: array
          items:
            $ref: '#/components/schemas/asset_relation_info'
      example:
        failed: []
        success:
        - message: success
          code: success_ids
          asset: fd19f6964b9d377b7ac39752f03d7596
          status: 200
        - message: success
          code: success_ids
          asset: b7dcc099f53ea9b2e9eb602634fc0fc7
          status: 200
    unrelate_assets_by_public_id_request:
      description: The asset unrelation request.
      type: object
      required:
      - assets_to_unrelate
      properties:
        assets_to_unrelate:
          type: array
          description: Unrelates the asset from all the assets specified in this array of assets, specified as resource_type/type/public_id.
          items:
            type: string
          example:
          - raw/upload/dog_subtitles.srt
          - image/authenticated/dog_license
    unrelate_assets_by_asset_id_request:
      description: The asset unrelation request.
      type: object
      required:
      - assets_to_unrelate
      properties:
        assets_to_unrelate:
          type: array
          description: Unrelates the asset from all the assets specified in this array of assets, specified by their asset IDs.
          items:
            $ref: '#/components/schemas/asset_id'
          example:
          - fd19f6964b9d377b7ac39752f03d7596
          - b7dcc099f53ea9b2e9eb602634fc0fc7
    relate_assets_by_asset_id_request:
      description: The asset relation request.
      type: object
      required:
      - assets_to_relate
      properties:
        assets_to_relate:
          type: array
          description: Relates the asset to all the assets specified in this array of up to 10 assets, specified by their asset IDs.
          items:
            $ref: '#/components/schemas/asset_id'
          maxItems: 10
          example:
          - fd19f6964b9d377b7ac39752f03d7596
          - b7dcc099f53ea9b2e9eb602634fc0fc7
    asset_relations_response:
      type: object
      properties:
        failed:
          type: array
          items:
            $ref: '#/components/schemas/asset_relation_info'
        success:
          type: array
          items:
            $ref: '#/components/schemas/asset_relation_info'
      example:
        failed: []
        success:
        - message: success
          code: success_ids
          asset: fd19f6964b9d377b7ac39752f03d7596
          status: 200
        - message: success
          code: success_ids
          asset: b7dcc099f53ea9b2e9eb602634fc0fc7
          status: 200
    asset_relation_info:
      type: object
      properties:
        message:
          type: string
          example: success
          description: The message indicating the result of the operation.
        code:
          type: string
          enum:
          - rejected_ids
          - invalid_ids
          - internal_error_ids
          - non_existing_ids
          - invalid_relate_to_self_id
          - already_exists_ids
          - relation_does_not_exist_ids
          - success_ids
          example: success_ids
          description: The code indicating the result of the operation.
        asset:
          type: string
          example: fd19f6964b9d377b7ac39752f03d7596
          description: The identifier of the asset, either asset ID or public ID path.
        status:
          type: integer
          example: 200
          description: The HTTP status code indicating the result of the operation.
  parameters:
    cloud_name:
      name: cloud_name
      in: path
      required: true
      schema:
        type: string
      description: The cloud name of your product environment.
      example: my_cloud
    public_id:
      name: public_id
      in: path
      required: true
      schema:
        type: string
      example: sample
      description: The public ID of the asset.
    delivery_type:
      name: type
      in: path
      required: true
      schema:
        allOf:
        - $ref: '#/components/schemas/managed_delivery_type'
        - default: upload
      description: The delivery type of the asset.
    resource_type:
      name: resource_type
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/resource_type'
      description: The type of resource (image, video, or raw).
    asset_id:
      name: asset_id
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/asset_id'
      description: The asset ID of the resource. Must be a 32-character hexadecimal string.
      example: f4e6579cf84dd9cf5683b21f5b30c7d9
  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