media.md
Build with the Media API
The Media API is the operational API for media processing and delivery in MK.IO. Use it when you need to register storage, create assets, run transforms and jobs, manage live events, publish content with streaming locators, or protect playback with streaming and content key policies.
API overview
| Detail | Value |
|---|---|
| Base path | /api/v1/projects/{project_name}/media/ |
| Scope | Project |
| Reference | Media API reference |
How the core resources connect
The Media API becomes much easier to use once you understand the sequence:
- A storage instance tells MK.IO how to reach cloud storage.
- An asset points to content in that storage.
- A transform defines processing instructions.
- A job applies the transform to the asset and creates output assets.
- A streaming locator publishes an asset by linking it to a streaming policy.
- A streaming endpoint provides the delivery domain for the playback paths returned by
listPaths. - A content key policy becomes part of the chain when you need DRM or token-based key delivery.
That resource model supports both VOD and live workflows. The difference is whether the asset is created from existing stored content or continuously written by a live output.
Common workflow patterns
VOD workflow
Live workflow
- Register storage
- Create and start a live event
- Create a live output to archive the stream
- Publish with a streaming locator
Protected playback
- Publish with a DRM-capable streaming policy
- Create a content key policy
- Create a streaming locator referencing both
Guides
- Storage: Register Azure, AWS, or Google storage and manage the credentials MK.IO uses to access it.
- Assets: Create assets, inspect tracks, request file access information, organize content with labels, and apply filters.
- Download asset files: Retrieve one file from an asset by requesting access information, then using the returned access URL and JWT.
- Playback filters: Create asset or account filters for time ranges, track selection, and startup quality, then apply them through locators.
- Transforms and jobs: Define reusable processing profiles and run them against assets.
- Live streaming: Create live events, connect encoders, archive with live outputs, and publish live playback.
- Streaming and publishing: Create streaming endpoints, locators, and policies, then retrieve playback URLs.
- Content protection: Add DRM and key-delivery configuration to published assets.
Workflow guide
- Automate a VOD pipeline: Follow an end-to-end flow from source asset through transform job to published playback.