---
title: "Media-as-a-Tool — give your AI agent the power to make finished media, mid-task"
tier: hero
format: agent-integration
theme: developer | agent | automation | infrastructure
persona: agent builder, AI engineer, automation team, dev-rel, indie hacker
duration: "add in 1 line → media tool calls in any agent run"
budget_usd: "per-asset metered (images ~$0.03–0.10, video ~$0.05–0.30); cap with max_cost_usd"
caps: ["create_media", "generate_project", "ffmpeg-concat", "ffmpeg-mux", "hyperframes-render", "list_capabilities", "get_cost_report"]
skills: ["base", "finishing-quality"]
showcases: ["/chapters/agent-media-tool-example.html"]
status: "live — the wedge playbook. Storyboard is an MCP server; any MCP-capable agent (Claude, CLI, your own) can call create_media / generate_project / finishing tools as ordinary tool calls, mid-workflow, and get a finished asset back."
reliability: 4.6 # core image/finishing path is deterministic + metered; only the video tier inherits fal latency
---

# Media-as-a-Tool — the one nobody else can offer

Every competitor is a **destination app** — you leave your work, go to their website, make a clip, come back. Storyboard
is an **MCP server**: an AI agent calls it as a *tool*, in the middle of doing something else, and gets a **finished,
text-legible, reproducible** asset back — no app, no human in the loop. This is the differentiator the whole product
rests on, and it's the easiest thing to try.

## The 60-second try

Add Storyboard to any MCP client (Claude Desktop, the CLI, your own agent) with one entry:

```jsonc
{ "mcpServers": { "storyboard": {
  "type": "http", "url": "https://storyboard.daydream.monster/api/mcp",
  "headers": { "Authorization": "Bearer sk_…" } } } }
```

Now your agent can, mid-task:

```
list_capabilities()                      # 105+ models across providers, live
create_media({ action:"generate", prompt:"…", max_cost_usd:0.10 })
generate_project({ title, scenes:[…], aspect_ratio:"9:16" })   # multi-scene
create_media({ model_override:"hyperframes-render", html, background_video_url })  # legible text over video
create_media({ model_override:"ffmpeg-concat", … })            # finish to one MP4
get_cost_report({ … })                   # programmatic spend visibility
```

## Why an agent wants this (use cases)

- **A coding/research agent** that needs a diagram, a hero image, or an explainer clip *as a step* — not a detour to a web app.
- **A content pipeline** (cron / CI / queue) that renders N branded assets per run, unattended, with `max_cost_usd` caps.
- **A support/marketing bot** that turns a doc or a data row into a shareable reel inline.
- **A multi-agent system** where one agent plans and another renders — the renderer is just a tool surface.

## The contract that makes it agent-safe

- **Metered + capped** — every call has a USD price; pass `max_cost_usd` to refuse over-budget calls before they run; `get_cost_report` for accounting.
- **Idempotent** — pass `idempotency_key` so at-least-once delivery / retries don't double-spend.
- **Deterministic finishing** — `ffmpeg-*` / `hyperframes-render` give a *delivered* asset (an MP4, a captioned video), not a punch-list of clip URLs.
- **Model-agnostic + fallback** — name a cap or let it route; siblings cover outages.
- **Structured results** — URLs + cost + elapsed come back as data an agent can branch on.

## The pattern (any agent)

```
agent is doing a task
  → needs an asset → list_capabilities (or just call)
  → create_media / generate_project  (with max_cost_usd + idempotency_key)
  → optional: hyperframes-render overlay for legible text/UI
  → optional: ffmpeg-concat / mux → one finished file
  → get the URL back as a tool result → use it in the larger workflow
```

## Quality bar (definition of done)

- ✅ The agent never leaves its workflow — media is a tool call, not an app visit.
- ✅ Every call is cost-visible and cap-able.
- ✅ The output is a **finished** asset (text legible if it carries text), not raw clips.
- ✅ Retries are idempotent; outages fall back to a sibling cap.

## Watch-outs

- The **video tier inherits fal latency/flakiness** — for agent-critical paths prefer image + finishing (deterministic) or set generous timeouts + idempotency.
- Long renders (>15s video, multi-scene) → use the async tools (`submit_creative_job` / `get_creative_job`) so the tool call doesn't block.
- Keep the agent's system prompt thin — it sees the tool schemas already; don't restate them.
