Skip to content

dciccale/embota

Repository files navigation

Embota

Embota Logo

What is Embota?

Embota is a tiny, magical publishing house for children’s stories. Share a kid’s idea (or a parent’s prompt), and Embota turns it into a fully illustrated picture‑book—story, storyboard, style guide, and page art—ready to enjoy together.

  • From spark to story: A simple prompt becomes a warm, age‑appropriate narrative with heart and a clear moral.
  • Cinema on the page: The story is transformed into page layouts with bite‑sized vignette dialogue and vivid scene directions.
  • A consistent world: A style guide locks in palette, mood, character designs, and rendering notes for continuity.
  • Art that smiles back: High‑quality page illustrations are generated to match the storyboard and style, keeping faces friendly and consistent.

Behind the scenes, Embota coordinates a friendly team of AI “creatives” — a storyteller, an art director, a style director, and an illustrator — who collaborate to bring each tale to life. The result is a cohesive book experience you can read, print, or share.

To install dependencies:

bun install

To run:

OPENAI_API_KEY=sk-... bun run index.ts

Story creator pipeline

The script orchestrates several OpenAI model calls with the Vercel AI SDK:

  • Narration agent (gpt-4.1) expands the kid- or parent-written prompt into a full story (≥ 8 scenes) tailored to the selected age (1–6).
  • Storyboard agent (gpt-4o-mini) restructures the narration into page layouts with detailed vignette text and imagery prompts.
  • Style director agent (gpt-4.1-mini) defines palette, mood, and character/setting descriptions for consistent illustrations.
  • Image renderer (gpt-image-1) generates a composite page illustration per storyboard entry using the outline and style guidance.

The default entry point (main) demonstrates the pipeline with an example dragon story for a 5-year-old. Adjust the input prompt or age values as needed.

Requirements

  • Bun v1.3+ runtime.
  • OPENAI_API_KEY environment variable with access to the listed models.

Custom usage

Replace examplePrompt and age in index.ts, or wrap createStory({ userPrompt, age }) inside your own server or CLI interface. The returned payload includes the original narration, structured outline, style sheet, and generated images (URLs + prompts) ready for downstream use.

This project was created using bun init in bun v1.3.0. Bun is a fast all-in-one JavaScript runtime.

Dandy The Dragon

Prompt used:

Create a story about a dragon that is very hungry and eats everything and the townspeople but then repents and asks for forgiveness and everyone escapes from his belly.

Output: dandy-the-dragon.pdf

Dandy The Dragon

About

Embota is a tiny, magical publishing house for children’s stories.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors