Cloudinary ACTION
Upload Media Asset
Upload media assets such as images or videos. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Cloudinary account once, then configure and run Upload Media Asset from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "cloudinary-upload-media-asset",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
cloudinary: { authProvisionId: "apn_xxxxxxx" },
file: "File Path or URL",
publicId: "Public Id",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "cloudinary-upload-media-asset",
"configured_props": {
"cloudinary": { "authProvisionId": "apn_xxxxxxx" },
"file": "File Path or URL",
"publicId": "Public Id"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "cloudinary",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "cloudinary-upload-media-asset",
arguments: {
file: "File Path or URL",
publicId: "Public Id",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
file File Path or URL | string | The file to upload. You can provide a file path from the /tmp folder (e.g. /tmp/myFile.jpg) or a public file URL, among other options supported by Cloudinary (see the documentation for available options). Required |
publicId Public Id | string | The identifier that is used for accessing the uploaded asset. See the documentation for more information. Optional |
folder Folder | string | An optional folder name where the uploaded asset will be stored. The public ID contains the full path of the uploaded asset, including the folder name. Optional |
resourceType Resource Type | string | Set the type of file you are uploading or use auto to automatically detect the file type. Valid values: image, raw, video and auto. Defaults: image for server-side uploading and auto for client-side uploading.
Note: Use the video resource type for all video assets as well as for audio files, such as .mp3. Optional |
type Type | string | The delivery type. Allows uploading assets as private or authenticated instead of the default upload mode. Optional |
accessMode Access Mode | string | Allows the asset to behave as if it's of the authenticated 'type'. Default is public. The asset can later be made public by changing its Access Mode via the Admin API, without having to update any delivery URLs. Optional |
tags Tags | string[] | An array of tag names to assign to the uploaded asset for later group reference. Optional |
format Convert to Format | string | An optional format to convert the uploaded asset to before saving in the cloud, e.g. jpg. Optional |
backup Backup | boolean | Tell Cloudinary whether to back up the uploaded asset. Overrides the default backup settings of your account. Optional |
additionalOptions Additional Options | object | Additional parameters and their values to use in the upload. See the documentation for all available options. Values will be parsed as JSON where applicable. Example: { "use_filename": true } Optional |
syncDir SyncDir | dir | Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- cloudinary-upload-media-asset
- Version
- 1.0.4
- App
- Cloudinary
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗