First-party app
Mux

Mux

Manage Mux video — create assets from a URL, run live streams, mint playback IDs, build delivery URLs and read viewer metrics.

stable Video & StreamingDeveloper ToolsAnalytics & BI

About

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.

App id
io.w6w.mux
Version
0.1.1
Author
w6w
Licence
MIT
Categories
Video & Streaming · Developer Tools · Analytics & BI

Overview

Mux 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.

Build with Mux

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.

Create asset from a URL

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`.

Delete asset

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.

Get asset

asset-get

One asset — most importantly whether it is still `preparing`, is `ready` to play, or `errored` with the reason.

List assets

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.

Complete a live stream

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.

Create a live stream

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.

Delete a live 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.

List live streams

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.

Get a viewer metric

metric-get

How the video performed for viewers — startup time, rebuffering, failures. Needs a token created with the Mux Data product.

Create a playback ID

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.

Revoke a playback ID

playback-id-delete

Stop every URL built from one playback id working, permanently, without touching the asset or its other playback ids.

Build playback URLs

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.

Create a direct upload URL

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.

List video views

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>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create asset from a URL

    perform
    asset-create
  • Get asset

    read
    asset-get
  • List assets

    read
    asset-list
  • Complete a live stream

    perform
    live-stream-complete
  • Create a live stream

    perform
    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.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { 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);
Install the CLI
npm install -g @w6w/cli
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.

What the agent gets

Credentials it can't read

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.

A tool surface scoped to the caller

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.

A durable workflow in one call

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.

Health-aware discovery

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).

Request MCP access

Health checks

Mux declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Mux platform status

Mux's Statuspage, with the API separated from delivery — they fail independently, and a workflow that only ingests is unaffected by a playback incident.

quota

API request headroom

Whatever rate-limit headers Mux returns on an authenticated response. Reports `unknown` when it sends none, which is an answer rather than a fault.