canonical: https://jentic.com/apis/mux.com/mux

# Mux API

Ingest, transcode, and stream video content with built-in analytics and real-time monitoring across 91 endpoints. The API spans two core products: Mux Video for asset management, live streaming, direct uploads, and playback delivery; and Mux Data for viewer-level metrics, error tracking, quality-of-experience scoring, and real-time monitoring. Assets are automatically transcoded to adaptive bitrate HLS with no manual encoding configuration required.

## For AI agents

Ingest video assets, create live streams, and monitor viewer quality-of-experience metrics. Covers the full video lifecycle from upload through playback analytics across 91 endpoints.

## Scope

Does not handle image processing, audio-only podcasting, or CDN configuration - use for video ingest, live streaming, and viewer analytics only.

## Capabilities

- Ingest video from URLs, direct uploads, or live RTMP streams and deliver adaptive bitrate HLS playback
- Launch and manage live streams with auto-generated stream keys, simulcast targets, and embedded subtitle support
- Track viewer quality-of-experience with per-view metrics including startup time, rebuffering ratio, and error rates
- Monitor real-time video performance with histogram timeseries, breakdown dimensions, and alerting on quality incidents
- Restrict playback access using signed URLs, domain-referrer allowlists, and user-agent policies
- Generate playback IDs with public or signed access policies for granular content distribution control
- Create transcription vocabularies for automated caption generation on live streams and VOD assets

## Use cases

### AI Agent Video Pipeline Automation

AI agents automate the full video pipeline from ingest to delivery through Jentic. The agent creates a direct upload URL, monitors transcoding progress via asset status polling, and retrieves the HLS playback ID once ready. For live events, the agent provisions streams, configures simulcast targets, and enables auto-generated captions - all without manual dashboard interaction.

Example prompt: Create a direct upload via POST /video/v1/uploads, poll GET /video/v1/assets/{ASSET_ID} until status is 'ready', then retrieve the playback_id for HLS delivery

### Live Streaming Infrastructure

Provision and manage live streaming infrastructure programmatically. Each live stream gets a unique RTMP endpoint and stream key for OBS, Wirecast, or custom encoder ingest. The API supports simulcast to multiple platforms simultaneously, auto-generated subtitles from speech-to-text, and automatic DVR recording of live sessions as VOD assets for later playback.

Example prompt: Create a new live stream with POST /video/v1/live-streams with reduced_latency enabled, then retrieve the stream_key and RTMP URL from the response

### Video Quality Monitoring and Alerting

Track viewer quality-of-experience in real time across startup time, rebuffering percentage, and error rates. Mux Data provides per-view granularity with dimensional breakdowns by browser, country, CDN, and player version. The monitoring endpoints deliver histogram timeseries for anomaly detection, and the incidents system automatically flags quality degradation events with affected viewer counts.

Example prompt: Query GET /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries for 'current-concurrent-viewers' and GET /data/v1/metrics/{METRIC_ID}/overall for 'rebuffering-percentage' over the last 2 hours

### Secure Content Distribution

Control video access with signed playback URLs and domain-based restrictions. Each asset can have multiple playback IDs with different access policies - public for free content, signed for premium or gated content. Playback restrictions define referrer domain allowlists and user-agent rules to prevent unauthorized embedding or hotlinking of video streams.

Example prompt: Create a signed playback ID on an asset via POST /video/v1/assets/{ASSET_ID}/playback-ids with policy 'signed', then attach a playback restriction using PUT /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /video/v1/assets | Create a video asset from a URL or upload |
| GET | /video/v1/assets/{ASSET_ID} | Retrieve asset details and transcoding status |
| POST | /video/v1/live-streams | Create a live stream with RTMP ingest |
| POST | /video/v1/uploads | Create a direct upload URL for client-side ingest |
| GET | /data/v1/metrics/{METRIC_ID}/overall | Get aggregate QoE metrics |
| GET | /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries | Real-time metric timeseries |
| POST | /video/v1/assets/{ASSET_ID}/playback-ids | Create a playback ID with access policy |
| GET | /data/v1/video-views | List individual video view events |

## Key resources

- **Assets** — Video assets with transcoding, playback ID management, track management, and MP4 static rendition support
- **Live Streams** — RTMP live stream provisioning with simulcast targets, embedded subtitles, and stream key rotation
- **Direct Uploads** — Resumable upload URLs for client-side video ingest without server-side proxying
- **Metrics** — Aggregate quality-of-experience metrics with breakdown, insights, timeseries, and comparison views
- **Real-Time Monitoring** — Live viewer counts, histogram timeseries, and breakdown data for active monitoring
- **Playback Restrictions** — Domain referrer allowlists and user-agent policies for controlling where videos can be embedded

## Why Jentic

- **Setup:** Wiring the Mux API by hand means learning its Basic auth built from an access token id and secret key, and splitting calls across the video and data surfaces yourself. Through Jentic you install once, import the Mux API from the API Directory, store the token id and secret once, and your agent calls it.
- **Permission scoping:** Mux puts the asset id in the URL path (/video/v1/assets/{ASSET_ID}/...), so a rule can pin your agent to one asset: it can read that asset or add a playback id to it and nothing else. You choose the operations it may call, so a call like creating a live stream is not included unless you add it.
- **Credential handling:** Your Mux access token id and secret key are stored once, encrypted, by your own Jentic One instance and injected as the Basic auth header at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'upload a video and get a playback url' or 'read viewer metrics', and Jentic returns the matching Mux operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Vimeo API** — Video hosting platform with social features and portfolio pages, less infrastructure-focused than Mux
- **api.video** — Developer-first video API with similar ingest-to-playback pipeline and analytics
- **Cloudinary Upload API** — Media upload and image transformation service that complements Mux's video-only pipeline
- **Deepgram API** — Speech-to-text transcription for generating captions and searchable transcripts from Mux video audio tracks

## FAQ

### What authentication does the Mux API use?

The Mux API uses HTTP Basic Authentication with your Access Token ID as the username and your Secret Key as the password. You generate these credentials in the Mux dashboard under Access Token settings. Through Jentic, these are stored encrypted in your Jentic One instance - agents authenticate via scoped tokens without the secret key entering their context.

### Can I create a live stream and get RTMP ingest credentials via the API?

Yes. POST /video/v1/live-streams returns a stream_key and RTMP URL in the response. You can configure reduced latency, reconnect windows, and auto-generated subtitles in the request body. The stream starts accepting RTMP input immediately after creation.

### What video quality metrics does Mux Data track?

Mux Data tracks startup time, rebuffering percentage, rebuffering frequency, video quality score, playback failure percentage, and exits-before-video-start. Each metric supports dimensional breakdowns by browser, OS, country, player version, CDN, and custom metadata fields via the /data/v1/metrics endpoints.

### How do I upload a video through Jentic with an AI agent?

Install the Jentic SDK with pip install jentic, then search for 'upload video to mux'. Jentic returns the POST /video/v1/uploads operation for creating a direct upload URL and the POST /video/v1/assets endpoint for URL-based ingest. The agent picks the right operation based on whether it has a file or a URL, and Jentic handles Basic Auth credential injection.

### Are there rate limits on the Mux API?

Mux applies rate limits that vary by endpoint and plan tier. Video management endpoints typically allow hundreds of requests per second. Data query endpoints have lower limits to protect the analytics infrastructure. The API returns 429 status codes with Retry-After headers when limits are exceeded.

### Can I restrict who can play my videos?

Yes. Create playback IDs with a 'signed' policy to require time-limited signed tokens for access. Additionally, use the /video/v1/playback-restrictions endpoint to set domain referrer allowlists and user-agent rules that block unauthorized embedding or hotlinking of your video content.

### Can I limit what my agent is allowed to do with the Mux API?

Yes. Because you self-host Jentic One, your own rules decide which Mux operations and credentials the agent may use. Since Mux puts the asset id in the URL path, such as /video/v1/assets/{ASSET_ID}, a rule can pin the agent to a single asset so it can only read that asset or add a playback id to it and nothing else. You also choose which operations it may call, so an action like creating a live stream via POST /video/v1/live-streams stays unavailable unless you explicitly allow it.
