Skip to main content

What is the Mosaic API?

The Mosaic API lets you run video editing workflows entirely from code. A workflow is called an Agent — a graph of processing steps (called Tiles) that can do anything from adding captions to generating clips to full multi-step pipelines. You supply a video, Mosaic does the work and returns the result.

Getting Started

1. Get your API key

Create an API key in your Mosaic dashboard. All keys are prefixed with mk_ and authenticate via the Authorization: Bearer header.

2. Verify with Who Am I

Call /whoami to confirm your key is valid and see which organization it belongs to:
Always test your API key with /whoami first when setting up a new integration. This catches authentication issues before you start building.

3. Run your first agent

The typical flow is three steps:
  1. Run an agentPOST /agent/{agent_id}/run with your video URLs and optional parameters.
  2. Track progress — Poll GET /agent_run/{run_id} or subscribe to a webhook via callback_url.
  3. Download outputs — Outputs (signed video URLs, thumbnails, Premiere timelines) are included in the run response.

Core Concepts


Authentication

Use your API key with the Authorization: Bearer header on every request.
API keys can be created and managed in your Mosaic dashboard.

Webhook Authentication

When a webhook secret is configured for your account, Mosaic includes an X-Mosaic-Signature header for verification. Always validate this signature before processing webhook payloads. See the Webhook Events documentation for details.

Error Handling

Responses use conventional HTTP status codes. On errors the body contains a detail field with a human-readable message.

Base URL