Manage Mux video — create assets from a URL, run live streams, mint playback IDs, build delivery URLs and read viewer metrics.
Mux ships in the w6w first-party pack. It declares 14 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.muxMux brings video ingestion, live streaming and viewer analytics into a workflow. Asset actions create a video from a URL — letting Mux fetch the file itself rather than needing the bytes in the workflow — or mint a single-use upload URL for a browser to use directly, then poll, list or delete assets as they move from preparing to ready.
Playback IDs are the access control layer: minting one makes a video watchable, and revoking it cuts off access without touching the underlying asset, making per-audience access grants straightforward. A dedicated action assembles playback and thumbnail URLs locally with no API call at all, picking a thumbnail frame a few seconds in to avoid a video’s often-black opening frame.
Live streaming actions create, list, and end a stream’s current broadcast or retire it entirely, distinguishing an immediate end (which finalizes the recording right away) from simply waiting out a reconnect window. Analytics actions surface how video actually performed for viewers — startup time, rebuffering, playback failures — both in aggregate and as individual viewing sessions, letting a workflow investigate a specific complaint rather than only see an average.
Three routes to the same 14 actions. The Workflow tab is generated from Mux's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
asset-create Ingest a video by giving Mux a URL to fetch — which is what makes this usable from a workflow. The asset arrives `preparing` and cannot be played until it is `ready`.
asset-delete Permanently delete a video and every URL built from its playback ids. This is also how storage cost is controlled, which is why it needs confirming.
asset-get One asset — most importantly whether it is still `preparing`, is `ready` to play, or `errored` with the reason.
asset-list The account's assets, newest first. There is no search — Mux filters only by live stream or upload, so finding a specific asset is your own index's job.
live-stream-complete End the current broadcast immediately rather than waiting out the reconnect window — so the recording becomes an asset in seconds. The stream itself survives.
live-stream-create A destination for an encoder to broadcast to. Its `stream_key` is a credential — anyone holding it can broadcast as this stream.
live-stream-delete Retire a stream and invalidate its key. Past recordings survive as assets — this ends future broadcasts, it does not erase history.
live-stream-list The account's live streams and whether each is idle, active or disabled. Note the response includes stream keys, which are credentials.
metric-get How the video performed for viewers — startup time, rebuffering, failures. Needs a token created with the Mux Data product.
playback-id-create Mint a way to watch an asset — a playback id IS the access grant, so one per audience is what makes revoking one possible without breaking the others.
playback-id-delete Stop every URL built from one playback id working, permanently, without touching the asset or its other playback ids.
playback-url-build Assemble the HLS and thumbnail URLs from a playback id — locally, with no API call. Only for public playback ids; a signed one needs a JWT this app cannot mint.
upload-create Mint a single-use URL a browser can PUT a file to — the bytes never pass through this workflow. The asset appears afterwards, and is `ready` later still.
video-view-list Individual viewing sessions with what failed and when — the record behind 'it would not play for me', where an aggregate says most people were fine.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Mux's real ids.
{
"manifestVersion": "2",
"name": "mux-example",
"steps": [
{
"id": "asset-create",
"uses": {
"app": "io.w6w.mux",
"action": "asset-create",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"url": "<url>"
}
}
]
}asset-create asset-get asset-list live-stream-complete live-stream-create +9 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Mux, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Mux. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "asset-create",
payload: {
url: "<value>",
// playbackPolicy: "<value>",
// videoQuality: "<value>",
// passthrough: "<value>",
// mp4Support: "<value>",
// normalizeAudio: "<value>",
// generateSubtitles: "<value>",
// inputs: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action asset-create --payload '{"url":"<value>"}' Give an AI agent Mux — without giving it Mux's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.mux#asset-create",
"input": {
"url": "<url>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Mux connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Mux's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Mux itself is MIT, and the runtime that executes it is source-available (FSL).
Mux declares its own checks, so its health is a property of the app rather than something the host guesses at.
Mux's Statuspage, with the API separated from delivery — they fail independently, and a workflow that only ingests is unaffected by a playback incident.
Whatever rate-limit headers Mux returns on an authenticated response. Reports `unknown` when it sends none, which is an answer rather than a fault.