View as Markdown
Mux icon

Mux ACTION

Create Asset

Create a new asset with a track. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mux account once, then configure and run Create 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: "mux-create-asset",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mux: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    type: "Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Asset inputs
Property Type Description
url URL string
The URL of the file that Mux should download and use.
Required
type Type string
The type of track
Optional
languageCode Language Code string
The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track.
Optional
name Name string
The name of the track containing a human-readable description. This value must be unique across all text type and subtitles text type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be "English" for subtitles text track with language_code as en. This optional parameter should be used only for text type and subtitles text type tracks. If this parameter is not included, Mux will auto-populate based on the input[].language_code value.
Optional
closedCaptions Closed Captions boolean
Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for text type and subtitles text type tracks.
Optional
playbackPolicy Playback Policy string
Playback policy assigned to the asset
Optional
mp4Support MP4 Support string
Level of support for mp4 playback
Optional
normalizeAudio Normalize Audio boolean
Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets.
Optional
masterAccess Master Access string
Level of support for master access
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
mux-create-asset
Version
0.0.3
App
Mux
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes