KosmoKrator

other

Cloudinary CLI for AI Agents

Use the Cloudinary CLI from KosmoKrator to call Cloudinary tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

6 functions 4 read 2 write Manual OAuth token auth

Cloudinary CLI Setup

Cloudinary can be configured headlessly with `kosmokrator integrations:configure cloudinary`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure cloudinary --set access_token="$CLOUDINARY_ACCESS_TOKEN" --set cloud_name="$CLOUDINARY_CLOUD_NAME" --enable --read allow --write ask --json
kosmokrator integrations:doctor cloudinary --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token CLOUDINARY_ACCESS_TOKEN Secret secret yes Access Token
cloud_name CLOUDINARY_CLOUD_NAME Text string yes Cloud Name
base_url CLOUDINARY_BASE_URL URL url no API Base URL

Call Cloudinary Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call cloudinary.cloudinary_upload '{
  "file": "example_file",
  "public_id": "example_public_id",
  "folder": "example_folder"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:cloudinary cloudinary_upload '{
  "file": "example_file",
  "public_id": "example_public_id",
  "folder": "example_folder"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs cloudinary --json
kosmo integrations:docs cloudinary.cloudinary_upload --json
kosmo integrations:schema cloudinary.cloudinary_upload --json
kosmo integrations:search "Cloudinary" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Cloudinary.

cloudinary.cloudinary_upload

Write write

Upload an image to Cloudinary. Provide a file URL or base64 data URI, an optional public ID, and an optional folder path. Returns the uploaded asset details.

Parameters
file, public_id, folder

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_upload '{"file":"example_file","public_id":"example_public_id","folder":"example_folder"}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_upload '{"file":"example_file","public_id":"example_public_id","folder":"example_folder"}' --json

cloudinary.cloudinary_list_resources

Read read

List media resources in your Cloudinary cloud. Filter by resource type (image, video, raw) and prefix. Supports pagination with max_results and next_cursor.

Parameters
type, max_results, next_cursor, prefix

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_list_resources '{"type":"example_type","max_results":1,"next_cursor":"example_next_cursor","prefix":"example_prefix"}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_list_resources '{"type":"example_type","max_results":1,"next_cursor":"example_next_cursor","prefix":"example_prefix"}' --json

cloudinary.cloudinary_get_resource

Read read

Get details of a specific Cloudinary resource by its type and public ID. Returns full asset metadata including dimensions, format, URL, tags, and derived resources.

Parameters
type, public_id

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_get_resource '{"type":"example_type","public_id":"example_public_id"}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_get_resource '{"type":"example_type","public_id":"example_public_id"}' --json

cloudinary.cloudinary_delete_resource

Write write

Delete a media resource from Cloudinary by its type and public ID. This permanently removes the asset and all its derived resources.

Parameters
type, public_id

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_delete_resource '{"type":"example_type","public_id":"example_public_id"}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_delete_resource '{"type":"example_type","public_id":"example_public_id"}' --json

cloudinary.cloudinary_list_folders

Read read

List all folders in your Cloudinary cloud. Returns folder names and paths with pagination support.

Parameters
max_results, next_cursor

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_list_folders '{"max_results":1,"next_cursor":"example_next_cursor"}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_list_folders '{"max_results":1,"next_cursor":"example_next_cursor"}' --json

cloudinary.cloudinary_get_current_user

Read read

Get the currently authenticated Cloudinary user profile. Returns user name, email, and account details. Use this to verify that credentials are working.

Parameters
none

Generic CLI call

kosmo integrations:call cloudinary.cloudinary_get_current_user '{}' --json

Provider shortcut

kosmo integrations:cloudinary cloudinary_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

cloudinary.cloudinary_upload

Upload an image to Cloudinary. Provide a file URL or base64 data URI, an optional public ID, and an optional folder path. Returns the uploaded asset details.

Operation
Write write
Schema command
kosmo integrations:schema cloudinary.cloudinary_upload --json
ParameterTypeRequiredDescription
file string yes The file to upload — a remote URL (e.g. "https://example.com/photo.jpg") or a base64 data URI (e.g. "data:image/png;base64,...").
public_id string no The public ID to assign to the uploaded asset. If omitted, Cloudinary generates a random ID.
folder string no The folder to store the asset in (e.g. "blog/images").

cloudinary.cloudinary_list_resources

List media resources in your Cloudinary cloud. Filter by resource type (image, video, raw) and prefix. Supports pagination with max_results and next_cursor.

Operation
Read read
Schema command
kosmo integrations:schema cloudinary.cloudinary_list_resources --json
ParameterTypeRequiredDescription
type string no Resource type to list: "image", "video", or "raw". Defaults to "image".
max_results integer no Maximum number of resources to return (max 500, default 10).
next_cursor string no Pagination cursor from a previous response to get the next page.
prefix string no Only include resources whose public ID starts with this prefix (e.g. "blog/").

cloudinary.cloudinary_get_resource

Get details of a specific Cloudinary resource by its type and public ID. Returns full asset metadata including dimensions, format, URL, tags, and derived resources.

Operation
Read read
Schema command
kosmo integrations:schema cloudinary.cloudinary_get_resource --json
ParameterTypeRequiredDescription
type string yes Resource type: "image", "video", or "raw".
public_id string yes The public ID of the resource (e.g. "blog/hero-image").

cloudinary.cloudinary_delete_resource

Delete a media resource from Cloudinary by its type and public ID. This permanently removes the asset and all its derived resources.

Operation
Write write
Schema command
kosmo integrations:schema cloudinary.cloudinary_delete_resource --json
ParameterTypeRequiredDescription
type string yes Resource type: "image", "video", or "raw".
public_id string yes The public ID of the resource to delete (e.g. "blog/old-photo").

cloudinary.cloudinary_list_folders

List all folders in your Cloudinary cloud. Returns folder names and paths with pagination support.

Operation
Read read
Schema command
kosmo integrations:schema cloudinary.cloudinary_list_folders --json
ParameterTypeRequiredDescription
max_results integer no Maximum number of folders to return (default 10).
next_cursor string no Pagination cursor from a previous response to get the next page.

cloudinary.cloudinary_get_current_user

Get the currently authenticated Cloudinary user profile. Returns user name, email, and account details. Use this to verify that credentials are working.

Operation
Read read
Schema command
kosmo integrations:schema cloudinary.cloudinary_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.