Media Generation for AI Agents: The 2026 Guide
Updated · Live figures last changed · 41 min read · The GenMagic team
The practical guide to giving an AI agent the power to make images, video, speech, music, and on-brand assets, through one API and one MCP server.
For two years, the story of AI agents was a story about text. An agent could read, reason, plan, and write. What it could not do was make things you can see or hear. That gap is closing fast, and closing it well is now one of the highest-leverage things a builder can do.
The shift is structural. When an agent can call a tool to produce a finished image, a short video, a voiceover, or a full landing page, it stops being an assistant that describes work and becomes an operator that does it. This guide is about how to give an agent that power well: the models and APIs that exist in 2026, the three ways to wire them in, the Model Context Protocol that lets an agent call them itself, and the one problem almost nobody solves, keeping every output on-brand.
This is written for builders. You will find verified model names and real prices as of September 2026, working request shapes for every modality, an honest map of where each approach wins and fails, and a decision framework at the end. Where a code example helps, it is real code you can run, not pseudocode. Wherever a claim rests on a price or a policy, the source is linked inline, because in this field a number six months old is usually wrong.
Contents
- Why media generation is the agent capability of 2026
- How the four modalities actually behave
- The image landscape: models, editing, and real prices
- The video landscape: asynchronous, expensive, improving fast
- The audio landscape: speech is a commodity, music is a minefield
- Three ways to wire generation into an agent
- MCP: how an agent calls a tool it was not born with
- A hands-on build: from an API key to an agent that ships assets
- The problem almost nobody solves: staying on-brand
- Provenance and the law: labelling AI media in 2026
- How these systems break, and how to keep the bill sane
- A weighted comparison of the approaches
- The outlook: agents as creative operators
1. Why media generation is the agent capability of 2026
Start with the structural question, not the surface one. The surface question is "which image model is best?" The structural question is: what changes when an agent can produce, not just describe, a finished asset? The answer is that the agent crosses a line from advisor to operator. An advisor writes you a paragraph about what your ad should look like. An operator generates the ad, the voiceover, the fifteen-second cut, and the landing page, then hands you files. Everything downstream of that line, the org chart of a marketing team, the cost of a first draft, the number of steps between an idea and a shippable artifact, gets rewritten.
This matters because the economics have inverted. For most of software history, generation was the expensive part and coordination was cheap. You paid a designer for the image and a script tied the pieces together for free. In 2026 the ratio flipped: a photoreal image costs about four cents, a competent voiceover a fraction of a cent, and the expensive, scarce input is the judgment about what to make and whether it is right. An agent supplies exactly that judgment at scale, which is why "give the agent hands" is suddenly the leverage point. The model labs win the raw-generation layer, and the value accrues to whoever combines cheap generation with taste, brand, and a workflow that produces a correct deliverable.
The second force is standardization of access. Two years ago, adding image generation to an app meant one SDK; adding video meant another account, another billing relationship, another auth scheme. That friction kept most agents text-only. In 2026 two things dissolved it: OpenAI-compatible REST became the lingua franca of generation endpoints, and the Model Context Protocol gave agents a uniform way to acquire tools at runtime. When the marginal cost of adding a modality drops to near zero, agents acquire all of them, the same way a browser eventually renders every media type rather than just text.
The practical implication for a builder is simple and slightly uncomfortable: if your agent still only writes text, a competitor's agent that also designs, voices, and films is not incrementally better, it is doing a different and larger job. The rest of this guide is about closing that gap without drowning in a dozen SDKs, a dozen bills, and a stack of outputs that look nothing like your brand. We wrote about the deeper version of this argument, that choosing models by hand is a tax on making, in you shouldn't have to pick a model; the same logic applies with more force once an agent is the one making the choices.
2. How the four modalities actually behave
Before any code, internalize how the four modalities differ at the API level, because their runtime shapes are not the same and a design that assumes they are will break. Text and images are effectively synchronous: you send a request and get bytes back in the same call, in seconds. Audio is usually synchronous too, but returns a binary stream rather than JSON, so your client has to handle raw bytes and a hosted-URL header rather than a tidy object. Video is the outlier: it is asynchronous by nature, because a single clip takes minutes to render, so every serious video API is a two-step job-and-poll flow rather than one blocking call - OpenAI's own video guide documents exactly this pattern.
That difference is not cosmetic. It dictates your architecture. A synchronous image call can live inside a request handler; an asynchronous video job cannot, because your handler would time out long before the clip is ready. Video wants a background worker, a job record in your database, and either polling or a webhook. If you wire video the way you wired images, it works in a demo with a five-second clip and then fails the first time a real render takes ninety seconds. Understanding this up front saves the most common rework in the field.
The four modalities also fail differently, which shapes error handling. A text or image call fails fast and cheap: a bad prompt or a rate limit returns immediately, and you retry. A video call can fail expensively and late, after you have waited two minutes and possibly incurred cost, which is why the good video APIs only charge on success and auto-refund failed jobs. Audio sits in between, with the extra wrinkle that music generation carries a legal failure mode the others do not: the risk is not that the track is bad, it is that you cannot lawfully use it, a point we return to in section five.
Here is a mental model to carry through the rest of the guide. Treat text and image as "ask and receive," treat audio as "ask and receive, but handle bytes," and treat video as "submit, wait, and collect." Every API in the following three sections is a variation on those three shapes, and once you have written each shape once, adding a new provider is mostly a matter of swapping a base URL and a model id. This is the reason the aggregator and single-API approaches in section six exist at all: they collapse the shapes so you write them once.
3. The image landscape: models, editing, and real prices
Image generation is the most mature and most competitive of the four modalities, and in 2026 it went through a quiet but important change: the best image models are no longer pure diffusion generators, they are multimodal, reasoning-capable models that generate and edit in the same call. OpenAI's flagship, GPT Image 2, released April 21, 2026, actually "thinks" before it draws and outputs up to 2K resolution - OpenAI. Google's flagship, marketed as Nano Banana Pro but technically Gemini 3 Pro Image, and its faster sibling Gemini 3.1 Flash Image (Nano Banana 2), both reached general availability on May 28, 2026 - Google Workspace blog. The practical upshot is that "image editing" has stopped being a separate product: the same model that generates a picture also does mask inpainting, multi-reference composition, and image-to-image, so you no longer wire a second tool for edits.
Pricing has bifurcated into two clean camps, and knowing which camp a model is in is how you predict a bill. OpenAI and Google now meter images per token, the same way they meter text, so a single image costs a few tenths of a cent to a couple of dozen cents depending on resolution and quality. GPT Image 2 bills image output at $30.00 per 1M tokens, which works out to roughly $0.006 for a low-quality 1024px image and about $0.21 for a high-quality one - OpenAI pricing. Everyone else, the FLUX family, Ideogram, Recraft, Stability, and ByteDance's Seedream, uses flat per-image or per-megapixel pricing, typically between two and ten cents. Google's dedicated Imagen 4 line is the predictable flat-rate workhorse at $0.02 (Fast), $0.04 (Standard), and $0.06 (Ultra) per image - Google.
The specialists still matter, and picking the right one for the job beats defaulting to the biggest general model. Ideogram 4.0, launched June 3, 2026 as a 9.3-billion-parameter model and Ideogram's first open-weight release, is the category leader for accurate text and typography inside an image, the thing general models still fumble - Ideogram. Recraft is the go-to when you need real editable vector (SVG) output and tight brand-style control, priced around $0.035 per raster image and $0.08 per vector - Recraft. Black Forest Labs FLUX.2 is the choice when you need open weights and self-hosting, with the 4-billion-parameter, Apache-2.0 FLUX.2 [klein] runnable on your own hardware and FLUX.2 [pro] served from about $0.03 per megapixel - Black Forest Labs. And ByteDance Seedream 5.0 Pro, launched July 8, 2026, does layer-by-layer editing (it separates a render into 10+ editable PNG layers) at roughly four-and-a-half to nine cents per image - Pandaily.
The chart makes the real decision visible. For most product work, the sane default is a flat-rate model in the three-to-six-cent band (Imagen 4 Standard, FLUX.2, Recraft, Seedream), because the cost is predictable and the quality is excellent. You reach for a reasoning model like GPT Image 2 or Gemini 3 Pro Image when a picture needs to be right about the world, an accurate diagram, legible text, a plausible product shot, and you accept a higher and less predictable per-image cost for it. The trap is defaulting every call to the most expensive high-quality tier out of caution: at scale, that turns a two-cent operation into a twenty-cent one for no visible gain. An agent that picks the cheap tier for drafts and the reasoning tier for finals, the way a careful human would, is doing real cost engineering.
There is also a self-hosting lane that the per-image prices hide, and it matters at volume. Because FLUX.2 [klein] ships under an Apache-2.0 license and FLUX.2 [dev] as open weights, you can run them on your own GPUs and pay only for compute, which flips the math once you are generating images by the million. A per-image API that charges four cents is wonderful at a thousand images and painful at ten million, where a self-hosted open-weight model on rented H100s can be cheaper per image if your utilization stays high. The trade is operational: you now own scaling, cold starts, and safety filtering, so most teams should stay on a hosted API until volume clearly justifies the move. The general rule is that hosted APIs win on low and spiky volume, open weights win on high and steady volume, and the crossover point is worth calculating rather than guessing, because getting it wrong in either direction wastes real money.
One more thing about images specifically: because access churns so fast (GPT Image 2, Gemini 3.x, Ideogram 4.0, Recraft V4.1, and Seedream 5.0 all postdate early 2026), hardcoding a model id is a slow-motion bug. The name you pin today is deprecated within a year, and your agent silently keeps calling a worse or dead model. The durable pattern is to resolve the current model from a live catalog at runtime, which is exactly why the single-API approach in section six reads its model list live rather than shipping a frozen dropdown. GenMagic's live model catalog is one example of that idea made concrete: new image models appear the day they launch, no code change required.
Live prices. The prices above are the providers' own list prices as of early September 2026. What the cheapest image models cost through one API right now, read from GenMagic's live catalog every time this page refreshes:
| Model | Per image | Edits an image |
|---|---|---|
| MiniMax: MiniMax H3 Image | $0.0074 | yes |
| Recraft: Recraft V4.1 Flash | $0.011 | no |
| Black Forest Labs: FLUX 3 Image Klein | $0.014 | yes |
| MiniMax: MiniMax H3 Image Highspeed | $0.015 | yes |
| OpenAI: GPT Image 2.5 Sunburst | $0.015 | yes |
| Meta: Muse Image | $0.015 | yes |
Live: the 6 cheapest image models on GenMagic, checked Nov 11, 2026. Every model is on image API pricing.
4. The video landscape: asynchronous, expensive, improving fast
Video is where the money is and where the mistakes are. Every serious 2026 video API shares the same shape, and it is the "submit, wait, collect" shape from section two: you POST a prompt, get back a job id, and poll (or receive a webhook) until a URL appears, because a single render takes minutes. Cost is billed per second of output, which means clips add up fast and a naive agent can spend real money in a single turn. Concretely, an eight-second 1080p clip from Google's flagship Veo 3.1 Standard is about $3.20, and a twenty-second 1080p clip from the (now deprecated) Sora 2 Pro tier was about $14 - Google pricing. Compared to a four-cent image, video is three orders of magnitude more expensive, so the guardrails matter more here than anywhere else.
The current leaders are Google Veo 3.1 and Runway Gen-4.5. Veo 3.1 generates clips with synchronized audio included by default at 720p through 4K, and is the only Veo family shown on the official Gemini API pricing page, at $0.40 per second (720p and 1080p) and $0.60 per second (4K) for the Standard tier, dropping to $0.10 per second for the Fast tier at 720p - Google. Runway Gen-4.5 is Runway's current flagship and bills through credits at $0.12 per second, with failed jobs automatically refunded - Runway. Both follow the async job model precisely, and Runway additionally supports webhooks so your worker does not have to poll.
The most important 2026 fact for a builder is a cautionary one: do not build new integrations on OpenAI's Sora 2. OpenAI notified developers on March 24, 2026 that the Videos API and all Sora 2 aliases will be removed from the API on September 24, 2026, with no recommended replacement - OpenAI deprecations. It is still callable as this guide is published, which is precisely the trap: a model that works in your test today is scheduled to vanish in weeks. This is the single clearest argument in the whole guide for not hardcoding a provider, and for putting a live catalog or an aggregator between your agent and any one lab, because the lab can retire the endpoint from under you and your agent should route around it, not break.
The challengers compete hard on price and increasingly ship native synced audio as standard. Kuaishou's Kling 3.0, launched February 4, 2026, does native 4K and multi-shot sequences up to fifteen seconds, priced around $0.168 per second at 1080p with audio - Kling. MiniMax H3 (Hailuo 3), released July 31, 2026, moved to per-second billing at $0.13 per second at 2K and positions itself as an aggressive price leader - OpenRouter. Luma Ray3.2 adds native HDR and 16-bit export through its Agents API - Luma, and Pika 2.5 targets short cinematic social clips at roughly $0.12 per second, best reached through fal.ai - eesel. Most of these are reachable both from their own APIs and from the aggregators in section six.
Read the chart with the resolution caveat in mind, because 4K roughly doubles these numbers. The 1080p-versus-4K gap is worth a second look, because it is where video budgets quietly blow up: the same model at 4K can cost fifty to sixty percent more per second, and per-second costs compound with clip length, so a "quick 4K promo" is an order of magnitude more expensive than a 720p draft of the same idea.
The practical guidance for an agent is to treat video as a deliberate, gated action, never a reflex. Draft at low resolution and short duration, get human or self-review sign-off, then render the final at the target resolution once. Because the good APIs only charge on successful completion and refund failures, the failure risk is bounded, but the success cost is not, and that is the one an agent must respect. We will wire the async flow with a real poll loop in section eight.
Architecturally, the async nature forces a specific shape that is worth getting right once. A video request should create a durable job record in your database with the provider's job id, then a background worker either polls on an interval or, better, receives a webhook when the render completes, updating the record and notifying the agent. Runway, for instance, supports webhooks so your worker never has to poll at all. The anti-pattern is starting a video job inside a synchronous request handler and blocking on the result: the handler times out, the user sees an error, and the clip you paid for renders into the void. Model video as submit, persist, and reconcile, and it scales cleanly; model it as a blocking call, and it fails the first time a real render takes ninety seconds.
Live prices. The per-second prices above were read from the providers' pages in early September 2026. The cheapest text-to-video models per second right now, from GenMagic's live catalog:
| Model | Per second | A typical clip |
|---|---|---|
| TBC: mischief 1 | $0.0075 | $0.037 (5 s at 480p) |
| HeyGen: HeyGen Video | $0.015 | $0.075 (5 s at 480p) |
| ByteDance: Seedance 1.5 Pro | $0.017 | $0.17 (5 s at 480p) |
| SpaceXAI: Grok Imagine Video 1.5 Lite | $0.03 | $0.15 (5 s at 480p) |
| Google: Gemini Omni 1.2 Flash | $0.035 | $0.17 (5 s at 360p) |
| Google: Veo 3.1 Lite | $0.045 | $0.30 (4 s at 720p) |
Live: the 6 cheapest text-to-video models per second on GenMagic, checked Nov 11, 2026. Every model is on video API pricing.
5. The audio landscape: speech is a commodity, music is a minefield
Audio is really two markets with opposite developer stories, and conflating them is a common planning error. Text-to-speech is a crowded, API-first commodity. OpenAI, ElevenLabs, Google, Cartesia, Deepgram, and Hume all ship self-serve TTS APIs, prices have compressed to roughly three to ten cents per thousand characters, and the quality at the top is genuinely excellent. Music generation is the opposite: the two consumer leaders are effectively closed to developers, and the binding constraint is not model quality but copyright and licensing. Treat these as two separate procurement decisions with two separate risk profiles.
On the speech side, the choices are abundant and it comes down to latency, expressiveness, and pricing model. ElevenLabs remains the widely-acknowledged voice-quality leader, with its Eleven v3 flagship at $0.10 per 1,000 characters and lower-latency Flash and Turbo variants at $0.05 - ElevenLabs. OpenAI moved its newest voices to token pricing: gpt-4o-mini-tts costs about $0.015 per minute of audio and is steerable, meaning you can instruct tone and delivery in natural language - OpenAI. For real-time voice agents where latency dominates, Cartesia Sonic 3.6 (released August 27, 2026) and Deepgram Aura-2 at $0.030 per 1,000 characters are built for the job - Deepgram. Google offers both a token-priced Gemini TTS and per-character Chirp 3 HD voices at $30 per 1M characters - Google.
The speech chart shows a market that has commoditized on price but not on quality or latency, which is where your decision should actually live. If you need the most natural, expressive voice for a brand narration, ElevenLabs earns its premium. If you are building a two-way voice agent where every hundred milliseconds is felt, Cartesia or Deepgram win on latency even at similar prices. And if you already call OpenAI for text, gpt-4o-mini-tts is the least-friction add because it rides the same key and SDK. None of these are wrong; the point is that "pick a TTS" is a real decision with three different right answers depending on the job.
One fork on the speech side is worth calling out because it is an architecture decision, not just a pricing one: one-shot narration is a different product from two-way conversation. Turning a script into an audio file is the simple audio/speech call, request text, receive bytes. A live, interruptible voice agent that listens and talks back is a speech-to-speech model like OpenAI's gpt-audio-1.5, billed on audio input and output tokens rather than characters, and wired as a realtime stream rather than a file download. If your agent narrates, use plain TTS; if it converses, you are building a realtime voice loop, which is a materially larger piece of engineering with its own latency and turn-taking concerns. Reaching for the realtime model to do a job the one-shot model does more cheaply, or bolting turn-taking onto a file-based TTS call, are the two mirror-image mistakes here.
Music is where builders get surprised, and the surprise is legal, not technical. Suno, on model v5.5, is the consumer quality leader but has no public self-serve developer API; it announced only an exploratory, partner-only intake in July 2026 with no console or timeline - Music Business Worldwide. Udio settled the Universal and Warner lawsuits and is pivoting to a licensed walled garden where generations reportedly cannot be downloaded or exported off-site - Music Business Worldwide. That leaves a short list of music generators you can actually call and lawfully ship: ElevenLabs Music at about $0.15 per minute - ElevenLabs, and Stability's Stable Audio 2.5/3.0 at roughly $0.20 to $0.26 per generation - Stability. MiniMax, meanwhile, closed its paid music API to new users in August 2026, a reminder that even the available options are in flux.
The practical rule for an agent that generates music is to prefer providers that pair a real API with explicit commercial-use licensing, and to record where every track came from. For narration and voice, you have a rich menu and the main risk is spending; for music, the menu is short and the main risk is legal, so the safe default is to use a licensable-by-design generator and to keep provenance on every file, which dovetails exactly with the provenance obligations in section ten.
6. Three ways to wire generation into an agent
There are exactly three architectures for giving an agent the ability to generate media, and choosing among them is the most consequential decision in this guide. You can go direct to each lab's native API, you can go through an aggregator gateway that fronts many models behind one key, or you can expose generation to the agent as MCP tools it calls itself. These are not mutually exclusive (an MCP server usually sits on top of an aggregator), but they represent genuinely different trade-offs in integration cost, flexibility, and control.
The direct-to-lab approach is the right call when you have exactly one modality, a strong opinion about one specific model, and a need for that model's deepest, newest features the day they ship. Going straight to OpenAI or Google means you get every parameter, every new capability, and no middle layer taking a cut or lagging behind. The cost is that it does not compose: to cover all four modalities you integrate two or three labs, hold two or three keys, reconcile two or three bills, and re-implement the "submit, wait, collect" video flow against each one's slightly different job API. It is the deepest and the least scalable, and it is where the model-deprecation risk bites hardest, as the Sora 2 shutdown showed.
The aggregator gateway approach fixes the composition problem by putting one API and one bill in front of many models. This is now the default for most builders, and five platforms dominate. OpenRouter proxies 300+ models across text, image, video, and audio behind a single OpenAI-compatible key with passthrough pricing - OpenRouter. fal.ai is a serverless media cloud offering a marketed 1,000+ image, video, and audio models, pay-per-use - fal.ai. Replicate runs almost any model, billing mostly per second of GPU compute (an H100 is about $0.001525 per second), and was acquired by Cloudflare in a deal announced in November 2025 - Replicate. Together AI and Fireworks AI specialize in fast, cheap open-weight hosting, with Together serving FLUX.2 [pro] at $0.03 per image - Together. The trade-off is that a gateway abstracts away some model-specific knobs and adds a dependency, but for an agent that needs breadth without a dozen integrations, that is usually the right trade.
The aggregators also bill differently, and the difference decides which one fits an agent. Replicate charges most models per second of GPU compute, so a fast model on a cheap GPU can undercut a per-image API, but a slow cold start can surprise you and you are effectively renting hardware by the second. Fireworks charges image generation per diffusion step (FLUX.1 [schnell] at about $0.00035 per step, roughly a tenth of a cent per image), which rewards models that need fewer steps - Fireworks. OpenRouter and Together bill closer to a flat per-output rate, which is the most predictable. For an autonomous agent, predictability usually beats theoretical minimum cost, because a per-second or per-step bill is hard to forecast and easy to blow through in a loop, so a flat per-output gateway is the safer default unless you have measured your workload and know the compute math is in your favor.
The MCP approach is different in kind, and it deserves its own section, because it does not just simplify your integration, it changes who is doing the calling. With MCP, you do not write code that calls a generation API; you point the agent at a server, and the agent decides when and how to generate, calling the tools itself as part of its reasoning. That is a qualitatively more autonomous pattern, and it is the one most aligned with where agent frameworks are heading. It is also, in practice, usually layered on top of an aggregator, so you get the breadth of a gateway with the autonomy of tool-calling. The next section is about how it actually works.
A note on where a single unified API fits, because it blurs the line between "aggregator" and "MCP." A few platforms now offer one OpenAI-compatible API and an MCP server over the same balance, across all four modalities, with brand steering built in. GenMagic is built this way: the same key drives an OpenAI-compatible REST API for text, image, speech, music, and video, and a remote MCP server, so an agent can either call the REST endpoints server-side or use the MCP tools directly, and either way it draws on one prepaid balance. That combination, one bill, all modalities, both an API and an MCP server, is the shape this guide keeps arriving at, and it is worth understanding why in the sections that follow.
7. MCP: how an agent calls a tool it was not born with
The Model Context Protocol is the most important piece of agent infrastructure to understand in 2026, and it is genuinely simple once you see it. Introduced by Anthropic in November 2024 and now stewarded by an open-source community with backing from OpenAI, Google DeepMind, and Microsoft, MCP is best described in its own docs as "a USB-C port for AI" - modelcontextprotocol.io. It is a standard way for an AI application to acquire tools, data, and workflows at runtime. Before MCP, every agent framework invented its own tool-plugin format; after MCP, a single server runs unchanged across Claude, Cursor, VS Code, and the rest.
Mechanically, an MCP server exposes a set of tools, and an MCP client (the agent runtime) connects to it and can then call those tools. There are two transports, and the distinction matters for media generation. stdio runs the server as a local subprocess on the same machine, which is how most desktop MCP servers work. Streamable HTTP runs the server remotely over HTTP, which is what you want for a hosted generation service, because the heavy lifting happens on the provider's infrastructure, not the user's laptop. The latest spec revision is dated July 28, 2026 and formalizes Streamable HTTP as the remote transport, deprecating the older SSE approach - MCP spec.
The 2026 ecosystem around MCP is large and worth calibrating on. The official registry launched in preview on September 8, 2025 and showed 9,652 servers by May 2026 - State of MCP Registries; the community directory PulseMCP lists 21,979 servers, updated daily - PulseMCP; and the canonical GitHub list, punkpeye/awesome-mcp-servers, has crossed 93,000 stars - GitHub. On the client side, Claude Desktop and Claude Code have first-class support, Cursor, Windsurf, and VS Code (via GitHub Copilot) have strong native support, and ChatGPT, Zed, Cline, and others support it behind a toggle - MCP clients overview. If you ship an MCP server, it is reachable from all of them.
Here is the fact that reframes the whole modality for a builder: almost all of those tens of thousands of MCP servers are data and API connectors, not generators. Media-generation MCP servers exist but are comparatively rare (a directory search turns up on the order of a hundred image-generation servers against nearly 22,000 total), and the ones that do exist are mostly thin community wrappers around a hosted provider (Replicate, fal, and others) that usually require you to bring your own provider key - replicate-flux-mcp. This is a real gap. If you want an agent to generate across all four modalities through MCP, on one balance, without stitching together three single-model wrappers and three provider keys, you are looking for something that barely exists as a category. GenMagic is one of the few remote, streamable-HTTP MCP servers built specifically for cross-modal generation: point any MCP client at its endpoint with one key and the agent gets seven tools: list_models, which reads the live catalog with each model's price and costs nothing, and generate_text, generate_image, generate_speech, generate_music, create_video and get_video, each billed from the same balance. We will connect it in the next section.
8. A hands-on build: from an API key to an agent that ships assets
Enough landscape. This section is a working build. We will use GenMagic's OpenAI-compatible API and MCP server as the worked example, because it is the one surface that exercises all four modalities and both integration styles from one key, but the shapes here are the same ones you would write against any provider, and the OpenAI-compatible parts work with any OpenAI SDK pointed at a different base URL. Get an API key from your account settings; a key looks like gm_live_... and every call authenticates with a standard bearer header.
Step one: the first generation call. Because the API is OpenAI-compatible, you point the official OpenAI SDK at the base URL and drop in your key. Nothing else changes. This is the "ask and receive" shape from section two, and it is the whole of a text generation.
from openai import OpenAI
client = OpenAI(
base_url="https://genmagic.co/api/v1",
api_key="YOUR_GENMAGIC_API_KEY",
)
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages= [{"role": "user", "content": "Draft a launch tweet for a cold brew brand called Northwind."}],
)
print(resp.choices [0].message.content)
Step two: generate an image. The image call uses OpenAI's image shape, so client.images.generate(...) works unchanged; you choose a model from the live catalog or omit it for a sensible default. This is still the synchronous "ask and receive" shape, and the response carries a hosted URL you can hand straight to the agent.
img = client.images.generate(
model="google/gemini-3.1-flash-image",
prompt="A cobalt prism refracting into a spectrum, dark studio, 3D render",
size="1024x1024",
)
print(img.data [0].url)
Step three: the asynchronous video flow. Video is the "submit, wait, collect" shape, and this is the code that most builders get wrong by treating it synchronously. You start a job, then poll until it is completed or failed. Nothing is charged until the clip completes, and a finished job is billed once no matter how many times you poll it, so the poll loop is safe to run.
import time, requests
base = "https://genmagic.co/api/v1"
headers = {"Authorization": "Bearer YOUR_GENMAGIC_API_KEY"}
job = requests.post(f"{base}/videos", headers=headers, json={
"prompt": "a paper boat sailing down a rain gutter, cinematic, slow motion",
"aspect_ratio": "16:9",
}).json()
while True:
s = requests.get(f"{base}/videos/{job ['id']}", headers=headers).json()
if s ["status"] in ("completed", "failed"):
break
time.sleep(3)
print(s.get("url") or s.get("error"))
Step four: connect it to an agent over MCP. This is the step that turns the four calls above into an autonomous capability. Instead of your code calling the API, you point an MCP client at the server and the agent calls the tools itself. Most clients take a small config block with the URL and an Authorization header, and the same block works across Claude Desktop, Cursor, and the rest.
{
"mcpServers": {
"genmagic": {
"url": "https://genmagic.co/api/mcp",
"headers": { "Authorization": "Bearer YOUR_GENMAGIC_API_KEY" }
}
}
}
Under the hood the MCP server is plain JSON-RPC, so if you are building your own agent runtime rather than using an off-the-shelf client, you call it directly. Listing the tools is a single request, and calling one is the same request with a tools/call method. This is the exact wire format an agent runtime speaks on your behalf.
curl https://genmagic.co/api/mcp \
-H "Authorization: Bearer YOUR_GENMAGIC_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "generate_image",
"arguments": { "prompt": "a cobalt prism on black, 3D render", "size": "1024x1024" }
}
}'
Step five: let the agent budget itself. The detail that separates a toy from a production agent is that every result self-describes its spend. A JSON-RPC body has no HTTP headers, so each MCP tool result carries its metering in the standard _meta field: cost_cents (what the call cost), credits_remaining (the balance after it), and a rate object. On the REST side the same information rides response headers like X-Cost-Cents and X-Credits-Remaining, and a GET /usage call (which spends nothing) returns the authoritative balance. An agent that reads these can pace itself, check its budget before an expensive video render, and stop before it overspends, which is the difference between an agent you can leave running and one you have to babysit. This is the practical payoff of the earlier point about video being a gated action: the agent has the numbers to gate it with.
To make this concrete, picture the agent building a product launch kit for the Northwind cold brew brand from a single instruction. It plans four assets and generates each through the matching tool: a launch tweet (a text call, a fraction of a cent), a logo (an image call with type: logo, a few cents), an eight-second teaser (a video job it drafts at 720p first, a few tens of cents, then renders once at 1080p after self-review, a few dollars), and a short voiceover (a speech call, well under a cent). The whole kit costs a few dollars and lands in minutes, and because each result reports its own cost_cents, the agent can recognize mid-task that the video is the expensive step and gate it behind a balance check. That is the thesis of this guide in a single turn: an agent that plans a deliverable, generates every piece of it across modalities, and stays inside a budget it can actually see.
With those five steps you have an agent that can write, design, voice, score, and film, all from one key and one balance, and that knows what each action costs. What it does not yet have is any guarantee that what it produces looks like your brand, and that is the problem the next section is about.
9. The problem almost nobody solves: staying on-brand
Here is the gap that the entire preceding landscape leaves open, and it is the one that actually determines whether an agent's output is usable. Every model in sections three through five is trained to produce generic output: a "professional logo" comes out in someone's idea of a professional palette, which is almost never yours. A voiceover picks a default cadence. A landing page defaults to the model's favorite blue. When a human makes one asset, they fix this by hand. When an agent makes a hundred, the drift is unmanaged, and you get a hundred slightly-off-brand artifacts that all need correcting, which destroys the entire efficiency argument for using an agent in the first place.
The drift is easy to underestimate until you measure it. Ask three different image models for "a minimal logo for a fintech called Northwind" and you get three different blues, three different geometric styles, and three different type treatments, none of them yours, because each model is averaging over its training data toward a generic notion of "fintech." Now multiply that across an agent generating a logo, three social cards, a hero image, and a video thumbnail in a single run: without a shared brand constraint, every asset lands in a slightly different visual world, and someone has to pull them back into line one by one. The cost of that reconciliation is invisible in a demo of one asset and dominant in production, which is exactly why brand consistency is a systems problem, not a prompting tip. You cannot prompt your way out of it reliably, because the next generation forgets the last one; the constraint has to live outside the individual call.
The market has responded, but in two shapes that both fall short of what an agent needs. The first shape is closed creative SaaS with a brand layer: Canva's Magic Studio stores a Brand Kit and trains a Brand Voice on samples of your writing - Canva, and Typeface turns brand guidelines into "brand intelligence" driving marketing agents, reaching a roughly $1B valuation on the strength of it - Typeface. These are genuinely good, but they are products a marketer uses in a UI, not a per-call API an agent can drive across arbitrary modalities. The second shape is single-modality developer APIs with real brand controls: Adobe's Firefly Services can train Custom Models on your assets - Adobe, and Recraft enforces exact color palettes on images and vectors - Recraft. Also genuinely good, but each is scoped to one media type.
Reason about the gap from first principles and it is stark: no provider today offers one API that enforces the same brand definition, palette, typography, voice, characters, across every modality at generation time. Brand control is either locked inside a closed UI or scoped to a single media type. So an agent that generates an image, a video, a voiceover, and a landing page for the same campaign has no single place to say "and make all of it look and sound like this brand." It has to apply brand rules four different ways through four different tools, if the tools support it at all, and reconcile the results by hand. That is the connective-tissue problem that only a full-modality studio can solve, and it is precisely why "everything comes out on-brand" is a different and larger promise than "access to every model."
This is the wedge GenMagic is built on, and it is worth being concrete about the mechanism rather than the slogan. A persistent brand definition (palette, typography, voice, reference imagery, do and do-not rules) constrains every generation the API and MCP server produce, whether the agent asks for text, an SVG logo, a full web page, a voiceover's mood, or a video's aesthetic. More usefully for an autonomous agent, visual generations come back with a brand-fit read-back: a brand_fit label of on_brand, wrong_palette, or monochrome, plus a presence fraction, delivered in the same MCP _meta or REST X-Brand-Fit header as the cost. That means an agent can detect an off-brand result and regenerate it with no human in the loop, closing the loop that every other approach leaves open. We introduced the broader idea, one place for every model in every medium, in Introducing GenMagic; the brand layer is what turns that from a convenience into a moat.
The honest caveat, because this guide is not a brochure: a brand-fit read-back is a best-effort heuristic, not a guarantee, and it is present only for outputs that can be measured against a color (a logo, a branded SVG or page), not for prose or a format the system cannot decode. It will not catch every subtle off-brand result, and it is not a substitute for a designer's eye on your hero assets. But for the long tail of an agent's hundred routine artifacts, an automatic "this came out in the wrong palette, regenerate" is exactly the control that keeps agent-scale output usable, and no amount of prompt engineering against a generic model provides it.
10. Provenance and the law: labelling AI media in 2026
If your agent generates media that reaches the public, provenance stopped being optional in 2026, and this is the section most builders skip and later regret. Two major jurisdictions now legally require machine-readable disclosure of AI-generated content, and, not by accident, they require it on the same date. The EU AI Act's Article 50 transparency obligations apply from 2 August 2026, requiring providers of generative AI to mark synthetic audio, image, video, and text in a machine-readable format detectable as AI-generated - European Commission. Non-compliance can draw fines of up to the greater of EUR 15 million or 3% of worldwide annual turnover - Paul Weiss.
California matches it, and there is a naming trap worth flagging because it is widely gotten wrong. The relevant law is the AI Transparency Act, SB 942, as amended and delayed by AB 853, which pushed its operative date to 2 August 2026 specifically to align with the EU - A&O Shearman. (California AB 942 is an unrelated electricity bill; if you see it cited as the AI law, the source is wrong.) SB 942 requires covered generative-AI providers, those with over one million monthly users in California, to embed a latent disclosure carrying the provider name, system name and version, a creation timestamp, and a unique identifier, and to offer a free public detection tool - California Legislature.
The technical mechanism regulators point to is C2PA, whose consumer-facing brand is Content Credentials: cryptographically signed provenance manifests attached to a media file that record its origin, the model that made it, and its edit history. C2PA is a royalty-free open standard under the Linux Foundation, and its steering committee includes Adobe, Google, Microsoft, OpenAI, Sony, and the BBC, with the current spec at v2.4 as of April 2026 - Content Credentials. Because it is an open standard with reference implementations (a Rust library, a CLI, a JS SDK), a generator can sign manifests at creation time and any verifier can read them. This is the concrete thing "compliance" means for a media-generation pipeline: emit C2PA manifests and machine-readable marks on your output by default.
The implication for an agent builder is direct: if your agent publishes AI-generated media to users in the EU or California, provenance is now a legal requirement, not a nice-to-have, and retrofitting it after launch is far harder than choosing a generation layer that emits it from the start. This is another quiet argument for a managed generation layer over a raw model call, because a good one signs provenance for you. GenMagic, for instance, embeds content-provenance metadata on the images and SVGs it generates as a matter of course, so an agent building on it inherits that compliance rather than having to bolt on a signing step. Whatever you build on, verify against the live legal sources before you ship, because the dates and thresholds in this section are exactly the kind of external fact that changes, and both landmark dates are, as of this writing, days away.
11. How these systems break, and how to keep the bill sane
A guide that only shows the happy path is a guide that gets you paged at 2am. Media-generation pipelines fail in specific, recurring ways, and an agent that generates autonomously will find every one of them faster than a human would. The first and most expensive failure mode is runaway spend, and it is unique to the async, per-second modalities. An agent in a loop that generates a 4K video on each iteration can spend tens of dollars in a minute, because, as section four showed, video is three orders of magnitude more expensive than an image. The fix is not a prayer, it is a budget the agent can read: check the remaining balance before an expensive action, gate video behind an explicit approval or a hard per-turn cost cap, and draft cheap before rendering expensive. The metering-in-every-result pattern from section eight exists precisely so the agent has the number to enforce this. A budget caps the damage; the other half of keeping the bill down is sending each request to the cheapest model that can handle it, and Founden.ai, which shares its founder with GenMagic, lays that out in a playbook for routing agent requests by cost.
The second failure mode is model deprecation, which the Sora 2 shutdown made vivid. A hardcoded model id is a time bomb: it works until the lab retires the endpoint, then your agent silently calls a dead model and every generation fails, or worse, quietly degrades to a fallback you did not choose. The structural fix is to never pin a model name in code that you cannot change quickly, and to prefer a layer that reads its catalog live, so a retired model simply drops out of the list and a current one takes its place. This is the same discipline that keeps an agent on the current best model rather than last season's, and it is the entire reason a live catalog beats a frozen dropdown.
The remaining failure modes are more ordinary but still bite. Rate limits are per-key and real (GenMagic, for example, allows 300 requests per minute per key and returns a standard 429 with a Retry-After header when you exceed it - GenMagic API docs); an agent must honor Retry-After and back off rather than hammer. Content moderation rejects some prompts, and a robust agent treats a moderation refusal as a terminal, non-retryable outcome, not a transient error to retry into the same wall. Latency variance on video and the occasional failed render mean your poll loop needs a timeout and a failure branch, not just a success branch. And the OpenAI error envelope has become a de facto standard (a 402 for insufficient balance, 401 for a bad key, 429 for rate limits, 5xx for transient provider issues), so building your error handling to that shape means it works across every OpenAI-compatible provider without change.
One subtle failure mode deserves a specific guard: double-charging on the async video flow. Because a video job is submitted once and polled many times, a retry that re-submits the job (rather than re-polling the existing one) can start, and pay for, a second render. The fix is to treat the job id as an idempotency key: persist it the moment you receive it, and on any retry poll the stored id instead of POSTing a fresh job. The well-designed video APIs bill a completed job exactly once no matter how many times you poll it, so the danger is never the polling, it is an over-eager retry that quietly creates a duplicate. Make the submit step idempotent and the poll step safe, and the most expensive modality becomes the one you worry about least.
The meta-lesson across all of these is that an autonomous generator needs guardrails a human operator provides implicitly. A person does not accidentally render a thousand 4K clips, notices when a model is deprecated, and reads an error message before retrying. An agent does none of that unless you build it in. The good news is that the same properties that make a generation layer pleasant, one balance, live catalog, metering in every response, a standard error envelope, are exactly the properties that make these guardrails cheap to build, which is why the architecture choice in section six is really a guardrail choice in disguise.
12. A weighted comparison of the approaches
Having walked the landscape, here is the consolidated judgment in one table. The scoring weights reflect a specific job: giving an agent the ability to generate across all four modalities, on-brand, behind one key and one bill, with as little integration and operational burden as possible. If your job is different, the weights should be too, and the notes call out exactly where a different need flips the ranking. Each cell carries its score and the real fact behind it, and the table is sorted by final score.
| # | Approach | Modalities (25%) | Agent-ready: OpenAI-compat + MCP + one key (25%) | Billing simplicity (20%) | Brand/output control (15%) | Model breadth (15%) | Final |
|---|---|---|---|---|---|---|---|
| 1 | GenMagic | 10 - text, image, SVG, website, speech, music, video | 10 - OpenAI-compatible REST + remote MCP server + one key | 10 - one prepaid USD balance, metering in every response | 9 - brand steering across modalities + brand-fit read-back; not custom-trained models | 7 - 461 models in one live catalog, not 1,000+ | 9.4 |
| 2 | OpenRouter | 9 - text, image, video, audio | 7 - OpenAI-compatible key; MCP only via community wrappers | 10 - one key, one passthrough bill | 2 - no brand layer | 9 - 300+ models | 7.65 |
| 3 | fal.ai | 8 - image, video, audio; little text | 6 - own REST/queue API, per-model endpoints | 8 - prepaid credits, one account | 3 - model-level controls only | 10 - 1,000+ models | 7.05 |
| 4 | Replicate | 8 - image, video, audio, LLMs | 6 - uniform REST, not OpenAI chat shape | 8 - per-second compute, one account | 3 - model-level controls only | 9 - run almost any model | 6.9 |
| 5 | Together / Fireworks | 6 - mostly image + text | 8 - OpenAI-compatible REST | 8 - one consumption bill | 2 - no brand layer | 6 - open-weight focus | 6.3 |
| 6 | Typeface | 6 - text + image marketing | 4 - enterprise platform, MCP-connected, not raw per-call | 3 - enterprise contract | 10 - best brand governance | 4 - curated set | 5.2 |
| 7 | Direct to each lab | 7 - all four, but 2-3 integrations | 6 - great SDKs, multiple keys/accounts | 2 - a bill per lab | 5 - per-lab custom models | 5 - only that lab's models | 5.15 |
Read this table as a map of trade-offs, not a verdict, because the honest story is in where each approach wins. Aggregators (OpenRouter, fal, Replicate) win decisively on raw model breadth, and if your single most important requirement is "I must be able to call literally any model that exists, including the newest niche one," a gateway is your answer and it beats everything else on that axis. Typeface wins on brand governance and is the right choice for a large marketing organization that wants a managed platform with approval workflows, not a raw API. Going direct to a lab wins when you need one model's deepest features the day they ship and you only care about one modality. None of those are wrong answers; they are answers to different questions.
Where the unified-API approach wins, and why it tops this particular weighting, is the exact job the weights describe: an autonomous agent that needs all four modalities, on-brand, behind one key, with metering it can read. That is a narrow and demanding combination, and it is precisely the combination the rest of the market leaves unaddressed, aggregators have no brand layer, brand SaaS has no open API across modalities, and direct integration has neither one key nor one bill. GenMagic scores highest here because it is built for that specific shape, not because it is universally superior; on breadth it genuinely trails the aggregators, and it is not the enterprise-governance product Typeface is. Pick the row whose winning axis matches your actual constraint. If that constraint is "one agent, every medium, on-brand, one bill," the ranking is real; if it is something else, recompute the weights and trust your own numbers over ours.
13. The outlook: agents as creative operators
Zoom out, and the direction is clear even if the specific models keep churning. The trajectory of 2024 to 2026 was text agents becoming multimodal operators, and the trajectory of 2026 to 2028 is those operators becoming accountable ones: agents that not only generate an image, a video, and a voiceover for a campaign, but keep them coherent with a brand, sign them with verifiable provenance, and stay within a budget they monitor themselves. Each of those, coherence, provenance, budget, is a control that a human used to supply implicitly and that now has to be encoded, and the platforms that encode them well are the ones agent builders will standardize on.
The models themselves will keep commoditizing, which is the most reliable prediction in the field. Image generation already fell to a few cents; video will follow as inference costs drop and the Chinese and challenger labs keep undercutting the leaders, exactly as the per-second prices in section four are already trending. When the raw generation is nearly free and nearly interchangeable, the durable value moves up a layer, to the connective tissue: routing to the current best model automatically, keeping every output on-brand, handling the async and provenance and billing plumbing, and exposing all of it to an agent through one clean surface. This is the same lesson every prior platform shift taught, the value migrated from the scarce input to the layer that combined it with judgment, and there is no structural reason generation is different.
It is worth naming who is building at this layer, because it is a small and specific group. The people betting on agents-as-operators tend to be the ones building autonomous systems end to end. Yuma Heymans (@yumahey), who founded GenMagic and also runs o-mega.ai, a platform where AI agents build and operate entire companies from a single description, is one of them; his work on autonomous, self-operating products is the same wager this guide describes, that the leverage is in giving agents real hands and the guardrails to use them well. You do not have to build at that frontier to benefit from it. The practical move for most builders is more modest and available today: give your agent the four modalities behind one key, put a live catalog and a readable budget between it and any one model, keep the output on-brand, and sign it. Do that, and your agent stops describing work and starts shipping it.
Conclusion: a decision framework
If you take one thing from this guide, take the decision procedure, not the model names, because the names will change and the procedure will not. Start from the job, not the model. Name the modalities you actually need, the integration and operational burden you can carry, and the single constraint that matters most, breadth, brand, depth, or simplicity, and let that constraint choose the architecture from section six. Only then pick models, and pick them from a live catalog rather than pinning a name that will rot.
For most agent builders in 2026, the honest recommendation is a unified, OpenAI-compatible layer with an MCP server, one balance, a live model catalog, brand steering, and provenance built in, because it collapses four integrations into one, gives the agent metering it can budget against, and closes the on-brand gap that otherwise makes agent-scale output unusable. Reach past it to a raw aggregator when you need maximum model breadth, to a brand SaaS when you need enterprise governance in a UI, or to a lab directly when you need one model's deepest features. Those are real exceptions with real justifications, not defaults.
The larger point is that giving an agent the power to make things is no longer the hard part; the models are cheap, capable, and a REST call away. The hard part is giving it that power responsibly: on-brand, within budget, with provenance, and without a dozen brittle integrations that break the day a lab deprecates a model. Get that right and you have not just added a feature, you have changed what your agent is. If you want to see the unified approach in practice, the API and MCP docs are the fastest way in, and the live model catalog shows what is current today. Say the words, and let the agent make it.
This guide reflects the AI media-generation landscape as of September 2026. Models, pricing, and the compliance dates in section ten change frequently, verify current details against the linked sources before building on them.