If you have some spare time please contribute to complete or add translations for your local language please, just submit a PR, raise an issue with it, or some other adequate communication platform.
Sora JSON Prompt Crafter is a web interface for building specially crafted prompts for Sora's generative models. Adjust sliders and dropdowns to fine‑tune parameters like style preset, aspect ratio, video duration and more. The app generates a JSON snippet you can copy and use directly with Sora. The app has a privacy-first approach where everything is kept on your browser, no prompt data is shared or tracked. Dark mode is used as default for those of us that go "my eyes!" when there's bright white lights.
- Always on-screen live JSON generation with diff highlighting
- Edit prompts and negative prompts
- Privacy-first local storage only data
- Dark mode first for eye confort
- 100% locally generated JSON
- Optional JSON composition based on option sections
- JSON generation lifecycle functions
- Current generated JSON persists through page reloads
- Stores up to 100 copied JSON prompts in a dedicated history panel
- Import and Export functions for copied JSON entries
- Dedicated Settings panel for import, reset and customization options
- Extensive quality, ambient and setting presets
- Lots of pop culture presets
- Specific framing, dimension and base presets
- Presets and options for video like camera and motion
- Advanced specialized prompting options
- Artifact and defect correction presets
- No-fuss tracking toggle
- Shared links append
?ref=share
for referral tracking - Internationalization support for English, Spanish and other 2 dozens of locales
- Works offline thanks to service worker caching of assets
- Automatically checks for service worker updates on load and when opening the Settings panel
- Inject custom CSS and JavaScript from the Settings panel
Shortcut | Action |
---|---|
Cmd/Ctrl + C | Copy generated JSON |
Cmd/Ctrl + Z | Undo last change |
Cmd/Ctrl + Shift + Z or Cmd/Ctrl + Y | Redo last change |
Keyboard shortcuts are enabled by default. You can toggle them in the Settings panel if they interfere with other tools.
Example JSON output:
{
"prompt": "A breathtaking cinematic scene ...",
"negative_prompt": "blurry, low-res, ...",
"seed": 1337,
"aspect_ratio": "16:9",
"duration_seconds": 5
}
Requires Node.js 22 or higher.
Run nvm use
to match the version in .nvmrc
.
To start using the prompt crafter locally clone and run using the following commands:
git clone https://github.com/supermarsx/sora-json-prompt-crafter
cd sora-json-prompt-crafter
npm install
npm run dev
Copy .env.example
to .env
and adjust the variables. VITE_MEASUREMENT_ID
holds your Google Analytics ID and VITE_DISABLE_ANALYTICS
disables tracking. VITE_DISABLE_STATS
disables the GitHub stats fetch. VITE_DISCLAIMER_URL
can point to a custom path and should include a {locale}
placeholder. Set VITE_GTAG_DEBUG
to true
to enable GA debug mode.
Then open http://localhost:8080 in your browser.
Generate prompt JSON directly from the command line:
npx ts-node cli/index.ts --prompt "A castle at dawn" --width 800
Load options from a JSON file instead:
npx ts-node cli/index.ts --file options.json
Write the output to a file with --output
:
npx ts-node cli/index.ts --prompt "A castle at dawn" --output out.json
Generate compact JSON with --minify
:
npx ts-node cli/index.ts --prompt "A castle at dawn" --minify
When installed from npm, the CLI is exposed as sora-crafter
:
sora-crafter --prompt "A castle at dawn"
Build and run a containerized version of the app:
docker build -t sora-json-prompt-crafter .
docker run -p 8080:8080 sora-json-prompt-crafter
The application will then be available at http://localhost:8080.
npm test
You can also run npm run typecheck
to verify TypeScript types.
npm run format
Runs Prettier with the project's configuration to automatically format all files.
This project is built with:
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
You can deploy the built application to any static hosting service. Below is a typical workflow using Vercel as an example. If you prefer, you can simply open Lovable and click Share → Publish.
Go to Lovable and remix the project.
Clone, install dependencies and build:
git clone <YOUR_GIT_URL>
cd sora-json-prompt-crafter
npm install
npm run build
The build generates a dist
directory containing the production build.
First install the Vercel CLI if you haven't already:
npm install -g vercel
Run the deploy command and follow the prompts:
vercel --prod
After completing the prompts, Vercel will upload the dist
folder and provide a
URL where your application is hosted. You can use any other hosting provider in
a similar fashion by pointing it to the dist
folder.
Copy .env.example
to .env
and adjust values as needed.
VITE_MEASUREMENT_ID
(optional) – Google Analytics measurement ID. Defaults toG-RVR9TSBQL7
if not set. See.env.example
for the placeholder.VITE_DISABLE_ANALYTICS
(optional) – Set totrue
to disable all analytics tracking. Example provided in.env.example
.VITE_DISABLE_STATS
(optional) – Set totrue
to disable fetching GitHub stats. Example provided in.env.example
.VITE_DISCLAIMER_URL
(optional) – Path pattern for the disclaimer text. Include{locale}
to load the correct language. Defaults to/disclaimers/disclaimer.{locale}.txt
.VITE_GTAG_DEBUG
(optional) – Set totrue
to enable Google Analytics debug mode.
Preset lists live under src/data/
. You can add your own files there or merge
presets at runtime. Use importCustomPresets
from src/lib/presetLoader
to load
a JSON object (or URL via loadCustomPresetsFromUrl
). The JSON can include
stylePresets
, cameraPresets
, locationPresets
and dndPresets
keys
matching the built‑in structures. Imported values are merged with existing
presets so they become available in the UI.
Use the Settings panel to add custom CSS or JavaScript snippets that will be injected on startup. These values are stored locally and included in config exports and imports.
Pull requests are welcome. Please open an issue first to discuss major changes.
The full legal disclaimers are located under public/disclaimers/
. They are
copied to the dist
directory during the build so they can be accessed from
/disclaimers/
. You can change the location by setting VITE_DISCLAIMER_URL
to
your own path pattern.
- English (US)
- Spanish (Spain)
- Portuguese (Portugal)
- Russian
- Portuguese (Brazil)
- French
- German (Germany)
- Chinese (Simplified)
- Italian
- Spanish (Mexico)
- English (UK)
- Bengali
- Japanese
- English (Pirate)
- Korean
- Romanian
- Swedish
- Ukrainian
- Nepali
- Danish
- Estonian
- Finnish
- Greek
- Thai
- German (Austria)
- French (Belgium)
- Spanish (Argentina)
To add a new language:
- Create
src/locales/<locale>.json
with the same keys asen-US.json
. - Add a matching
disclaimer.<locale>.txt
inpublic/disclaimers/
. - Import the locale in
src/i18n.ts
and include its flag underpublic/flags/
. - (Optional) run
scripts/fill_translations.py
to pre-fill untranslated keys.
Theres only anonymous usage that tracks actions but not data from the users that you can enable or disable from the Settings panel. Be aware that disabling tracking disables user side action log too. We ask kindly for you to still allow tracking for statistical and improvement purposes. No prompt data or inputs are ever tracked.
This project is licensed under the MIT License. Check license.md
for more information.