How to Build an AI Content Pipeline With Image, Video, and Approval Stages

YYunus Emre Özdiyar 11 min
imageat API documentation showing image, video, LLM, MCP, and workflow options

Build an AI content pipeline with image and video stages, approval gates, idempotent retries, cost controls, webhooks, and production checklists.

On this page
  1. The pipeline in one view
  2. Start with an asset manifest, not a giant prompt
  3. Choose direct model calls or the Workflow API
  4. Use direct calls while the process is changing
  5. Use a published workflow when the recipe is stable
  6. Model the pipeline as a state machine
  7. Build idempotency into every expensive step
  8. Generate images before video
  9. Put an approval gate between image and video
  10. Treat video as an asynchronous job
  11. Use a simple orchestration loop
  12. Separate generation from finishing
  13. Design retries around failure classes
  14. Retry automatically
  15. Return to the brief
  16. Require a person
  17. Stop permanently
  18. Add cost and quality controls before launch
  19. Secure the production path
  20. A launch checklist
  21. Frequently asked questions
  22. What is an AI content pipeline?
  23. Should I use direct API calls or a published workflow?
  24. Can the pipeline publish without human review?
  25. How do I prevent duplicate charges during retries?
  26. How should I estimate the budget?
  27. What should I build first?
  28. Build the smallest reliable version

An AI content pipeline is a repeatable system that turns a brief into generated assets, reviews those assets against clear rules, and delivers only approved files. A practical pipeline should track state, cost, retries, and human decisions—not just send prompts. The imageat API documentation provides direct image and video endpoints plus a Workflow API for packaging repeatable creative pipelines.

This guide shows how to design that system for campaign images and short videos. The goal is not fully automated publishing. It is controlled production: automate the predictable work, stop when judgment is required, and preserve enough data to explain every result.

The pipeline in one view

A durable first version has eight stages:

  1. Intake: validate the brief, source files, rights, destinations, and required formats.
  2. Plan: turn the brief into a small asset manifest with prompts and acceptance rules.
  3. Generate drafts: create low-risk image candidates before spending on video.
  4. Automated checks: reject wrong dimensions, missing files, and invalid formats.
  5. Human approval: select a candidate and record who approved it.
  6. Generate motion: use the approved still as the input for a video request.
  7. Finish and package: create destination-specific versions and metadata.
  8. Deliver: copy accepted assets to durable storage and hand them to a publisher.

That order matters. If the key visual is wrong, generating video from it only makes the mistake more expensive. A pipeline should move from cheap decisions to expensive decisions and place approval gates before irreversible actions.

Start with an asset manifest, not a giant prompt

The asset manifest is the contract between the brief and the automation. Store it as structured data that can be validated before any model call.

{

"campaignId": "winter-launch-2026",

"audience": "existing customers",

"claim": "A quieter way to plan the week",

"deliverables": [

{"type": "image", "aspectRatio": "1:1", "count": 3},

{"type": "video", "aspectRatio": "9:16", "duration": "5s", "count": 1}

],

"required": ["product visible", "space for caption"],

"forbidden": ["unverified price", "competitor logo", "readable fake UI"],

"approvalRequired": true

}

A manifest prevents requirements from disappearing inside prose. It also lets the same brief drive multiple outputs without pasting one oversized instruction into every request.

Keep four kinds of information separate:

  • Facts: approved product name, claim, color, and audience.
  • Creative direction: mood, composition, camera, pacing, and sound.
  • Technical constraints: format, ratio, resolution, duration, and file limit.
  • Policy constraints: consent, licensing, prohibited claims, and review owner.

Do not ask a model to invent missing business facts. Mark them as unresolved and block the run until the brief is complete.

Choose direct model calls or the Workflow API

The current imageat model catalog is the source of truth for available model IDs and controls. There are two useful integration patterns.

Use direct calls while the process is changing

Direct image and video calls are useful when a team is still testing prompts, models, and acceptance rules. Image generation uses POST /v1/images. Video generation uses POST /v1/videos, then an application checks GET /v1/videos/status until the task completes or fails.

This approach gives the orchestrator explicit control over each stage. It is a good fit when:

  • Different campaigns need different models.
  • A human must choose an image before video starts.
  • Prompts or parameters change frequently.
  • Your application already has a queue and job database.

The dedicated image generation API and video generation API pages explain how those modalities fit into production applications. Check the selected model page before sending optional controls because resolutions, durations, references, audio, and output counts vary by model.

Use a published workflow when the recipe is stable

The Workflow API can trigger a published creative pipeline with one authenticated request. Create a run with POST /v1/workflows/{workflow_id}/runs, then read it with GET /v1/runs/{run_id} or use the documented live-update and webhook options.

A published workflow is useful when:

  • The internal model sequence should be hidden from the calling product.
  • Many users need the same versioned recipe.
  • The team wants to update internal steps without rewriting the caller.
  • Inputs and outputs can be described by a stable contract.

A sensible migration path is direct calls first, instrumentation second, then a published workflow after the sequence has survived real jobs. Do not freeze an experimental process too early.

Model the pipeline as a state machine

Do not represent a multi-minute creative job with a single done flag. Use explicit states and permit only valid transitions.

A compact state model might be:

  • brief_pending
  • ready
  • image_generating
  • image_review
  • video_generating
  • final_review
  • approved
  • delivered
  • failed
  • cancelled

Each transition should write an event containing the job ID, previous state, next state, timestamp, actor, request ID, and reason. Human actions should be events too: candidate_selected, changes_requested, or approved_for_delivery.

The Workflow API has its own run lifecycle—queued, running, completed, failed, or cancelled. Keep those provider states separate from your business states. A model run can be technically completed while its output is still waiting for editorial approval.

Build idempotency into every expensive step

Workers retry. Networks time out. A user can click twice. Without idempotency, each of those events can create another billable generation.

Use a deterministic operation key for each stage, such as:

winter-launch-2026:image-draft:v3

winter-launch-2026:video-from-candidate-2:v1

Send a unique Idempotency-Key on supported non-streaming requests and save it before the request leaves your system. The live docs state that supported v1 idempotency responses are retained for 24 hours; replaying the same key and body returns the original response rather than charging for a duplicate. Reusing a key with a different body is a conflict, so version the key when the payload changes.

Also store the x-request-id returned by imageat. You can send x-client-request-id to correlate the external call with your internal job. Together, those identifiers make support and cost reconciliation much easier.

Generate images before video

For a campaign that needs both formats, the image stage is the creative checkpoint. Generate a small set of candidates, not an unbounded batch.

For every candidate, store:

  • The exact model ID and parameters.
  • Prompt version and source-asset references.
  • Output URL, dimensions, and MIME type.
  • Generation time and returned billing data.
  • Automated-check results.
  • Reviewer decision and notes.

Use the live API pricing page when estimating a run. Current prices depend on the model and configuration; image count, quality, resolution, video duration, mode, and audio can change the charge. Do not hard-code a marketing promise around a temporary minimum price.

The free or local parts of this workflow are your own validation, queueing, approval UI, file inspection, and metadata preparation. Calls to hosted generation models use imageat credits or API balance according to current billing rules. Keep those two cost layers separate in your reporting.

Put an approval gate between image and video

An approval gate should be a real database condition, not a message in a team chat. The video worker should require an immutable approved candidate ID.

A useful image review checks:

  • Is the subject or product recognizable and accurate?
  • Are hands, faces, packaging, and important geometry coherent?
  • Is required negative space available for the final caption?
  • Is any accidental text readable, false, or trademarked?
  • Does the crop work at the requested ratio?
  • Were all reference assets supplied with permission?
  • Does the output avoid prohibited or unverified claims?

Record approvedBy, approvedAt, and the asset checksum. If the image changes, invalidate the approval. This prevents a later edit from silently inheriting an earlier decision.

Treat video as an asynchronous job

Video generation should not keep a web request open. POST /v1/videos returns identifiers for an asynchronous task. Persist taskId and generationId immediately, then use a queue worker to check the status endpoint.

The current docs recommend polling every 5–10 seconds while a video is pending. A production worker should also:

  • Stop after a defined timeout.
  • Respect Retry-After on rate limits.
  • Use exponential backoff for transient transport failures.
  • Fail fast on validation and authentication errors.
  • Avoid retrying a completed business operation.
  • Keep the original idempotency key when a safe replay is intended.

For event-driven systems, a video request can include a public HTTPS webhook_url and an optional webhook_secret. Verify the documented HMAC-SHA256 signature before accepting a callback. Webhooks reduce polling, but the status endpoint should remain available as a recovery path when a callback is delayed or lost.

Use a simple orchestration loop

The following JavaScript skeleton shows the application logic rather than a model-specific payload. It assumes that your database functions and queue exist and that the API key stays on the server.

async function advance(job) {

if (job.state === "ready") {

const image = await createImageDraft(job, {

idempotencyKey: `${job.id}:image:${job.promptVersion}`

});

await saveProviderIds(job.id, image);

return transition(job.id, "image_generating");

}

if (job.state === "image_generating") {

const result = await readImageResult(job);

if (!result.ready) return;

await validateFile(result.url, job.imageRules);

await saveCandidate(job.id, result);

return transition(job.id, "image_review");

}

if (job.state === "image_review") return;

if (job.state === "video_generating") {

const result = await readVideoStatus(job.taskId, job.generationId);

if (result.status === "completed") {

await validateFile(result.url, job.videoRules);

await saveFinalCandidate(job.id, result);

return transition(job.id, "final_review");

}

if (result.status === "failed") {

return failJob(job.id, result.error);

}

}

}

The important detail is the empty image_review branch. Automation deliberately stops there. A separate approval action selects a candidate, changes the state to video_generating, and enqueues the next step.

Separate generation from finishing

Generation APIs create source assets. They do not replace every finishing task. After approval, the pipeline may still need to:

  • Resize or letterbox for each destination.
  • Compress a file to a platform limit.
  • Add reviewed captions or subtitles.
  • Normalize audio.
  • Create thumbnails and poster frames.
  • Attach alt text and campaign metadata.

Use deterministic media tools for deterministic jobs. For example, a video resizer is a better fit for a known aspect-ratio conversion than asking a generative model to recreate the scene. The video compressor can help prepare an accepted file for a delivery limit without changing the creative concept.

Keep the untouched generated original, the approved master, and each delivery derivative as separate assets. Never overwrite the only copy.

Design retries around failure classes

Not every error deserves another generation.

Retry automatically

Use bounded retries for timeouts, connection resets, rate limits after the required delay, and documented temporary provider failures. Reuse the correct idempotency key when replaying the same operation.

Return to the brief

If a prompt is ambiguous, required source media is missing, or the wrong format was requested, retries will reproduce the same mistake. Move the job to changes_requested and fix the input.

Require a person

Escalate brand, legal, likeness, disclosure, and factual-claim questions. A model score cannot approve rights that were never documented.

Stop permanently

Do not retry invalid credentials, blocked content, cancelled campaigns, or a request that exceeds a campaign budget. A dead-letter queue should preserve the event and reason for inspection.

Add cost and quality controls before launch

Set budgets at three levels:

  • Per attempt: maximum acceptable configuration for one call.
  • Per asset: all drafts and retries required for one accepted output.
  • Per campaign: the total cap across images, videos, and finishing.

Track cost per accepted asset, not only cost per generation. A cheap model that needs many rejected attempts can be more expensive in practice.

Quality controls should be similarly layered. Automated checks can confirm dimensions, file type, duration, blank frames, and missing audio. Human review should handle composition, product fidelity, claims, cultural context, and whether the asset is worth publishing.

A useful dashboard joins both sides: acceptance rate by model and prompt version, average attempts per approved asset, median generation time, failure categories, and spend per campaign.

Secure the production path

Create the API key in the imageat Projects area, place it in a server-side secret manager, and never expose it in browser code, mobile bundles, logs, or screenshots. Separate sandbox and production keys, rotate exposed credentials, and grant publishing access independently from generation access.

Other essential controls include:

  • Allowlisted callback domains.
  • Constant-time webhook-signature comparison.
  • Short-lived signed URLs for private source assets.
  • Malware and MIME checks on uploads.
  • Redaction of prompts and personal data in logs.
  • Retention rules for source portraits and generated files.
  • An audit trail for approvals and delivery actions.

If a content pipeline can publish automatically, its publishing credential has a larger blast radius than its generation key. Keep the final publish step disabled until the team has tested review, rollback, and duplicate prevention.

A launch checklist

Before processing a real campaign, verify that the pipeline can answer yes to each question:

  • Does every run have a unique job ID and explicit state?
  • Are prompts, parameters, source assets, and model IDs versioned?
  • Are API keys server-side only?
  • Are expensive calls protected by idempotency?
  • Are request IDs and billing results stored?
  • Does video processing survive a worker restart?
  • Can delayed webhooks be recovered through status checks?
  • Does a human approve the still before video generation?
  • Does changing an asset invalidate its approval?
  • Are automated checks separate from editorial review?
  • Are campaign and per-asset budgets enforced?
  • Are originals, masters, and delivery files stored separately?
  • Can a duplicate delivery be detected and blocked?
  • Can an operator cancel a queued or running job?
  • Is there a documented rollback path after delivery?

A small pipeline that meets these conditions is more valuable than a large autonomous system that cannot explain what it generated or why it published.

Frequently asked questions

What is an AI content pipeline?

It is a stateful production system that converts a brief into generated and finished assets through validated inputs, model calls, quality checks, approvals, and delivery steps. The pipeline includes operational controls; it is not just a sequence of prompts.

Should I use direct API calls or a published workflow?

Use direct calls while models, prompts, and approval rules are changing. Move a stable, repeated recipe into a published Workflow API process when you want one versioned contract and fewer orchestration details in the calling product.

Can the pipeline publish without human review?

It can, but generation success is not editorial approval. For customer-facing work, add a human gate for claims, likeness, product accuracy, rights, and brand fit. Automate delivery only after duplicate protection and rollback have been tested.

How do I prevent duplicate charges during retries?

Persist the operation before calling the provider, send a unique Idempotency-Key on supported requests, and replay the same key only with the same body. Also record imageat's request and task identifiers so a restarted worker can resume instead of creating a new generation.

How should I estimate the budget?

Use the current model and configuration prices, then multiply by expected attempts per accepted result. Include rejected drafts, retries, video duration, resolution, audio options, and finishing work. The live pricing page should remain the source of truth.

What should I build first?

Start with one brief schema, one image stage, one human approval gate, one asynchronous video stage, and one delivery destination. Instrument it, learn where jobs fail, and add complexity only when the simpler path is reliable.

Build the smallest reliable version

The strongest AI content pipeline is not the one with the most models. It is the one that protects expensive stages, pauses for judgment, survives retries, and leaves a complete record of each decision.

Begin with a single campaign type and choose supported models from the imageat model catalog. Use the imageat API docs to implement the current request lifecycle, then promote the proven sequence into a published workflow when its inputs, outputs, and review rules are genuinely stable.

imageat API documentation showing image, video, LLM, MCP, and workflow optionsPin it for laterSave this guide to your Pinterest board

Share

Try it yourself
on imageat

Everything in this guide runs in the browser. Start with a free account and pay per generation.

Discover more

View all