cd /news/ai-tools/raindance-ai-clip-length-pickers-hea… · home › topics › ai-tools › article
[ARTICLE · art-161368] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Raindance AI: Clip-Length Pickers, Head-Swap vs Whole-Person, and Seedance via TryAllAPI

A developer built Raindance AI, a timeline-aware video remake product on Cloudflare Workers that lets users pick solo or duet photos, choose head-swap or whole-person modes, and select a 3–10 second moment from a trend clip, with output rendered as MP4 for Shorts and Reels. The Worker routes generation through the TryAllAPI aggregator to Seedance, passing an explicit integer duration on every request because omitting it lets the model choose its own length and causes costs to drift against fixed-price credit packs starting at $5.99. Failed jobs trigger credit refunds, and the developer advises pricing packs only after measuring real runs with retry margin, Stripe fees and refunds included.

read4 min views1 publishedOct 31, 2026

How I shipped a timeline-aware Raindance remake product on Cloudflare Workers — where duration knobs drive Seedance costs through TryAllAPI.

raindanceai.app is not “upload and hope.” Users pick solo (1 photo) or duet (2 photos), choose Head swap or Whole person, then select a 3–10s moment from the trend clip (including quick Part 1 / 2 / 3 for a full ~30s stitch later in CapCut). Output is an MP4 ready for Shorts/Reels.

This post focuses on the API + duration economics side: why an aggregator, which Seedance knobs matter, and how pricing from $5.99 maps to credits. Prices and model ids change; treat live site / console as source of truth.

Unlike one-shot 15s party templates, Raindance exposes length:

That means the Worker must pass explicit duration every time. Omitting duration and letting the model “pick a smart length” is how bills drift — and how a $5.99 entry pack silently loses money.

Live pricing seen on the homepage while writing: packs from $5.99, with other tiers such as $9.99 one-video credit messaging and multi-packs ($23.99 / $14.99 / $36.99 variants appear in copy). No subscription required for the core path. Re-check the create CTA before you quote a friend.

Layer Choice Role
Front / SSR TanStack Start (Vite) Landing, upload panel, generation status
Runtime Cloudflare Workers Edge deploy, secrets, API routes
DB Cloudflare D1 Credits, orders, task rows (table prefixes if DBs are shared)
Payments Stripe Checkout One-time packs + optional larger packs; guest checkout
Video upstream TryAllAPI → Seedance Async create + poll
Analytics GA Funnel sanity check
solo/duet photos + length + mode
→ locked Raindance template prompt
→ check credits (else Stripe)
→ Worker creates Seedance task via TryAllAPI
→ poll until MP4 URL → store / show
→ on failure: refund credits

Demo clips / scene stills are self-hosted with the product. Do not scrape other CDNs for marketing.

Direct vendor onboarding for every video model means accounts, KYC, docs drift, and different async status machines. For a small indie product I wanted one API key in Workers Secrets, USD balance billed by usage, and a path to Seedance without rewriting the client each time the console UI changes.

That is what TryAllAPI is for on this project.

Operational checklist after register / top-up:

raindance-prod vs sandbox). TRYALLAPI_API_KEY). Never in the frontend bundle or a blog post. Conceptually the call shape looks like this (field names follow the aggregator’s v3 contents API; always re-check current docs):

POST /api/v3/contents/generations/tasks
Authorization: Bearer <TRYALLAPI_API_KEY>
Content-Type: application/json
Accept-Encoding: identity

GET /api/v3/contents/generations/tasks/{id}

I send Accept-Encoding: identity from the Worker because some gateways behave badly with transparent decompression. Model ids used in production look like Seedance 2.x family strings — treat console ids as source of truth, not this paragraph.

A few details that bit me across this family of sites:

duration as an explicit integer.resolution and ratio. generate_audio. queued → running → succeeded / failed. Success URLs are often supply_unavailable or hard failures: refund credits, show a short human message, log the detailed upstream error server-side, optionally fall back to another Seedance tier. Rough mental model for upstream cost (illustrative only — use your own usage fields and invoices):

tokens ≈ duration_sec × width × height × fps / 1024
cost   ≈ tokens × price_per_million_tokens

Price the site after you measure a few real runs with retry margin, Stripe fees, and failed-job refunds — not from a spreadsheet fantasy of 0% failure.

Raindance-specific:

Demo UIs are easy. The line between toy and product is:

task_id in D1. Two books of account stay separate: USD balance at TryAllAPI (your cost) vs site credits (what you sold). Mixing them in one mental ledger is how you underprice or invent “mysterious” losses.

When several products share one Stripe account, isolate webhooks by endpoint or by metadata (site / product). Callbacks pointed at the wrong apex domain are a classic multi-site footgun.

Secrets stay in Workers: TRYALLAPI_API_KEY, STRIPE_SECRET_KEY, webhook secret, auth secrets. The browser only ever sees publishable Stripe keys if needed.

Raindance’s lower entry (from $5.99) only works if short clips dominate, duration is explicit, and failure refunds are automatic. Measure COGS on 3s vs 10s before locking pack prices.

Typical loop on this template family:

pnpm install
pnpm cf:deploy

Before calling a deploy “done”:

AUTH_TRUSTED_ORIGINS and Stripe return / webhook URLs match the production HTTPS origin. Production origin: https://raindanceai.app.

Face-based generation is not “just another SaaS CRUD app”:

Those constraints belong in the product, not in a footnote you add after the first dispute email.

Consumer: raindanceai.app. Builder: TryAllAPI, top up, prove create+poll, then wire credits. Pick the second, bill the second, poll until MP4.

── more in #ai-tools 4 stories · sorted by recency
── more on @raindance ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/raindance-ai-clip-le…] indexed:0 read:4min 2026-10-31 · —