"Type in a keyword, get an ad video out the other end." That is the pitch behind every AI creative tool right now, and it is also the easiest place to fool yourself.
Actually run one and you find a pile of questions sitting under the word "automatic" that nobody answered for you. The keyword is obscure, organic search turns up nothing, and the commercial library has nothing either. Should the pipeline stop and report "no evidence," or push an empty brief into generating a video no one has validated? Halfway through, one channel falls outside what your account can reach and the data won't come back. Is that "no result," or "never asked"? The two situations call for opposite responses, and most one-click tools hand you the same spinning loader for both.
A creative pipeline you can actually operate, rather than demo, earns its keep not from the "generate" button at the end but from being honest at every stage about what state it is in. That honesty is what decides whether the thing can be run in production, and whether you can spot where it broke the one time nothing came out.
First, the boundary. The research stages of this pipeline pull from each platform's public ad library and creative center, logged in with your own account, looking at data the platform publishes to every advertiser. No signatures, nothing bypassed. This piece is about organizing that public data into decisions and assets you can ship, not about how to obtain it.
Five stages: you need the skeleton before you talk about automation
Turning a keyword into an ad video runs through five ordered stages. They aren't loose "steps." Each one eats the previous stage's output and feeds the next:
Demand discovery. Take the market search term, search organic content, and see whether the topic has any real heat with actual users. It produces an organic-content signal.
Commercial validation. Run two commercial signals. One is keyword opportunity (search volume, competition, the spend-side data). The other is the Top Ads that are performing well in the creative center. Both have had money spent on them and been validated by the market, which makes them a different thing from organic content.
Creator matching. Find creators in the influencer library who fit this topic and this market.
Creative brief. Merge the qualified evidence from the three stages above into a structured spec you can feed straight to a generation model. The narrative structure, the hook shape, and the target market are all pinned down here.
Generation. Hand the brief to a video generation model and produce a 9:16 vertical native ad.
The weight is all on the fourth step. The first three stages are gathering evidence, the fifth is spending money, and the brief is the one place where evidence goes in and a decision comes out. Gather sloppily in the first three and the brief makes its decision on noise, generating a video built on noise. You can't see that in the loader. You can only see it when you lay each stage's status out in the open.
Each of the first three stages is worth its own writeup. How to read a second-by-second retention curve, how to turn keyword opportunity into a single budget number, and how to cross the influencer library against the asset library instead of picking people by follower count are the subjects of three other pieces. This one is about the extra questions that show up only once you string them into a line.
Six stage statuses: why "failed" has to split into four
This is the most important section in the piece.
Most pipelines give each stage two outcomes: success or failure. That holds for one or two stages. By five it collapses, because "failed" mashes four situations that need completely different responses into one lump.
On this line, each stage's outcome lands in one of six statuses:
completed: it ran, got a qualified result, and moves on.empty: it ran, the channel was open, but zero qualified results came back. Searched and found nothing.skipped: you turned this stage off yourself by setting its quota to 0, so it never ran.unavailable: it wanted to run but couldn't. The channel is outside what your account can reach (keyword opportunity, say, only covers some market languages), or a dependency was temporarily down.blocked: the upstream evidence isn't enough, and a gate stopped it on purpose. It didn't fail on its own. Something above it didn't feed it.ready: an intermediate state just for generation. The preflight passed but you haven't told it to submit. It can produce a video and is waiting for your go.
The point isn't collecting six names. The point is that the moment empty, skipped, unavailable, and blocked collapse into one "failed," you can no longer operate the thing. All four mean "no video this time," and each asks something completely different of you:
emptyis a data problem. The market has no volume, or the keyword was chosen too narrow. The move is to change the term or loosen the threshold, without touching a line of code.skippedis your own decision. The move is no move, but it has to stay separate fromempty, or you'll spend half a day debugging a stage that was never switched on.unavailableis a channel or config problem. Go check the account's coverage or retry, rather than fiddling with the keyword.blockedis an upstream problem. This layer is fine. Some earlier stage came back empty. The move is to look back for the stage that'sempty, not to wrestle with the blocked layer.
One opaque "failed" walls off all four paths and leaves you guessing. That is why a pipeline that gives you a result but no status can't run for long. Every time something breaks, you have to reproduce the whole thing to learn what happened.
The evidence funnel: organic and commercial signals don't get summed
Demand discovery isn't done once you've "found a few." The raw results run through a funnel that counts at every layer: how many came back, how many fell outside the time window, how many were the wrong language, how many were off-topic, how many had too little view volume to be a sample, and how many actually qualified. When this stage comes back empty, the funnel tells you which layer drained the evidence. Found nothing at all, found plenty but all expired, had content but none of it met the sample bar: three kinds of empty, three different next steps. Without the funnel, empty is just an empty array and you don't even know how it got that way.
More important than counting is one rule: organic-content signals and commercial signals get counted separately and never summed into one "evidence score." A Top Ad is an asset someone paid real money on and the platform judged to be performing. Ten organic videos, however hot, only mean "people are willing to watch for free." A weighted sum lets ten organic videos drown one Top Ad on volume, when that Top Ad is worth far more commercially. The way to do it is to bucket first, then rank. Look at commercial signals first, fall back to qualified organic content if there are none, fall back to creators only if there's nothing else. Rank the tiers by credibility, not by count.
The rule reaches down into a single video. When you evaluate one piece of organic content, likes plus comments are one kind of signal, shares plus saves are another. Shares and saves are the commercial-leaning actions, the "worth keeping, worth passing on" moves, and they weigh above plain engagement when you rank. Engagement volume says it's watchable. Shares and saves say it might actually move product. Even on the same video, those are two different things to read.
(As an aside, "treat correlation as cause, treat frequency as effectiveness" is the mistake a model most loves to make at the attribution step, so the prompt has to force it to give a counterexample. This is the same prompt discipline as making the model keep picking at a pattern it just recognized in the fingerprinting piece. That one is about the counter-evidence section in reverse engineering. Here it's the counterexample in ad attribution. Same mechanism.)
Two kinds of "ready": platform preflight and research evidence are two things
There's a judgment right before generation that is very easy to merge and must not be merged: "can the platform produce a video" and "should this particular video be produced" are two separate gates.
The first is platform preflight ready: is the generation service up, is there enough quota, is the prompt allowed. Infrastructure-level checks. The second is research evidence ready: is there at least one qualified primary piece of evidence in what you gathered. A content-level check. Both gates have to pass before submission, and if either fails the status is blocked.
The temptation to merge them is strong, since both are about "can we generate." Merge them and you run into the most expensive kind of failure: the platform is fine, quota is plenty, the prompt is legal, preflight "passes," and so it generates a video built on zero evidence. That costs far more than a clean failure, because it looks like a success and you might actually go spend on it. Split into two gates, that case sits safely at blocked and tells you what's missing is evidence, not quota. "Can produce" is never the same as "should produce," and writing those two into one condition is the most common design error in pipelines like this.
The brief reads only qualified evidence: competitor copy goes into research, not into the prompt
The creative brief is where the text model is asked for the most on the whole line, and also where the desensitization discipline most easily goes off the rails.
Its job is to pull the validated structure out of the qualified evidence. Which hook recurs across the Top Ads, which second the retention curve peaks at, which skeleton the winning organic content used out of "state the problem, demonstrate the result, call to action." Then it synthesizes those structures into a generation spec.
There's one hard constraint, though: the raw text of competitor assets is only used to pick structure, and never enters the final generation prompt. The brand names, the vendor counts, the quotas, the prices, and the performance claims in a competitor's hook are that competitor's specific assertions, not structure. They stay intact in the research results, where you can review them and trace which asset sparked an idea, but they're explicitly excluded when the generation prompt is built. What the generation model gets is "make a video for my own product using this narrative skeleton and this hook shape," rather than "copy this line."
Why that constraint is worth the trouble: pour competitor copy straight into the generation prompt and the video comes out carrying someone else's brand name and price promise, which is at best a legal-risk asset and at worst outright plagiarism. Feed it only the structure, with the assertions stripped out, and what generates is a video that reuses a validated structure while telling your own story. Keep the research faithful, keep the generation input clean. Same batch of evidence, two uses, two ways of reading it.
"Pull the genuinely validated structures out of a pile of evidence, actively exclude competitor assertions, and give a counterexample for each 'effective structure'" tests exactly the same things as strong reasoning and a willingness to argue with yourself. It's the same division of labor as what a model should and shouldn't do in reverse engineering: the model is strong at generating hypotheses and weak at verifying facts, and the verification has to fall back on your evidence and your tests.
Which model for which step
The text model on this line isn't doing one job. It's doing four with completely different requirements, plus a piece of image and video generation at the end. Run one model for the whole thing and you either burn money on the batch steps or lose precision on the brief:
Step | Capability it needs | Pick | model id |
|---|---|---|---|
Read the whole evidence bundle in bulk (dozens of assets plus second-by-second curves at once) | Long context | Kimi K3 |
|
Extract structured fields per asset (hook, promise type, urgency device) | Cheap, hundreds of calls at high concurrency | Claude Sonnet 5 |
|
Write the brief: pick structures, exclude competitor assertions, give counterexamples | Strong reasoning, willing to argue with itself | Claude Opus 5 |
|
Stage attribution (when a stage is empty or blocked, read the funnel and say which layer drained it) | Mid reasoning, explains against numbers | GPT-5.6 Sol |
|
Generate the video (9:16 vertical ad) | Image and video generation | On-site generation | see |
The brief tier is the one worth testing on its own. It's the single step where switching models visibly changes the result. The test is specific, and it's the one place in this piece you have to run something yourself:
From a pipeline run that actually completed, take one qualified evidence bundle (Top Ads hooks, retention-curve highlights, creator profiles, keyword opportunity, a few winning organic pieces).
Using the same brief prompt (rules: use asset structure only; explicitly exclude brand names, prices, quotas, performance claims; give one counterexample hypothesis for each "effective structure"), feed it to
claude-opus-5andgpt-5.6-solseparately.Look at two things only: did it leak the competitor's specific assertions into the generation prompt (leaking means it failed), and when it said "this structure works," did it bring a counterexample or treat frequency as effectiveness.
How it does on those two is your selection criterion. It decides directly whether the generated video "copied a competitor's script" or "reused a validated structure."
One round shows you the difference, more directly than any benchmark. The batch field-extraction tier (Sonnet) barely needs picking, anything that runs is fine, and the long-context tier (Kimi) is chosen to save you writing your own chunked retrieval.
The generation step: submit, wait for a terminal state, keep the task_id on timeout
Generation isn't "call it and there's a video." Video generation is a slow job. You submit, it goes into a queue, and you have to poll to a terminal state before you know the result. This step has three endings, and they need to stay distinct:
Return right after submitting. The job enters the queue, you get a
task_id, statusprocessing. You can go do something else instead of waiting.Wait for the terminal state. Poll until
completedorfailed. This is the result you were after.Timeout at the boundary. You gave polling a time budget and it ran out before a result. Here you must not throw the task away as failed. The right move is to keep the
task_id, mark it "timed out, unfinished," and let you resume the wait on that id later, rather than resubmit. Resubmitting is spending the money a second time.
The third is the easy one to get wrong. Plenty of implementations equate "polling timed out" with "the task failed," so a job that's actually still rendering, just slower than expected, gets thrown away. Telling "the task failed" apart from "I got tired of waiting" is the core of this step. The first is a terminal state. The second just means I stopped waiting this time. The task is still there, the id is still there, resume it.
Don't submit on all-empty: the most valuable thing is knowing when not to run
Fold all the constraints above into one line and you get this pipeline's most counterintuitive and most valuable rule: when the evidence is all empty, don't submit generation.
Demand discovery empty, commercial validation empty, creator matching empty. Not one qualified piece of primary evidence across the three paths. The brief is blocked, the research-ready gate in the generation preflight fails, the whole line stops at blocked, and not a single frame gets generated.
This sounds like "did nothing," and it's the hardest step to get right and the one that saves the most money. A pipeline that only knows how to charge forward will, faced with all-empty evidence, fall back to a generic brief, generate a video that lands on no one, and report "success." You think it ran. It actually spent a generation's worth of money on zero information and handed you a false success signal.
Half a pipeline's value is that it can generate. The other half is that it knows when it shouldn't. The first is capability, the second is discipline. And the precondition for that discipline is the six statuses from earlier. Without the split between empty and blocked, you don't have a clean "all-empty" signal to base the "don't submit" decision on.
One key, feeding analysis and generation at once
The pipeline design is done. What's left is a pure engineering friction, and it happens to be where most people actually get stuck.
The models this line needs span two kinds of vendor. The text tiers (read evidence, extract fields, write the brief, attribute) come from several vendors, and the generation tier is a separate image and video service. You either wire an SDK, an auth scheme, and an error format for each tier, or, like most people, make do with one model for everything, burning money on the batch steps and losing precision on the brief, and then wire up a separate video platform on top. To save the integration effort, you drop the whole pipeline a grade in quality.
AIReiter takes that layer away. One key, one OpenAI-compatible interface, all four text tiers behind it, switching by changing the model field in the request body. Image and video generation live on the same site under the same key, so once the brief is out you can try generating it right in /chat.
# Write the brief: the reasoning tier
curl https://aireiter.com/api/v1/chat/completions \
-H "Authorization: Bearer $AIREITER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"messages": [{"role": "user", "content": "<brief prompt + qualified evidence bundle>"}]
}'
# Extract fields in bulk: change the model field, leave the rest
# "model": "claude-sonnet-5"
# Stage attribution: "model": "gpt-5.6-sol"
# Read long evidence at once: "model": "kimi-k3"
If you already use the OpenAI SDK, point base_url at https://aireiter.com/api/v1 and change nothing else. On the Anthropic SDK, hit POST /api/v1/messages with the same key.
Price lands on this pipeline's cost structure. The most call-dense step is bulk field extraction: dozens to hundreds of assets, one call each, the bulk of the text-side cost, and Claude at 30% off sits right on it (Sonnet runs the batch, Opus iterates the brief, both Claude tiers). Attribution runs on GPT-5.6 at half price. Long evidence runs on Kimi K3 on the same key. Generation is a separate cost line, billed per run, but it only fires when the evidence gate passes and a video should actually be made. The "don't submit on all-empty" rule is itself saving you generation money.
Try it without signing up: feed one qualified evidence bundle to the brief prompt by hand and watch whether it leaks the competitor's brand names and prices into the generation input, then script it once it holds.
In closing
In "from keyword to finished ad," the real engineering isn't in "finished ad." It's in the middle stretch that turns public data into qualified evidence and then into a clean brief.
Whether that stretch can be operated comes down to three things. Each stage's outcome lands in six statuses instead of "success or failure," so empty, skipped, unavailable, and blocked each point to a clear next step. Evidence is bucketed and tiered rather than summed, so a strong signal isn't drowned by the volume of weak ones. "Can produce" and "should produce" are split into two gates, so all-empty evidence stops safely before generation.
The model is a tool doing work on this line, not the lead. It reads evidence, extracts fields, writes the brief, explains attribution, and a generation model produces the video at the end. What decides "should we go on" is always the statuses and the gates, not the model's confidence. Stand that design up, connect all four text tiers and on-site generation with one key, and the pipeline can genuinely run from keyword to finished ad.