View as Markdown
Mux icon

Mux ACTION

Create Asset Track

Adds an asset track (for example, subtitles) to an asset. 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 Track 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-track",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mux: { authProvisionId: "apn_xxxxxxx" },
    assetId: "Asset",
    url: "URL",
  },
})

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 Track inputs
Property Type Description
assetId Asset string
Identifier of an asset
Required Dynamic
url URL string
The URL of the file that Mux should download and use.
Required
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.
Required
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

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-track
Version
0.0.3
App
Mux
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes