Skip to content
keforo-studio-web

Case study

Keforo Studio

AI video ads, product images, Darija voiceovers and full campaigns for MENA e-commerce, from one pool of credits.

Role
Founder, full-stack engineer
Year
2025

The challenge

A shop describes a product. It should get back a finished video ad: clips, voice and copy from four AI providers, paid from one pool of credits.

In numbers

  1. ≈ 100Catalogued actions across fal.ai, Replicate, OpenRouter and ElevenLabs.
  2. 6Video models behind one form, from Wan 2.5 to Veo 3.1.
  3. 3Workers at a time, to cap how much money can be in flight.
  4. 5Steps from a product description to a complete 720p video ad.

What it does

One studio, every format.

Video clips of 4 to 12 seconds, product images, voiceovers in many languages including Moroccan Darija, ad copy in Darija, French, Arabic and English, and complete 30 to 120 second video ads.

Around it: projects that group generations, a team with roles that shares one credit balance, and a wallet paid by card through Stripe or by bank transfer in dirhams.

Live

The form comes from the catalogue

Every model is an action in a registry: its provider, its model id, its credit cost, the minimum plan it needs and the parameters it accepts. Switch the action and watch the fields, the price on the button and the plan gate change.

Live

Replay

One generation, replayed

Credits are taken first, the job is queued, one of three workers claims it, the provider runs, the output is copied into the studio’s own storage, and the browser is told over WebSocket.

Replay

Architecture

How a request moves through the system

Long provider calls leave the request path: a durable queue, a small worker pool, status events over WebSocket, and every output copied into the studio’s own storage.

BrowserNext.js studioAPIHono on BunCreditsthree bucketsQueueRedis · BullMQWorker3 at a timeProviderfal.ai · ElevenLabs · OpenRouterStorageS3 / R2WebSocketsame port as HTTPPOST /ai/generatecredits.deductqueue.addclaim≤ 5 minimportemitstatus event

The campaign pipeline

From product to ad, in five steps

  1. Step 1 of 5

    Storyboard

    The model writes one scene per beat, with a voiceover line each. The pipeline stops here: you edit, add, delete or reorder scenes before anything expensive runs.

  2. Step 2 of 5

    Reservation

    Confirming reserves the credits for the whole job at once: scenes × (clip + voiceover) + composition + storyboard. What is not used is refunded in one move.

  3. Step 3 of 5

    Clips

    One clip per scene, generated in parallel. A failed clip is skipped and the campaign continues.

  4. Step 4 of 5

    Voiceovers

    Started three seconds apart, because the voice provider rejects overlapping requests on one account. A failed voiceover pauses the campaign until you retry it or compose without it.

  5. Step 5 of 5

    Composition

    FFmpeg normalises every clip to 1280×720 at 24 fps, mixes clip audio at 20% under the voice, and joins the scenes in storyboard order. No AI, no per-campaign cost.

Live

A campaign, from product to ad

A campaign turns a product description into a complete 720p video ad, with two places where a human is in the loop: the storyboard review, and a pause if a voiceover fails.

Live

Credits

Credits, in one pool

Credits are the only currency inside the product. One pool covers video, image, voice, text and campaigns, and it belongs to the organisation, not the person, so a team shares it.

Free credits are spent first, then the monthly subscription credits, then purchased top-ups. Each deduction records what came from where, which is what makes an exact refund possible.

A draft image is 1 credit; Wan 2.5 video is 31, Kling 2.6 Pro 43, Veo 3.1 193. Users choose the quality and cost trade-off themselves.

Built with

  • Bun
  • Hono
  • MongoDB
  • Redis
  • BullMQ
  • WebSocket
  • Next.js
  • OpenRouter
  • fal.ai
  • ElevenLabs
  • Replicate
  • FFmpeg
  • Stripe
  • S3 / R2

Where it stands

Live at studio.keforo.com

Video, image, voice, text and campaigns run from one pool of credits. Still to come: voice cloning, product images feeding the clips, text overlays and transitions, and an editor in the browser.

Read how it works
Composed ads of 30 to 120 seconds, assembled on the server.
720p
Credit buckets: free, subscription and top-up, refunded exactly on failure.
3
Next caseKeforo App