---
title: Video Generation
description: Generate, keyframe, inspect, edit, extend, and publish videos in eve agents with durable background workflow tasks, multi-model routing, provider-agnostic storage, and inline Slack delivery.
url: "https://eve.dev/docs/extensions/video"
docs_index: /llms.txt
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

`@eve/video` adds end-to-end video production to an eve agent. Mounting it registers six tools (`generate`, `keyframe`, `inspect`, `publish`, `list`, and `models`), the `video-production` skill, and model instructions. `<mount>__generate` runs as a background [workflow task](/docs/tools/workflows#run-calls-as-tasks-task) (`defineWorkflowTool({ task })`) backed by AI SDK or Vercel AI Gateway video models: each call returns a task receipt immediately, pauses without holding serverless compute, survives restarts and redeploys, and delivers the finished video in a `<task_result>` message. Output saves through a provider-agnostic storage interface with a compaction-proof session manifest, and `slackVideoRenderer()` uploads completed videos, cuts, and keyframes inline to Slack threads.

## Install and mount

Install `@eve/video` in your agent project (`eve >= 1.6.0`, Node.js `>= 24`):

```bash
pnpm add @eve/video
```

Add a mount file at `agent/extensions/video.ts`:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";

export default video({
  // Omit all fields to use spacexai/grok-imagine-video, spacexai/grok-imagine-image-2.0,
  // webhook: "auto", and automatic storage.
});
```

Mounting at `agent/extensions/video.ts` adds these contributions under the `video__` prefix:

| Contribution              | Kind                     | Purpose                                                                                            |
| ------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------- |
| `video__generate`         | Background workflow task | Generate, edit, or extend videos from prompts, keyframes, or reference media.                      |
| `video__keyframe`         | Tool                     | Generate still opening/closing frames and character or brand sheets before animating.              |
| `video__inspect`          | Tool                     | Probe container metadata and extract frames, contact sheets, or final frames via sandbox `ffmpeg`. |
| `video__publish`          | Tool                     | Persist and deliver sandbox-edited cuts or promoted `publish: false` drafts to Slack.              |
| `video__list`             | Tool                     | Recall session takes (`take-01`), keyframes (`kf-01`), and published cuts (`cut-01`) across turns. |
| `video__models`           | Tool                     | Discover video and keyframe image models with live capabilities, pricing, and `modelFilter` state. |
| `video__video-production` | Skill                    | Multi-shot playbook covering keyframes, draft-to-hero models, critique loops, and `ffmpeg` edits.  |

String model IDs route through Vercel AI Gateway and require `AI_GATEWAY_API_KEY` or Vercel OIDC credentials. To call a provider directly without AI Gateway, pass an AI SDK v4 or v3 `VideoModel` to `model` (or `models`) and an AI SDK v4 or v3 `ImageModel` to `imageModel`.

## Entry points

`@eve/video` exposes six subpaths:

| Subpath              | Exports                                                                                                               |
| -------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `@eve/video`         | Default export (`video`) extension factory.                                                                           |
| `@eve/video/tools`   | `generate`, `keyframe`, `inspect`, `publish`, `list`, and `models` tool definitions (read `extension.config` lazily). |
| `@eve/video/types`   | Public TypeScript interfaces for tool inputs, progress updates, outputs, catalog models, `modelFilter`, and models.   |
| `@eve/video/storage` | `localDisk()`, `inMemory()`, and `VideoStorage` contract types.                                                       |
| `@eve/video/vercel`  | `vercelBlob()` storage adapter and `VercelBlobVideoStorageOptions`.                                                   |
| `@eve/video/slack`   | `slackVideoRenderer()` and `SlackVideoRendererOptions` for inline Slack thread uploads.                               |

## Background execution and webhooks

Each `<mount>__generate` call runs as a `defineWorkflowTool({ task })` workflow run that returns a task receipt immediately and delivers the finished video in a `<task_result>` message. The model can wait with `eve__task_wait` or cancel with `eve__task_cancel` (see [Tasks](/docs/tools/tasks)).

- **Webhook-first (`webhook: "auto"`, default):** uses `createWebhook({ respondWith: "manual" })` when the video model supports native terminal webhooks (such as Vercel AI Gateway models) and the host exposes a public `https://` webhook URL. Callbacks verify `x-ai-gateway-signature` (`401` on invalid signatures, switching to polling after 10 invalid deliveries; `204` on verified deliveries). A 20-second fallback poll runs alongside the webhook so jobs finish even if callbacks are blocked.
- **Polling fallback:** falls back to `sleep()` polling (`poll.intervalMs`, default `5000` ms; `poll.timeoutMs`, default `600000` ms) in local `eve dev`, for direct provider models without native terminal webhooks (such as `@ai-sdk/google` or `@ai-sdk/klingai`), or when `webhook: "never"` is set.
- **Single-step models:** models that implement only `doGenerate` (without `doStart` and `doStatus`) finish inside a single `"use step"`.
- **Payload boundary and cleanup:** completed videos download and persist inside the same `"use step"` as the terminal status check so multi-megabyte bytes never cross the Workflow step boundary. Large local inputs (> 180 KiB) stage to public HTTPS storage (`ttlDays: 1`) and are deleted in `finally`, including on cancel or timeout.

## Configure video and image models

Omit `model` to use `"spacexai/grok-imagine-video"`, which supports text-to-video, image-to-video, `references`, audio, in-place editing, and extension. Omit `imageModel` to use `"spacexai/grok-imagine-image-2.0"` for `<mount>__keyframe`, or set `imageModel: false` to disable keyframe generation.

The agent can pass any video model ID string directly via `model` on `<mount>__generate` (or any image model ID on `<mount>__keyframe`). To advertise recommended models, define short preset aliases (for example, fast drafts before hero renders and upscaling), or register custom `VideoModel` instances, configure `models`:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";

export default video({
  model: "spacexai/grok-imagine-video",
  models: {
    draft: "spacexai/grok-imagine-video-1.5-lite",
    hero: "bytedance/seedance-2.5",
    edit: "spacexai/grok-imagine-video",
    upscale: "topaz/proteus",
  },
  imageModel: "spacexai/grok-imagine-image-2.0",
  defaults: {
    aspectRatio: "16:9",
    resolution: "720p",
    duration: 6,
    audio: true,
  },
  gateway: {
    apiKey: process.env.AI_GATEWAY_API_KEY,
  },
  providerOptions: {
    bytedance: { pollTimeoutMs: 600_000 },
  },
});
```

- **Named presets (`Record<string, string | VideoModelLike>`):** the agent can pass an alias such as `model: "draft"` or `model: "hero"`, any configured model ID, or any Gateway video model ID string to `<mount>__generate`.
- **Model list (`(string | VideoModelLike)[]`):** pass `models: ["bytedance/seedance-2.5-flash", "bytedance/seedance-2.5", "google/veo-3.1-generate-001"]` to surface those models (and their guidance) in the prompt or register custom `VideoModel` instances without aliases.
- **Separate mounts:** mount `@eve/video` at separate paths (for example `agent/extensions/video.ts` and `agent/extensions/video-hq.ts`) when you want distinct defaults, limits, or approval policies per model.

### Discover models and filter by policy

`<mount>__models` queries the live Vercel AI Gateway `/v1/models` catalog (cached in memory for 5 minutes), merges any configured custom `VideoModel` / `ImageModel` instances and `models` aliases, and filters by modality (`type`), capability (`operation`, `resolution`, `audio`), `provider`, or free-text `query`.

To restrict which video and keyframe image models your agent can list or invoke—for example, enforcing Zero Data Retention (ZDR) on Vercel—configure `modelFilter`:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";

export default video({
  modelFilter: {
    zdr: true,
    noTraining: "all",
    providers: ["google", "spacexai"],
    excludeProviders: ["bytedance"],
    filter: (model) => model.type === "image" || model.generateAudio !== false,
  },
});
```

You can also pass a bare predicate function `modelFilter: (model) => model.zdr === "all"` or a minimal ZDR-only policy `modelFilter: { zdr: true }`:

- **Compliance levels (`zdr`, `noTraining`):** `true` or `"all"` requires `"all"` compliance, `"some"` allows `"all"` or `"some"`, and `false` disables that check.
- **Provider allowlist / blocklist (`providers`, `excludeProviders`):** case-insensitive match against `model.provider` (`owned_by`) or the model ID prefix.
- **Custom predicate (`filter` or function shorthand):** receives each `CatalogModelInfo` entry (including live capabilities, compliance posture, pricing, `aliases`, and `isDefault`).
- **Fail-closed pre-flight enforcement:** when `modelFilter` is active, both `<mount>__generate` and `<mount>__keyframe` verify the resolved model against the filtered catalog before staging media or calling the provider, rejecting excluded or unlisted Gateway model IDs with zero provider billing. `<mount>__models` also filters reported `presets` to compliant models.

## Multi-shot workflow and session tools

The studio tools share a session-scoped manifest (persisted to backing storage and mirrored to the sandbox) that assigns short IDs—`take-01` for generated videos, `kf-01` for keyframes, and `cut-01` for published cuts—so the agent can reference earlier assets across long sessions and context compaction.

### Lock visuals with keyframes

Call `<mount>__keyframe` to generate hero opening and closing frames or character and brand reference sheets before spending video budget. Pass the returned keyframe ID (such as `"kf-01"`), `storageKey`, or sandbox `path` into `<mount>__generate` via `start`, `end`, or `references`.

### Edit, extend, and draft privately

To edit or extend an earlier clip, call `<mount>__generate` with `video` set to its take ID (`"take-01"`), `storageKey`, public `https://` URL, or sandbox `path`:

- **Default (edit in place):** omit `extend` to modify the existing clip according to `prompt`. `@eve/video` omits `duration` and `aspectRatio` (including values from `defaults`) so in-place edits match the source clip.
- **Extend (`extend: true`):** continues the video from its last frame according to `prompt`, keeping `duration` for the extension segment.
- **Readable names and private drafts:** pass `name` (such as `"scene-1-intro"`) for readable filenames and `publish: false` for internal drafts or B-roll that should not upload directly to Slack.

`video` cannot be combined with `start` or `end`, and `extend: true` requires `video`. `@eve/video` translates `video` and `extend` to the active provider's native API:

- **`spacexai/grok-imagine-video` (default, and direct xAI models):** forwards `video` via `providerOptions.xai.videoUrl` and sets `mode: "extend-video"` when `extend: true`. On edits, `resolution` is also omitted because Grok rejects it. Local bytes and `storageKey` inputs stage automatically or sign via `storage.getSignedUrl` (including on private Vercel Blob stores).
- **`bytedance/seedance-2.5` and `bytedance/seedance-2.5-flash`:** prepends `video` as the first entry of `inputReferences` (before additional `references`) and omits `aspectRatio` (including from `defaults`) on extensions as well as edits.
- **`bfl/flux-3-video`, `topaz/*`, and other models:** prepends `video` as the first entry of `inputReferences` with explicit `mediaType`, staging large local inputs to public HTTPS storage on AI Gateway async models.
- **Generation-only models (such as `spacexai/grok-imagine-video-1.5*` and `google/veo-*`):** iterate by generating a new take with a refined `prompt`, reusing `seed`, `start`, `end`, or image `references`, or chaining from an extracted last frame via `<mount>__inspect`.

### Inspect takes and chain frames

Call `<mount>__inspect` on a take ID, `storageKey`, `https://` URL, or sandbox path to probe dimensions, duration, codecs, and audio track presence. When the agent has a sandbox with `ffmpeg`, pass `frames` to extract evenly spaced stills and a tiled contact sheet for visual self-critique, `timestamps` for exact moments, or `lastFrame: true` (with optional `outputDir`) to extract a continuation frame for the next shot's `start`.

### Publish cuts and recall session history

- **Publish (`<mount>__publish`):** pass a sandbox-edited or `ffmpeg`-stitched file path, a `storageKey`, or a `publish: false` take ID (`"take-02"`) with optional `title`, `name`, and `caption` to store the cut (`"cut-01"`) and upload it inline in Slack.
- **Recall (`<mount>__list`):** list earlier session takes, keyframes, and published cuts chronologically, filtered by `kind` (`"video"`, `"keyframe"`, `"published"`, or `"all"`) and `limit`.
- **Production skill (`<mount>__video-production`):** bundles guidance for shot planning, keyframe-first direction, draft-to-hero model selection, visual critique with `inspect`, frame chaining, and `ffmpeg` post-production.

## Configure storage

Video storage handles byte-serving models (such as Google Veo, which return inline bytes rather than URLs), persists videos and keyframes past expiring provider URLs, stores the session manifest, and stages local inputs over 180 KiB (and local Grok edit/extend videos) so async AI Gateway requests stay under their 300 KiB inline body limit.

### Automatic storage selection

When `storage` is omitted, `@eve/video` chooses a storage backend in this order:

| Condition                                                                          | Selected backend                                               |
| ---------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `EVE_VIDEO_BLOB_STORE_ID` or `EVE_VIDEO_BLOB_READ_WRITE_TOKEN` is set              | `vercelBlob()`                                                 |
| Running on Vercel (`VERCEL` is set) and `BLOB_STORE_ID` or `BLOB_READ_WRITE_TOKEN` | `vercelBlob()`                                                 |
| Running under `eve dev` (`EVE_DEV=1`)                                              | `localDisk()`                                                  |
| None of the above                                                                  | None; configure `storage` or pass a sandbox `path` on the call |

Set `storage: false` to disable automatic storage selection (for example, to write only to a sandbox `path`).

### Vercel Blob

Import `vercelBlob` from `@eve/video/vercel` to configure Vercel Blob explicitly:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";
import { vercelBlob } from "@eve/video/vercel";

export default video({
  storage: vercelBlob({
    access: "public", // or "private" (uses short-lived signed URLs for staging and edits)
    prefix: "eve/video", // default
    ttlDays: 30,
  }),
});
```

An explicit `token` option takes precedence over OIDC. With environment variables, `EVE_VIDEO_BLOB_STORE_ID` uses OIDC when `VERCEL_OIDC_TOKEN` is set or `EVE_VIDEO_BLOB_READ_WRITE_TOKEN` is absent; otherwise `EVE_VIDEO_BLOB_READ_WRITE_TOKEN` is used, and when neither `EVE_VIDEO_BLOB_*` variable is set, `@vercel/blob` falls back to `BLOB_STORE_ID` + OIDC or `BLOB_READ_WRITE_TOKEN`. Blobs are stored under `${prefix}/${key}` while `put` returns the unprefixed logical `key`. With `access: "private"`, `put` omits the unauthenticated `url`, and `vercelBlob()` implements `getSignedUrl` via Vercel Blob signed tokens (`issueSignedToken` + `presignUrl`) so staging and same-session edits work without making the store public. `vercelBlob()` also implements `list()` for session asset fallback, and uploads over 5 MiB use multipart automatically unless `multipart` is set.

### Local disk and in-memory storage

Import `localDisk` or `inMemory` from `@eve/video/storage` for local development, self-hosted file serving, or tests:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";
import { localDisk } from "@eve/video/storage";

export default video({
  storage: localDisk({
    directory: "./data/videos", // defaults to <tmpdir>/eve-videos
    publicBaseUrl: "https://media.example.com/videos",
  }),
});
```

`localDisk()` writes files atomically and implements `get`, `delete`, and `list`. `inMemory({ baseUrl?, visibility? })` keeps bytes in memory and exposes `get`, `delete`, `list`, `keys()`, and `clear()`.

### Custom storage adapter

Implement `VideoStorage` from `@eve/video/storage` to persist videos to Amazon S3, Cloudflare R2, Google Cloud Storage, or another backend. Only `put` is required; implementing `get` lets callers iterate by `storageKey`, inspect clips, read the session manifest, and upload inline with `slackVideoRenderer`; implementing `getSignedUrl` enables staging and edits on private stores; implementing `delete` cleans up staged inputs and partial batches; implementing `list` enables session listing fallback when no manifest is present:

```ts title="agent/lib/r2-video-storage.ts"
import type { VideoStorage } from "@eve/video/storage";
import { DeleteObjectCommand, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";

const client = new S3Client({ region: "auto", endpoint: process.env.R2_ENDPOINT });

export const r2VideoStorage: VideoStorage = {
  async put({ key, data, mediaType, signal }) {
    await client.send(
      new PutObjectCommand({
        Bucket: process.env.R2_BUCKET,
        Key: key,
        Body: data,
        ContentType: mediaType,
      }),
      { abortSignal: signal },
    );
    return {
      key,
      url: `https://media.example.com/${key}`,
      mediaType,
      bytes: data.byteLength,
      visibility: "public",
    };
  },
  async delete({ key, signal }) {
    await client.send(new DeleteObjectCommand({ Bucket: process.env.R2_BUCKET, Key: key }), {
      abortSignal: signal,
    });
  },
};
```

Pass `storage: r2VideoStorage` to `video(...)` in `agent/extensions/video.ts`.

## Save videos to a sandbox

When your agent has a [sandbox](/docs/sandbox), `@eve/video` reads input media from sandbox paths (including inbound Slack attachments at `/workspace/.eve/attachments/...`) and writes generated videos, keyframes, and extracted inspection frames directly to disk.

- **Inputs (`video`, `start`, `end`, `references`):** pass public `https://` URLs, session manifest IDs (`"take-01"`, `"kf-01"`, `"cut-01"`), sandbox file paths, or a `storageKey` from the same session when configured storage implements `get`. `video` accepts videos (MP4, WebM, MOV); `start` and `end` accept raster images (PNG, JPEG, WebP, GIF); `references` accepts images, videos, or audio (MP3, WAV, OGG, FLAC, M4A). Non-HTTPS URLs, embedded credentials, and private, loopback, link-local, or metadata hosts are blocked before any request runs.
- **Automatic staging:** for AI Gateway asynchronous models, local inputs that would exceed the inline request budget (and any local bytes passed to Grok edit/extend) upload incrementally to public HTTPS storage (`ttlDays: 1`) before the request and are deleted in `finally` when the task ends. Direct provider models (such as `@ai-sdk/google`) keep local inputs inline.
- **Output (`path`):** pass `path` (for example `output/clip.mp4`) to save videos into the sandbox. When `n > 1`, `@eve/video` writes `output/clip.mp4`, `output/clip-1.mp4`, and so on. When both storage and `path` are present, `@eve/video` writes to both and returns both `url` and `path`; set `storage: false` to write only to the sandbox.

## Require approval and set limits

Video models bill per second and can take several minutes. Gate calls behind [human approval](/docs/tools) and cap duration, batch count, and media sizes directly on the mount:

```ts title="agent/extensions/video.ts"
import video from "@eve/video";
import { always } from "eve/tools/approval";

export default video({
  approval: always(),
  limits: {
    maxDurationSeconds: 10,
    maxVideosPerCall: 2,
    maxInputBytes: 50 * 1024 * 1024,
    maxOutputBytes: 256 * 1024 * 1024,
  },
});
```

When you pass an approval policy such as `always()`, `@eve/video` formats an approval prompt with the action (`Generate`, `Edit`, or `Extend`), model, video settings, source `video`, count, sandbox path, and up to 300 characters of the prompt. Pass a full `ApprovalConfiguration` object to customize `prompt` or `response`.

Because `generate` is a `defineWorkflowTool`, configure `approval`, `defaults`, `limits`, `poll`, and `webhook` directly on `video(...)` rather than spreading `generate` into `defineTool()`. To remove any contributed tool, export `disableTool()` in `agent/extensions/video/tools/<name>.ts` (see [Override a contribution](/docs/extensions#override-a-contribution)).

## Play videos inline in Slack

Slack does not render a bare `.mp4` link as an inline player. For long iterative Slack sessions, configure a [sandbox](/docs/sandbox) on your agent (so inbound Slack clips land on disk and `inspect` / `ffmpeg` can run), raise Slack's inbound `uploadPolicy.maxBytes` above the default 25 MB so users can drop phone videos and reference clips directly into threads, and add `slackVideoRenderer()` from `@eve/video/slack` to `renderers`:

```ts title="agent/channels/slack.ts"
import { slackChannel } from "eve/channels/slack";
import { slackVideoRenderer } from "@eve/video/slack";

export default slackChannel({
  // Raise the inbound attachment cap (default 25 MB) for phone videos and reference clips.
  uploadPolicy: { maxBytes: 100 * 1024 * 1024 },
  renderers: [slackVideoRenderer()],
});
```

- **Automatic storage sharing:** `slackVideoRenderer()` reads `storage` directly from your `video(...)` mount configuration in `agent/extensions/video.ts` (including private `vercelBlob({ access: "private", prefix: "custom" })` or custom `VideoStorage` adapters) and falls back to automatic storage selection. Pass `{ storage }` only when overriding storage for a separate mount.
- **Observed tools:** by default, `slackVideoRenderer()` observes `<mount>__generate`, `<mount>__publish`, and `<mount>__keyframe`. Set `includeKeyframes: false` to keep keyframes out of the thread, or set `toolName` to observe one exact tool name.
- **Draft filtering and publishing:** calls returning `publish: false` (such as internal drafts or B-roll) are skipped so exploratory takes do not flood the Slack thread. When a take or `ffmpeg` cut is ready, `<mount>__publish` uploads it inline with its `caption` as Slack's `initial_comment`.
- **Readable filenames and delivery timing:** filenames derive from `name` (or `title` on single-item outputs) rather than random storage keys. By default (`timing: "after-reply"`), bytes pre-upload on `call.settled` while the reply is written and complete immediately after the reply posts via `files.completeUploadExternal` (flushing on `turn.settled` or `session.ended` if no reply posts). Pass `timing: "immediate"` to upload as soon as the tool finishes.
- **Error reporting:** missing `storage.get()`, missing or empty objects, files over `maxBytes` (default 100 MiB), and Slack upload errors invoke `onError(error, { callId, storageKey })` instead of silently dropping files.

## Configuration reference

### Extension options (`@eve/video`)

| Option            | Type                                                                          | Default                                                                    | Description                                                                                                                                                                  |
| ----------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`           | `string \| VideoModelLike`                                                    | `"spacexai/grok-imagine-video"`                                            | Default Gateway model ID or AI SDK v4/v3 `VideoModel` instance.                                                                                                              |
| `models`          | `VideoModelsConfig`                                                           | None                                                                       | Optional preset alias map (`Record<string, string \| VideoModelLike>`) or list of video models highlighted in guidance and resolvable by alias/ID per call.                  |
| `imageModel`      | `string \| ImageModelLike \| false`                                           | `"spacexai/grok-imagine-image-2.0"`                                        | Image model ID or AI SDK v4/v3 `ImageModel` for `<mount>__keyframe`, or `false` to disable keyframe generation.                                                              |
| `modelFilter`     | `VideoModelFilterInput`                                                       | None                                                                       | Policy object (`{ zdr?, noTraining?, providers?, excludeProviders?, filter? }`) or predicate restricting models listed by `models` and permitted by `generate` / `keyframe`. |
| `storage`         | `VideoStorage \| false`                                                       | Auto-selected                                                              | External storage adapter, or `false` to disable automatic storage selection.                                                                                                 |
| `gateway`         | `{ apiKey?: string; baseURL?: string; headers?: Record<string, string> }`     | Default AI Gateway credentials                                             | Custom Vercel AI Gateway connection options for string model IDs.                                                                                                            |
| `defaults`        | `{ aspectRatio?, resolution?, duration?, audio?, fps? }`                      | None                                                                       | Default generation parameters applied when a tool call omits them.                                                                                                           |
| `poll`            | `{ intervalMs?: number; timeoutMs?: number }`                                 | `intervalMs: 5000`, `timeoutMs: 600000`                                    | `sleep()` polling interval (`100`–`60000` ms) and timeout (`100`–`7200000` ms) for asynchronous jobs.                                                                        |
| `webhook`         | `"auto" \| "never"`                                                           | `"auto"`                                                                   | Uses `createWebhook({ respondWith: "manual" })` when the model supports native terminal webhooks and the host has a public `https://` URL. Set `"never"` to always poll.     |
| `limits`          | `{ maxDurationSeconds?, maxVideosPerCall?, maxInputBytes?, maxOutputBytes? }` | `maxVideosPerCall: 4`, `maxInputBytes: 100 MiB`, `maxOutputBytes: 512 MiB` | Validation caps checked before submitting jobs or downloading output. `maxDurationSeconds` has no default cap.                                                               |
| `approval`        | `Approval<GenerateVideoToolInput>`                                            | None                                                                       | Approval policy or configuration gating `generate` tool execution.                                                                                                           |
| `providerOptions` | `Record<string, Record<string, unknown>>`                                     | None                                                                       | Provider-specific options forwarded to the underlying video model call.                                                                                                      |

### Slack renderer options (`@eve/video/slack`)

| Option             | Type                                                                        | Default                                | Description                                                                                            |
| ------------------ | --------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `storage`          | `VideoStorage`                                                              | Extension's configured or auto storage | Storage adapter used to read generated videos, cuts, and keyframes.                                    |
| `mount`            | `string`                                                                    | `"video"`                              | Extension mount name used to observe `<mount>__generate`, `<mount>__publish`, and `<mount>__keyframe`. |
| `toolName`         | `string`                                                                    | None                                   | Exact single tool name to observe; overrides `mount` and `includeKeyframes`.                           |
| `includeKeyframes` | `boolean`                                                                   | `true`                                 | Upload `<mount>__keyframe` images inline to the Slack thread.                                          |
| `timing`           | `"after-reply" \| "immediate"`                                              | `"after-reply"`                        | Wait to post files until after the text reply, or upload immediately when the tool finishes.           |
| `maxBytes`         | `number`                                                                    | `104857600` (100 MiB)                  | Maximum file size in bytes uploaded to Slack; larger files report to `onError`.                        |
| `onError`          | `(error: unknown, context: { callId: string; storageKey: string }) => void` | None                                   | Callback invoked when storage reads, size limits, missing files, or Slack uploads fail.                |

### Vercel Blob adapter options (`@eve/video/vercel`)

| Option               | Type                    | Default                                                         | Description                                                          |
| -------------------- | ----------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------- |
| `access`             | `"public" \| "private"` | `"public"`                                                      | Visibility of uploaded video blobs.                                  |
| `token`              | `string`                | `EVE_VIDEO_BLOB_READ_WRITE_TOKEN`, then `BLOB_READ_WRITE_TOKEN` | Vercel Blob read-write token.                                        |
| `oidcToken`          | `string`                | `VERCEL_OIDC_TOKEN` or automatic Vercel OIDC                    | Vercel OIDC token used with `storeId`.                               |
| `storeId`            | `string`                | `EVE_VIDEO_BLOB_STORE_ID`, then `BLOB_STORE_ID`                 | Blob store ID used with Vercel OIDC authentication.                  |
| `prefix`             | `string`                | `"eve/video"`                                                   | Pathname prefix prepended to stored video keys.                      |
| `addRandomSuffix`    | `boolean`               | `false`                                                         | Append a random suffix to uploaded pathnames.                        |
| `allowOverwrite`     | `boolean`               | `true`                                                          | Allow overwriting an existing blob at the same pathname.             |
| `cacheControlMaxAge` | `number`                | None                                                            | `Cache-Control` `max-age` duration in seconds.                       |
| `ttlDays`            | `number`                | None                                                            | Retention period in days before Vercel Blob deletes uploaded videos. |
| `multipart`          | `boolean`               | Automatic above 5 MiB                                           | Force multipart upload on or off.                                    |

### Tool parameters (`<mount>__generate`)

| Parameter     | Type       | Required | Description                                                                                                                                    |
| ------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`      | `string`   | Yes      | Visual description of the video to generate, or the edit or continuation to apply to `video`.                                                  |
| `video`       | `string`   | No       | Existing video to edit or extend: a public `https://` URL, session take ID (`"take-01"`), `storageKey`, or sandbox file path.                  |
| `extend`      | `boolean`  | No       | Continue from `video`'s last frame instead of editing in place. Requires `video`.                                                              |
| `start`       | `string`   | No       | Opening frame image as a public `https://` URL, keyframe ID (`"kf-01"`), `storageKey`, or sandbox file path. Cannot be combined with `video`.  |
| `end`         | `string`   | No       | Closing frame image as a public `https://` URL, keyframe ID (`"kf-01"`), `storageKey`, or sandbox file path. Cannot be combined with `video`.  |
| `references`  | `string[]` | No       | Up to 16 reference images, videos, or audio clips as public `https://` URLs, manifest IDs, `storageKey`s, or sandbox file paths.               |
| `duration`    | `number`   | No       | Target duration in seconds.                                                                                                                    |
| `aspectRatio` | `string`   | No       | Aspect ratio such as `"16:9"`, `"9:16"`, `"1:1"`, or `"auto"`.                                                                                 |
| `resolution`  | `string`   | No       | Output resolution: `"480p"`, `"720p"`, `"1080p"`, `"4k"`, or `"widthxheight"` such as `"1280x720"`.                                            |
| `audio`       | `boolean`  | No       | Generate synchronized audio alongside the video.                                                                                               |
| `n`           | `number`   | No       | Number of video variations to generate. Defaults to `1`; capped by `limits.maxVideosPerCall`.                                                  |
| `fps`         | `number`   | No       | Target frame rate in frames per second.                                                                                                        |
| `seed`        | `number`   | No       | Integer seed for reproducible output when supported by the model.                                                                              |
| `path`        | `string`   | No       | Sandbox file path where generated videos are written.                                                                                          |
| `model`       | `string`   | No       | Video model ID (for example `"bytedance/seedance-2.5"`) or configured preset alias from `models` overriding the default `model` for this call. |
| `name`        | `string`   | No       | Human-readable slug or label used to name the stored and uploaded video file.                                                                  |
| `publish`     | `boolean`  | No       | Set `false` to keep internal drafts or B-roll out of downstream channel uploads such as Slack.                                                 |

### Tool parameters (`<mount>__keyframe`, `<mount>__inspect`, `<mount>__publish`, `<mount>__list`)

| Tool       | Parameter     | Type                                            | Required | Description                                                                                                                      |
| ---------- | ------------- | ----------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `keyframe` | `prompt`      | `string`                                        | Yes      | Description of the still keyframe image to generate or edit.                                                                     |
| `keyframe` | `aspectRatio` | `string`                                        | No       | Explicit aspect ratio such as `"16:9"`, `"9:16"`, or `"1:1"` (do not pass `"auto"`).                                             |
| `keyframe` | `size`        | `string`                                        | No       | Explicit pixel dimensions such as `"1280x720"`, when supported by the image model.                                               |
| `keyframe` | `references`  | `string[]`                                      | No       | Up to 8 reference images as `https://` URLs, manifest IDs, `storageKey`s, or sandbox paths.                                      |
| `keyframe` | `n`           | `number`                                        | No       | Number of keyframe variations to generate (`1`–`4`). Defaults to `1`.                                                            |
| `keyframe` | `seed`        | `number`                                        | No       | Deterministic integer seed when supported by the image model.                                                                    |
| `keyframe` | `model`       | `string`                                        | No       | Image model ID overriding `imageModel`.                                                                                          |
| `keyframe` | `name`        | `string`                                        | No       | Human-readable slug used to label and name the keyframe file.                                                                    |
| `keyframe` | `path`        | `string`                                        | No       | Sandbox file path where generated keyframes are written.                                                                         |
| `keyframe` | `publish`     | `boolean`                                       | No       | Share generated keyframes to downstream channels such as Slack. Defaults to `true`.                                              |
| `inspect`  | `video`       | `string`                                        | Yes      | Video to inspect: `https://` URL, take or cut ID, `storageKey`, or sandbox path.                                                 |
| `inspect`  | `frames`      | `number`                                        | No       | Evenly spaced frames to extract (`0`–`12`; defaults to `6` unless `timestamps` or `lastFrame` is set; `0` probes metadata only). |
| `inspect`  | `timestamps`  | `number[]`                                      | No       | Up to 12 explicit timestamps in seconds; negative values count backward from the end (such as `-0.2`).                           |
| `inspect`  | `lastFrame`   | `boolean`                                       | No       | Extract the video's final frame for inspection or continuation chaining (lossless PNG with `outputDir`).                         |
| `inspect`  | `outputDir`   | `string`                                        | No       | Sandbox directory where extracted frames are saved for reuse.                                                                    |
| `publish`  | `video`       | `string`                                        | Yes      | Video to publish: session take ID, session `storageKey`, or sandbox path (not a remote URL).                                     |
| `publish`  | `title`       | `string`                                        | No       | Human-readable title for the published video.                                                                                    |
| `publish`  | `name`        | `string`                                        | No       | Human-readable slug used when persisting or naming the published cut.                                                            |
| `publish`  | `caption`     | `string`                                        | No       | Optional caption sent above the uploaded video in Slack (`initial_comment`).                                                     |
| `list`     | `kind`        | `"video" \| "keyframe" \| "published" \| "all"` | No       | Filter session assets by category. Defaults to `"all"`.                                                                          |
| `list`     | `limit`       | `number`                                        | No       | Maximum number of recent assets to return (`1`–`200`). Defaults to `50`.                                                         |
| `models`   | `type`        | `"video" \| "image" \| "all"`                   | No       | Filter catalog models by modality. Defaults to `"video"`; `"image"` models are omitted when `imageModel: false`.                 |
| `models`   | `operation`   | `VideoOperation`                                | No       | Filter video models supporting a specific operation (such as `"video-editing"`, `"extend-video"`, or `"motion-control"`).        |
| `models`   | `resolution`  | `string`                                        | No       | Filter video models supporting a specific resolution (such as `"480p"`, `"720p"`, `"1080p"`, or `"4k"`).                         |
| `models`   | `audio`       | `boolean`                                       | No       | Filter video models by synchronized audio generation support.                                                                    |
| `models`   | `provider`    | `string`                                        | No       | Filter models by provider or owner name (case-insensitive).                                                                      |
| `models`   | `query`       | `string`                                        | No       | Free-text search matched across model ID, name, description, provider, aliases, operations, and guidance.                        |

### Tool outputs

- **`<mount>__generate` (`GenerateVideoToolOutput`):** returns a task receipt immediately, yields `GenerateVideoToolProgress` (`status: "generating"`, `model`, `jobId?`, `elapsedSeconds`, `attempt`, `progress?`) while waiting, and delivers `{ status: "completed", model, jobId?, videos, warnings?, publish?, title?, cost?, usage?, providerMetadata? }` in a `<task_result>` message. Each item in `videos` carries `mediaType`, `bytes`, and applicable location and probed fields (`id`, `name`, `url`, `downloadUrl`, `storageKey`, `storagePath`, `path`, `width`, `height`, `durationSeconds`, `hasAudio`, `seed`, `lastFrameUrl`, `visibility`, `expiresAt`).
- **`<mount>__keyframe` (`GenerateKeyframeToolOutput`):** returns `{ status: "completed", model, keyframes, warnings?, publish?, providerMetadata? }`, with each keyframe carrying `id` (such as `"kf-01"`), `name`, `mediaType`, `bytes`, `width`, `height`, and storage/sandbox locations.
- **`<mount>__inspect` (`InspectVideoToolOutput`):** returns container metadata (`width`, `height`, `durationSeconds`, `hasAudio`, `videoCodec`, `audioCodec`), optional extracted `frames`, and a tiled `contactSheet`.
- **`<mount>__publish` (`PublishVideoToolOutput`):** returns `{ status: "published", publish: true, id?, sourceId?, title?, caption?, videos }`.
- **`<mount>__list` (`ListVideosToolOutput`):** returns `{ assets, total }` with chronologically ordered `SessionMediaAsset` entries.
- **`<mount>__models` (`ListModelsToolOutput`):** returns `{ defaultVideoModel, defaultImageModel?, presets?, filteredBy?, models, total }` with `CatalogModelInfo` entries ordered with defaults and presets first.

`bytes` is `0` when the provider delivers directly to caller-managed storage (`uploaded`). For `vercelBlob()`, `storageKey` is the unprefixed logical `key` (matching `localDisk()` and `inMemory()`), while the blob pathname in Vercel Blob is `${prefix}/${key}`.

## Related

- [Extensions](/docs/extensions): mount, configure, and override extension packages
- [Tools](/docs/tools): static tools, approval policies, and tool outputs
- [Workflows as tools](/docs/tools/workflows): write background `task` tools that pause without holding compute
- [Tasks](/docs/tools/tasks): understand how models wait for and cancel background tasks
- [Slack channel reference](/docs/channels/slack/reference): configure `uploadPolicy`, attachments, and custom renderers
- [Package README](https://github.com/vercel/eve/tree/main/packages/eve-video): entry points and local validation commands

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)