> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eachlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Video API (Beta)

> Run production video capabilities — transcode, trim, captions, packaging, analysis — through the eachlabs prediction API with per-second billing.

<Note>
  **Beta.** The Video API is in beta. The API is production infrastructure — request shapes documented here are stable for the beta (additions may land; nothing is removed without notice). Billing is live from the first call: see [Billing & Limits](/video/billing-limits).
</Note>

## What is the Video API?

One API for programmatic video work: **44 ready-made capabilities** — transcoding, trimming, silence-aware splitting, captions and subtitle composition, watermarks, overlays and stickers, crossfades and title cards, audio replacement, ducking and mastering, HLS/DASH packaging, thumbnails and sprites — including four structured **analysis capabilities** (`probe`, `scene_detect`, `silence_detect`, `audio_analysis`) that return JSON instead of media.

It runs behind the same [eachlabs prediction API](/api/overview) you may already use for AI models: the same API key, the same submit-and-poll flow, the same billing. Model slug: **`eachlabs-video-api`**.

**Terminology.** A **job** is the unit of video work the engine executes; it is tracked as a **prediction** — the API object you submit and poll. On the prediction, `metrics.predict_time` measures the full wall time of the run, while compute is metered only from the job's ffmpeg execution wall — the two differ by design (delivery beyond the 200 MB allowance bills separately; see [Billing & Limits](/video/billing-limits)).

```json theme={"dark"}
{
  "model": "eachlabs-video-api",
  "input": {
    "capability": "trim",
    "input_url": "YOUR_INPUT_URL",
    "params": { "start": 3.0, "duration": 12.5 }
  }
}
```

## Why it's safe to build on

* **Strict validation, \$0 rejects.** Every capability validates its parameters server-side with `additionalProperties: false`. A malformed request — wrong enum, out-of-range value, unknown key, structurally incompatible input — is rejected *before any compute runs* and costs nothing.
* **Per-second integer billing, no multipliers.** You pay `billed_seconds × $0.0015`, plus output delivery only beyond a 200 MB free allowance per job (\$0.30/GB on the excess). No resolution, codec, or duration multipliers. Details in [Billing & Limits](/video/billing-limits).
* **Deliver-or-don't-bill for platform faults.** If a failure on our side — including an upload failure — prevents delivering your output, you are not billed; `platform_fault` is the one error class where retrying the same request can succeed (`platform_drift`, also \$0, is deterministic — see the [error catalog](/video/billing-limits#error-catalog)). Failures caused by your input after compute starts are metered by the engine — a mid-run ffmpeg failure meters the elapsed execution wall, a job killed at the 3600 s execution cap meters exactly 3600 seconds — and settle at `metrics.cost: 0` during the beta. The full matrix is in [Billing & Limits](/video/billing-limits#failed-compute).
* **Empty outputs are rejected at \$0 when the source can be probed.** Requests whose parameters would produce nothing (a trim starting past the end of the clip, a fade beyond the video's duration) are rejected by a probe gate before execution. On a source the probe cannot read, that gate fails open: the job runs and bills its execution seconds even if the output is near-empty.

## How results come back

Submit returns a prediction ID; poll `GET /v1/prediction/{id}` until a terminal status (`success`, `error`, or `cancelled`). Successful media jobs return hosted artifact URL(s) in `output`; analysis jobs return structured JSON — the exact JSON per output class is in [Response shapes](/video/capabilities#response-shapes). Completion webhooks are available through the platform's standard `webhook_url`.

## Get started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/video/quickstart">
    Submit your first job and poll it to completion.
  </Card>

  <Card title="Capabilities Reference" icon="list" href="/video/capabilities">
    All 44 capabilities with parameters, bounds, and copy-pasteable request bodies.
  </Card>

  <Card title="Billing & Limits" icon="credit-card" href="/video/billing-limits">
    The billing formula, the \$0-reject guarantees, and the full error catalog.
  </Card>

  <Card title="MCP for AI Agents" icon="robot" href="/video/mcp/quickstart">
    Drive the Video API from Claude, Cursor, or any MCP-capable agent.
  </Card>
</CardGroup>

Policies: [Acceptable Use](/video/acceptable-use) · [Abuse & Takedown](/video/abuse-and-takedown) · [Versioning & Deprecation](/video/versioning)
