PromptLab is a lightweight FastAPI app for experimenting with prompt workflows. It combines a kawaii-themed UI with practical tools to generate prompts and captions.
- Caption to Prompt: Upload an image and get a structured prompt generated by your chosen provider.
- Text to Prompt: Describe an idea in text and generate a prompt from it.
- Light/Dark theme: Toggle on the Home page; the theme applies across all pages.
- Python 3.10+
- uv
uv venv
source .venv/bin/activate
uv pip install -r pyproject.tomlIf you prefer syncing directly from pyproject.toml:
uv pip install -r pyproject.tomluvicorn main:app --reloadThen open:
- Home:
http://127.0.0.1:8000/ - CaptionToPrompt:
http://127.0.0.1:8000/caption-to-prompt - TextToPrompt:
http://127.0.0.1:8000/text-to-prompt
Create a .env file (or copy from .env.example if present). Supported keys include:
GEMINI_API_KEYGROK_API_KEYOPENAI_API_KEY
The UI saves API keys automatically as you change them.
- Landing page with a light/dark toggle.
- Theme selection is stored in local storage and applied to all pages.
- Upload an image and select a target base model.
- Choose a provider (Gemini, Grok, OpenAI).
- Grok includes an optional NSFW toggle to control prompt behavior.
- Provide a text description (“Dream your picture”).
- Choose a target base model and provider.
- Generates a prompt from text input.
main.py # FastAPI app + routes
captioning_utils.py # Caption + prompt generation utilities
prompts_lib.py # Prompt helpers
templates/ # HTML templates
- The UI is designed for fast iteration on prompts.