Open-source reference architecture for AI video generation at scale. Fork it, adapt it, ship it.
OpenAI is shutting Sora down — the app was discontinued April 26, 2026 and the API shuts down September 24, 2026 (OpenAI, NYT). If you have a Sora integration, you need a working alternative before then. SeedCamp ships with Seedance 2.0 model IDs and a drop-in migration path — roughly 10x cheaper per second, native audio, and ranked at the top of Artificial Analysis' audio video board. Migration guide →
SeedCamp is an open-source Python reference architecture that handles the hard parts of generating AI videos at scale. You give it a product brief and a tier (premium or standard), and it handles the rest: writing the script, checking for unsafe content, picking the right model, generating the video, tracking the cost, and managing failures.
It is not a managed service or a SaaS product. It is a working system you can study, fork, and adapt for your own use case.
Scope, honestly. The default setup is a single process: it generates up to a few hundred videos per run reliably, with cost tracking in memory and batches running in the API process. That's the right starting point for most people and it's fully tested. For inventory-scale workloads (thousands of SKUs) you need a durable queue and shared state — the exact path is documented in docs/SCALING.md. We'd rather tell you the ceiling than pretend it isn't there.
The problem: Generating one AI video is simple. Generating thousands is an engineering project. You need to handle:
- Waiting and retrying when the API is busy or fails
- Routing your best products to a premium model and the rest to a cheaper one
- Tracking costs so you know exactly what you are spending per video
- Blocking unsafe content before it wastes your budget
- Running many jobs at once without overwhelming the API or your budget
Most teams spend 2-3 weeks building this infrastructure from scratch. SeedCamp gives you a tested, documented starting point.
from app.services.pipeline import run_pipeline
from app.services.video_gen import wait_for_video
from app.models.schemas import SKUTier
result = await run_pipeline(
sku_id="SUV-001",
brief="Luxury SUV on mountain pass at golden hour, cinematic walkaround",
sku_tier=SKUTier.hero,
)
# Pipeline returns a task_id; poll until the video is ready
video = await wait_for_video(result["task_id"], result["model_id"])
print(video.video_url, result["cost"].total_cost_usd)Use SeedCamp if you:
- Need to generate 100+ videos and want the infrastructure handled for you
- Are building a custom video pipeline and want a head start instead of starting from scratch
- Evaluated managed platforms (Shotstack, Oxolo, Creatify) but need more control or lower cost
- Want to learn how production-grade AI pipelines are structured
- Are migrating from Sora and need a working alternative on Seedance 2.0
Use something else if you:
- Need fewer than 50 videos. Just call the ModelArk API directly. SeedCamp would be overkill.
- Want a managed service with a visual editor. Try Shotstack, Oxolo, or Creatify.
- Want to use multiple AI providers (Runway, Kling, Veo) today. Try Vercel AI Gateway. SeedCamp works with BytePlus only for now; multi-provider support is on the v1.1 roadmap.
- Need template-based video where you swap product images into a pre-made layout. That is a different problem.
Every pattern is self-contained, tested, and reusable in any AI pipeline, not just video.
| Pattern | What it does | Why it matters | Code |
|---|---|---|---|
| Smart Routing | Sends important items to the best model, everything else to a cheaper one | Saves 30-40% on blended cost without sacrificing quality where it counts | model_router.py |
| Async Pipeline | Submits video jobs and waits for results with timeouts | The API does not return videos instantly; you need to poll and handle delays | video_gen.py |
| Cost Tracking | Logs the exact cost of every video, broken down by model and tier | Know what you are spending before the invoice arrives | cost_tracker.py |
| Batch Processing | Generates hundreds of videos concurrently with budget limits | Prevents runaway spending and handles individual failures gracefully | batch_generator.py |
| Retry Logic | Automatically retries failed requests with increasing wait times | APIs fail sometimes; retrying correctly is the difference between 95% and 99.9% success | retry.py |
Also included: a safety evaluator that blocks inappropriate content before generation, quality scoring that rates every video on 5 dimensions, a Streamlit dashboard for visual management, a FastAPI server with health checks and metrics, and deploy configs for 7 platforms.
git clone https://github.com/suboss87/SeedCamp2.0.git && cd SeedCamp2.0
make install
# Try the full pipeline without an API key (dry-run simulates all API calls)
DRY_RUN=true make dev # API on :8000, dashboard on :8501When ready for real generation, get an ARK_API_KEY and add it to .env.
python3 docs/examples/generate_single_video.py # one video
python3 docs/examples/automotive_dealer.py # 10 vehicles, tiered routing
python3 docs/examples/ecommerce_catalog.py # 100 SKUs, batch with cost capgraph LR
A[Brief + tier] --> B[Script gen: Seed 1.8]
B --> C[Safety eval: 7 categories]
C -->|blocked| X[Reject]
C -->|safe| D{Router}
D -->|hero 20%| E[Seedance 2.0]
D -->|catalog 80%| F[Seedance 2.0 Fast]
E --> G[Quality eval: 5 dims]
F --> G
G --> H[Cost tracking + delivery]
Safety evaluation is blocking: if content is flagged as unsafe, generation stops before spending any credits. Quality evaluation is non-blocking: every video gets a quality score, but generation is not stopped for low scores.
| Step | Technology |
|---|---|
| 1. Input | FastAPI + Streamlit dashboard |
| 2. Script generation | Seed 1.8 via ModelArk |
| 3. Safety classification | Seed 1.8, 7 categories with scores |
| 4. Model routing | Pure function, configurable per tier |
| 5. Video generation | Seedance 2.0 or 2.0 Fast, async polling |
| 6. Quality evaluation | Seed 1.8, 5-dimension scoring |
| 7. Cost accounting | In-memory (single worker) or Firestore |
The tier system is a simple enum. Changing it takes three lines.
# Automotive: certified pre-owned to premium, aged stock to fast
class VehicleTier(str, Enum):
featured = "featured" # routes to Seedance 2.0
inventory = "inventory" # routes to Seedance 2.0 Fast
# E-commerce: best sellers to premium, long tail to fast
class ProductTier(str, Enum):
hero = "hero" # routes to Seedance 2.0
catalog = "catalog" # routes to Seedance 2.0 Fast| Vertical | Hero tier | Catalog tier | Scale |
|---|---|---|---|
| Automotive | Certified, new arrivals | Wholesale, aged stock | 300-500K vehicles |
| E-commerce | Top 20% revenue SKUs | Long-tail catalog | 1K-100K SKUs |
| Ad creative | Campaign hero spots | Social cutdowns | 100-10K assets |
Sora shuts down April 26 (app) and September 24 (API). If you have a Sora integration, SeedCamp is a drop-in path to Seedance 2.0.
# Before: Sora (deprecated)
response = openai.videos.generate(prompt=brief, model="sora-2")
# After: SeedCamp on Seedance 2.0
result = await run_pipeline(sku_id="x", brief=brief, sku_tier=SKUTier.hero)Seedance 2.0 is roughly 10x cheaper per second than Sora 2 Pro, ranks higher on Artificial Analysis (#2 vs absent), and generates audio natively.
Full migration guide: docs/MIGRATE_FROM_SORA.md
Supported (tested paths we keep green):
| Platform | Guide | Setup |
|---|---|---|
| Local | make dev |
No Docker needed |
| Docker | deploy/docker/ |
make docker-up |
| BytePlus VKE | deploy/byteplus/ |
K8s manifests (native ModelArk region) |
Community / experimental (configs provided, not continuously tested — PRs welcome): GCP Cloud Run (deploy/gcp/), AWS ECS Fargate (deploy/aws/), Railway (deploy/railway/), Render (deploy/render/). Treat these as starting points and verify before production use.
Before deploying publicly, read the Security Checklist. Set API_KEY, restrict CORS_ORIGINS, and put the Streamlit dashboard behind auth.
- Quick Start - Docker and local setup in minutes
- Deployment Guide - All platforms, step by step
- Migrating from Sora - Code diffs, pricing, timeline
- Market Research - Data behind the positioning
- API Reference - Swagger UI (run locally)
- Contributing - Good first issues labeled
- Security - Vulnerability reporting
SeedCamp is a reference architecture, not a managed service. Here is what you should know before using it:
- Works with BytePlus only, for now. SeedCamp currently supports Seedance models through BytePlus ModelArk. Support for other providers (Runway, Kling, Veo) is planned for v1.1. Track progress in issue #1.
- Cost tracking resets if you restart the server. The cost tracker stores data in memory by default. For persistent tracking across restarts, connect it to Firestore. A warning appears at startup if this could be a problem.
- Tests use simulated API responses. The 139-test suite verifies that the orchestration logic works correctly, but does not call real APIs. For a real end-to-end check, run
scripts/smoke_test.pywith a realARK_API_KEY— it generates one hero and one catalog video, confirms the model IDs resolve, and prints the real cost. Treat a green smoke test as the gate for production. - Cost figures must be reconciled against a real invoice. SeedCamp computes cost from the token formula and price constants in
app/config.py. Runscripts/reconcile_cost.pyand confirm the output matches an actual ModelArk bill before you rely on or publish any per-video number. - Scale is your homework past a few hundred videos. The default is single-process and in-memory. See docs/SCALING.md for the durable-queue + shared-state path to inventory scale.
- The safety filter can be too strict sometimes. It uses an AI model to judge content safety, which means occasional false positives. You can adjust the sensitivity using
SAFETY_THRESHOLD_*environment variables. - Seedance 2.0 is new. It is live on ModelArk in 2026; verify the exact model IDs and current rate limits against the ModelArk docs for your account (early limits were ~2 requests/sec and 3 concurrent tasks). Confirm IDs with
scripts/smoke_test.pybefore launch.
Built by Subash Natarajan | Powered by BytePlus ModelArk | MIT licensed