Turn stories into short dramas, on your own computer
dramai is an open-source AI short-drama studio. Give it a novel or a script and it plans episodes, scenes and shots, generates images and video through the AI providers you choose, and composes a finished cut with narration and subtitles. Projects are ordinary folders on your disk, your API keys stay on your machine, and nothing passes through a service we run.
Beta The current version is 0.5.0-beta.1. The published installers match it; newer features run from source first. See what is there today
From source text to a finished cut, in six steps
Redo a single shot without touching the rest: a new result is saved as a new version and the old one is kept. When something upstream changes, what depends on it is marked out of date, and nothing is regenerated on its own.
-
Step 1: Materials
Upload a novel or a script (docx, txt or md), and reference images if you have them. Long texts are not truncated; they are split into episodes by chapter.
Produces: source text and references
-
Step 2: Storyboard
A language model plans the text into episodes, then breaks them into scenes and shots, each with a scene description, narration or dialogue, and a prompt
Produces: episodes and a shot list
-
Step 3: Assets
Characters, locations, props and costumes are assets that shots refer to. You confirm the candidates found in the text, and each asset gets one reference sheet.
Produces: the asset library and reference sheets
-
Step 4: Pictures
Shot images are generated with the asset reference sheets as references. Pick the look once, when you create the project: 20 built-in styles, or describe your own.
Produces: one image per shot
-
Step 5: Video and narration
Image-to-video jobs queue in the local server and keep running when you close the browser. Narration can be voiced by TTS, or left for you to record later.
Produces: one clip per shot, and narration
-
Step 6: Compose and export
Your own ffmpeg renders the timeline in 9:16, 16:9 or 1:1, with soft or burned-in subtitles. Export the cut, SRT, VTT and an asset package.
Produces: the cut, subtitles and an asset package
Why it runs on your machine
A browser-only app is limited by CORS, storage quotas and in-browser video encoding. With a local server those limits are gone, and long jobs no longer stop when you close the tab.
-
Local, with your keys
A server on 127.0.0.1 does all the work. Projects are ordinary files plus a SQLite database, so other software can open them. Provider requests are made by that server: no CORS limit, no relay in between.
-
Serials and a reusable library
A project holds episodes, episodes hold scenes, scenes hold shots. Characters, locations, props and costumes live in an asset library, each with one reference sheet that every shot using it is generated from.
-
Checks before paid generation
Shots that refer to an unregistered asset, or one without a reference image, are blocked. A batch runs completely or not at all, and models with a price list get a cost estimate before you confirm.
-
A task queue that survives restarts
Closing the browser does not stop work. After a restart a video task with an upstream task id resumes polling; one without it is marked “submission unconfirmed” and is never resubmitted automatically. Cancelling only affects tasks that are still queued.
-
Connect a provider with one form
Settings → Providers → Add provider: in one form you pick the API protocol, enter the Base URL and an API Key, click “Get model list” and pick a model from the Model drop-down, or click “Type it in” to enter one yourself. A service that offers an OpenAI-compatible interface can be connected by its Base URL. A ChatGPT account or an OpenRouter account can also sign in instead of pasting a key.
The workspace speaks English, Simplified Chinese and Traditional Chinese, in a light and a dark theme
Connect a provider with one form Source
Click “Add provider” in Settings → Providers. Language model, Text-to-image, Image-to-video and Voice-over are each added the same way, with the same form. Items marked “Source” were added after 0.5.0-beta.1; the published installers match 0.5.0-beta.1, so to use them run from source first.
Four steps
- Enter a Name and pick the API protocol
- Enter the Base URL
- Choose the Authentication (API key, Account sign-in or No authentication) and enter the API Key
- Click “Get model list” and pick a Model from the drop-down, or click “Type it in” to enter one yourself; click “Test connection” if you like, then “Add”
“Get model list” and “Test connection” work before you add anything and save nothing; Test connection sends no generation request. Model is a drop-down: protocols that can list models fill it from the list, the others offer the known models from dramai’s model data as suggestions when it has any, and the “Type it in” button next to the drop-down lets you enter any model yourself.
A service that offers an OpenAI-compatible interface can be connected by entering its Base URL. API protocols of several model companies are built in as well; you choose them in the “API protocol” list.
Account sign-in
Instead of pasting a key: choose “Account sign-in” as the Authentication and pick a Sign-in channel; after adding, sign in on the provider card. Sign-in must be done on the computer that runs dramai, because the authorisation comes back to a local address. With account sign-in the Base URL and API protocol are fixed by the channel.
- ChatGPT account sign-in
- After signing in, text requests use your ChatGPT plan. It covers language models; images, video and speech use API keys.
- OpenRouter account sign-in
- After signing in, OpenRouter hands dramai an API key of your own, which is then used like a key you pasted; usage is billed to your OpenRouter account.
Two more options
- Reference images for video (off by default)
- A shot’s character, scene and prop sheets can be sent to the video model as reference images. Where a model’s documentation makes them exclusive with a first frame, the shot image becomes reference image no. 1 and the strict first frame is given up; the confirmation dialog says so before anything is ordered.
- Narration voice
- A project’s narration voice can be chosen, and where the provider takes them it can carry a style instruction and a language hint. Before generating, the voice and the text length are checked.
The workspace, as it looks today
These screenshots come from demo mode: it uses the built-in simulated providers, the pictures are placeholder sketches, and the amounts are in a fictional currency
20 built-in styles, or describe your own
The look is chosen when the project is created and kept as a snapshot. You can skip the built-in styles and describe a style yourself; leave it empty and the language model infers one from the text.
Anime
- Shonen action manga
- Healing slice-of-life
- Classical xianxia
- School romance manga
- Cute chibi
Live-action look
- Modern urban drama
- Suspense realism
- Lyrical realism
- Documentary / news look
- Vlog / short video
Art styles
- Ink wash painting
- Oil painting
- 3D CG animation
- Pixel art
- Low poly
Themes
- Cyberpunk
- Steampunk
- Fairy-tale picture book
- Horror suspense
- Retro 80s
Desktop app or WebUI
Both run the same local server and the same workspace. The difference is how you start it, and a few system integrations.
| Desktop app Its own window, no terminal needed | WebUI Started from the command line, used in your browser | |
|---|---|---|
| How you get it | Download an installer from GitHub Releases (a snapshot of 0.5.0-beta.1, without later changes), or build and install it from source on your machine (pnpm desktop:install), which includes everything | Run from source: pnpm webui starts the server, serves the workspace and opens your browser |
| Good for | Anyone who wants a separate application window | People at home on the command line, or who want to reach the server from another device |
| ffmpeg | Uses the ffmpeg installed on your computer | Uses the ffmpeg installed on your computer |
| API keys | Encrypted with the operating system key store where one exists (macOS Keychain, Windows DPAPI, Linux libsecret or kwallet) | Kept in secrets.json in the data directory; on macOS and Linux the file permissions limit it to you |
| Network access | Local to your machine; the window carries its own access token | Listens on 127.0.0.1 only; to reach it from another device you must pass --host together with an access token |
| Notifications and updates | System notifications. It checks at launch whether a newer version exists, and you download the update yourself | Progress is in the task panel. Updating means pulling the new code and rebuilding |
| Where data lives | On macOS ~/Library/Application Support/Dramai/data by default; changeable from the menu | ~/.dramai by default; set it with --data-dir |
| Build and checks | The macOS Apple silicon installer has been started on a real machine; CI builds the desktop app on macOS, Windows and Linux and runs one sandboxed install, start-up check and uninstall on each | Browser tests cover the whole workflow (in demo mode) |
What a short drama costs
dramai itself is free and open source under Apache-2.0. The cost comes only from the AI providers you connect, at their prices.
The cost follows the providers you choose
A total depends on the models you pick, the number of shots and their length, so there is no fixed figure here. For models with a price list, dramai gives an estimate before a batch runs, and nothing is ordered until you confirm.
What you pay a provider for
- The storyboard breakdown and prompts: a language model
- Shot images and reference sheets: an image model
- Shot videos: a video model
- Narration: only if you choose TTS inside dramai; not if you record it later
- Account sign-in: usage is billed to that account, your ChatGPT plan for a ChatGPT account and your OpenRouter account for an OpenRouter account
What costs the providers nothing
- Composing, subtitles and export: ffmpeg on your own machine
- dramai itself
Every paid step shows you first
- An estimate before you confirm For models with a price list, you see an estimated amount before a batch runs, and nothing is ordered from a provider until you confirm. It is an estimate, not a bill; prices are whatever the provider’s page says today. With reference images for video turned on, the dialog also says what is given up first.
- Complete batches or none Shots that refer to an unregistered asset, or one without a reference image, are blocked. A shot has at most one video task in flight. The narration voice and text length are also checked before generating.
- Nothing is resubmitted automatically A video task cut off before the provider confirmed it is marked “submission unconfirmed”. dramai asks you to check the provider’s dashboard and never resubmits on its own.
Estimates follow each model’s price table; prices are whatever the provider’s page says today.
Install
To connect your own providers, add a language model, an image model, a video model (and a voice) under Settings → Providers and run “test connection”. To see the workflow first, use demo mode: the built-in simulated providers run the whole studio, with no account and no key.
Desktop app 0.5.0-beta.1
An Electron window around the same local server and workspace
- macOS · Apple silicon
.dmgdisk image, or.zipdramai-0.5.0-beta.1-mac-arm64.dmgdramai-0.5.0-beta.1-mac-arm64.zip - macOS · Intel
.dmgdisk image, or.zipdramai-0.5.0-beta.1-mac-x64.dmgdramai-0.5.0-beta.1-mac-x64.zip - Windows · x64
.exeinstaller, or a portable.zipdramai-0.5.0-beta.1-win-x64.exedramai-0.5.0-beta.1-win-x64.zip - Linux · x64
.AppImage, or.tar.gzdramai-0.5.0-beta.1-linux-x64.AppImagedramai-0.5.0-beta.1-linux-x64.tar.gz
The installers match 0.5.0-beta.1
What was added afterwards runs from source first: the additional API protocols, sign-in with a ChatGPT account and an OpenRouter account, the new add-provider form, reference images for video and the narration voice options. Use the WebUI below from source, or build the desktop app on your machine (pnpm desktop:install); both include everything.
Only 0.5.0-beta.1 is published, and it is marked as a Pre-release on the Releases page. SHA256SUMS.txt on the release lists the checksums. The installers are about 115 to 150 MB.
WebUI
Run from source, which includes everything described on this page: starts the local server, serves the workspace and opens your browser
You need Node.js 22.22.2 or newer, pnpm 9 and ffmpeg
# Get the code and build it
git clone https://github.com/hyyyyyyz/dramai.git
cd dramai
pnpm install
pnpm build
# Start it, at http://127.0.0.1:8787 by default
pnpm webui
# Or try demo mode first, no key needed
pnpm demo Options: --port, --data-dir, --no-open. The default data directory is ~/.dramai.
It listens on this machine only. To reach it from another device you must pass --host together with an access token.
The WebUI runs from source for now
Opening an installer for the first time
- The installers are not code-signed, so macOS and Windows show a system prompt the first time; follow the steps below to open them
- macOS: the first launch is blocked. Open System Settings > Privacy & Security and click “Open Anyway” next to Dramai, or run
xattr -dr com.apple.quarantine /Applications/Dramai.appin Terminal. - Windows: when SmartScreen warns you, click “More info”, then “Run anyway”
- Linux:
chmod +xthe AppImage and run it (it needs FUSE 2), or use the.tar.gz - To avoid all of this, build and install from source on your own machine with
pnpm desktop:install: no certificate and no download warnings
Install ffmpeg
Every form uses the ffmpeg installed on your computer, so install it yourself. Without it the app still starts and tells you ffmpeg is missing when you render a cut. Burning subtitles into the picture needs a build with libass; soft subtitles do not. Settings → About shows what your ffmpeg can do.
- macOS
-
brew install ffmpeg - Windows
-
winget install Gyan.FFmpeg - Linux
-
apt install ffmpeg
What there is today
The current version is 0.5.0-beta.1. The published installers match it; newer features run from source first.
What you can do
- The whole workflow: upload a text, plan episodes, break down shots, confirm characters and locations, generate images and video, compose and export; demo mode takes you from start to finish
- Browser tests (Playwright) cover that path, a failed task being resumed, the English interface and keyboard-only use; the provider protocols, the sign-in flows and the checks before generating have automated tests, and CI runs on Linux, macOS and Windows
Providers
- Settings → Providers → Add provider, one form: enter a Name, pick the API protocol, enter the Base URL, choose the Authentication, click “Get model list” and pick a Model from the drop-down, or click “Type it in” to enter one yourself
- A service with an OpenAI-compatible interface can be connected by its Base URL; Language model, Text-to-image, Image-to-video and Voice-over are each added
- Sign-in with a ChatGPT account (language models) or an OpenRouter account instead of pasting a key
- Reference images for video (off by default) and narration voice options
Ways to install
- Desktop installers matching 0.5.0-beta.1: macOS (Apple silicon and Intel), Windows and Linux; the macOS Apple silicon installer has been started on a real machine; CI builds the app on macOS, Windows and Linux and runs an install and start-up check on each
- The desktop app and the WebUI can both run from source with everything included;
pnpm desktop:installbuilds and installs on your machine without download warnings - Demo mode,
pnpm demo: no account and no key
In progress An npm package and a Docker image, and a real JianYing draft file
Used the v0.4 web app?
It kept your projects inside the browser, so the new version cannot see them. The old web app is gone from this site, so you can no longer export a backup here, and because browsers keep data per address, running v0.4.1 on your own machine cannot read what was stored under the old address. If you already exported a JSON backup, import it in the new version under Settings → Data & backup. The last browser-only version is v0.4.1
See the v0.4.1 tagFrequently asked questions
Does dramai cost money?
dramai itself is free and open source under Apache-2.0. The cost comes from the AI providers you connect, at their prices; when you sign in with an account, usage is billed to that account.
Where do my materials and API keys go?
Nothing passes through a service we run, because there is none. Materials and finished cuts live in your data directory. API keys stay on your machine: the desktop app encrypts them with the system key store where one exists, and in the WebUI they are in secrets.json in the data directory (on macOS and Linux the file permissions limit it to you).
When you generate, the text of your materials and the prompts are sent by the local server to the AI providers you chose; that cannot be avoided. The desktop app also makes one anonymous request to GitHub at launch to see whether a newer version exists; you can turn that off in the menu.
When you sign in with an account, the token or key you get does not appear in an API response, a log or an address; a key you get by signing in is shown only as a mask.
Why is it no longer a page you just open?
A browser-only app has limits it cannot get around: provider APIs that refuse cross-origin requests, the browser’s storage quota, encoding video inside the browser, and jobs that stop when you close the tab. With a local server the requests come from your machine, composition uses native ffmpeg, and jobs queue in the server.
How do I connect a provider?
Click “Add provider” in Settings → Providers and use the one form: enter a Name, pick the API protocol, enter the Base URL, choose the Authentication (API key, Account sign-in or No authentication) and enter the API Key, click “Get model list” and pick a Model from the drop-down, or click “Type it in” to enter one yourself. Language model, Text-to-image, Image-to-video and Voice-over are each added this way. “Get model list” and “Test connection” work before you add anything and save nothing; Test connection sends no generation request.
A service that offers an OpenAI-compatible interface can be connected by entering its Base URL; API protocols of several model companies are built in too, and you choose them in the “API protocol” list. The repository’s docs/PROVIDERS.md is the reference for the API protocols.
You can also sign in with an account instead of pasting a key: choose “Account sign-in” as the Authentication, and after adding sign in on the provider card. A ChatGPT account uses your plan and covers text only, with images, video and speech using API keys; an OpenRouter account hands dramai an API key of your own. Sign in on the computer that runs dramai. The form and account sign-in were added after 0.5.0-beta.1, so run from source first. dramai uses only public interfaces and never a ChatGPT back-end endpoint.
How do characters stay consistent between shots?
dramai’s approach is to make one reference sheet per asset and then generate shot images from several reference images, so every shot that uses an asset is generated from the same sheet.
Whether reference images can be used depends on the image model, and Settings shows each model’s reference-image support. When a model lacks a capability the task fails with an explanation; it never switches models quietly.
For video, the sheets can also be sent to the video model as reference images (off by default). With some models, turning that on means the strict first frame is not used, and the confirmation dialog says so first. This option was added after 0.5.0-beta.1, so run from source first.
Can I make a series?
Yes. A project holds episodes, episodes hold scenes, scenes hold shots, and long texts are split into episodes by chapter. The asset library belongs to the project, so every episode shares the same characters, locations, props and costumes.
How does narration work?
You choose when you create the project: voice it with TTS inside dramai and mix it into the cut, leave it for later and record it in your video editor after exporting, or have no narration.
A video model’s built-in voice and narration cannot both appear: when a shot has both dialogue and narration, the workspace asks you to keep only one.
The voice can be chosen in the project settings and, where the provider takes them, carry a style instruction and a language hint; before generating, the voice and the text length are checked. Speech providers are added under Settings → Providers like the others; the voice options were added after 0.5.0-beta.1, so run from source first.
Can I export to JianYing?
The export is an asset package: a zip of videos, images, subtitles and a manifest, which you drag into JianYing or another editor in order. It is not a JianYing draft file; a real draft file is in progress.
What should I know about the installers?
The installers are not code-signed, so macOS and Windows show a system prompt the first time; the steps to open them are in the Install section above. You can also build and install from source with pnpm desktop:install, which has no download warnings.
The published installers match 0.5.0-beta.1; what was added afterwards (the added API protocols, account sign-in, the new add-provider form, reference images for video and the narration voice options) runs from source first.
I used the old web app. What about my data?
The old version kept data inside the browser, so the new version cannot see it. The old web app is gone from this site, so you can no longer export a backup here, and because browsers keep data per address, running v0.4.1 on your own machine cannot read what was stored under the old address. If you already exported a JSON backup, import it in the new version under Settings → Data & backup: each old project becomes a new project with a single episode, with the aspect ratio set to 16:9 and narration set to “added in post”. Importing never changes existing projects.