Skip to content
Theorem Labs
All workExhibit I of 9

One prompt in, a narrated and captioned 9:16 short out, on AWS Lambda.

Hassan built it as a contract AI and backend engineer for Aegasis Labs, 2024 – 2025.

Client
Aegasis Labs
Sector
Generative video
Scope
Python · OpenAI · AWS Lambda
aegasislabs.com
The Aegasis Labs website: Empowering AI innovation
fig. 1 · the consultancy's site; the pipeline runs behind it

ProofAegasis Labs

Given.

Aegasis Labs, an AI-assisted software consultancy in London, wanted short vertical video made from a single request: a prompt in, a finished short out.

To show.

That one prompt can become a finished short, with every stage free to fail and retry without paying for the stages before it again.

Construction.

Five stages, each one safe to retry, orchestrated on AWS Lambda: script, scenes, narration, captions, and assembly.

  1. 01

    Script & scenes

    script(prompt) → scenes

    The prompt becomes a script, and the script becomes illustrated scenes, each a stage of its own.

  2. 02

    Narration & captions

    narrate() · caption()

    Narration generated for the script, with captions timed word by word and rendered with PIL.

  3. 03

    Assembly

    assemble(9:16)

    MoviePy cuts it together: Ken Burns motion on the stills, crossfades between scenes, all in a 9:16 frame.

  4. 04

    Cost-aware retries

    s3.cached() or call()

    Every stage's output cached in S3, so a retry never calls a paid endpoint twice.

Then.

Alongside it, for an energy-infrastructure cybersecurity product, Hassan ported the production streaming chat adapter from PHP to Python, on OpenAI streaming.

Figures

fig. 2, a sketch

The pipeline runs behind the consultancy's own tools, so there is nothing public to show. On the board instead: the shape of it.
Shipped.

From a single prompt to a finished short, automatically.

Visit aegasislabs.com

Next exhibit · AHeritage retail

S Abdul Khaliq

sakhaliq.com

Start a project

What are we building?

What do you need built?

Rather talk? WhatsApp +92 303 8729595 or contact@theorem-labs.com