Skip to content

MrMegnis/world-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Built with pollinations.ai

🌍 World Weaver — AI World Generator

Create fictional worlds with AI. Describe a world — and the neural net will enrich it with lore, generate 1–4 images of different scenes, and optionally animate each scene into a short video.

🎨 Made with pollinations.ai — unified API for text, image, and video generation.

🚀 How It Works

You:                     "a dark cyberpunk city where it rains LEDs..."
    ↓
1. GPT-5.4 enriches the description → invents a name + 3–4 paragraphs of lore
    ↓
2. GPT-5.4 generates N image prompts (different scenes of the same world)
    ↓
3. gpt-image-2 renders N images
    ↓
4. (Optional) ltx-2 generates a video for any image

🧠 Models

Stage Model
Text (enrich + prompts) gpt-5.4
Images gpt-image-2
Video ltx-2

🛠️ Setup

1. Clone

git clone https://github.com/MrMegnis/world-generator.git
cd world-generator

2. API Key

Get your key at enter.pollinations.ai and add it to .env:

cp .env.example .env
# Edit .env:
POLLINATIONS_API_KEY=pk_xxx_xxxxx

💡 pk_ keys are suitable for client-side apps (rate limit: 1 req/IP/hour).
🔑 sk_ keys are for server-side apps (no rate limits).

3. Install Dependencies

pip install -r requirements.txt

4. Run

uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Open http://localhost:8000 in your browser.

Or via Docker

docker build -t world-generator .
docker run -p 8000:8000 -e POLLINATIONS_API_KEY=pk_xxx_xxxxx world-generator

🎮 Usage

  1. Describe your world — vibe, aesthetics, inhabitants, rules
  2. Choose the number of variants (1–4)
  3. Click ⚡ Generate Worlds
  4. See the results — world name, lore, and images
  5. Click 🎬 Generate Video under any variant

Example

Description:

A desert world where the sand is made of tiny mirrors. Two suns — blue and purple. Civilization lives underground, in crystal caves.

Result: world name, 3–4 paragraphs of lore, 4 different images of the world's scenes, and a video for each scene.

📁 Structure

world-generator/
├── main.py              # FastAPI backend
├── static/
│   ├── index.html       # Frontend
│   ├── style.css        # Dark cosmic styles
│   └── app.js           # Frontend logic
├── requirements.txt
├── .env.example
├── .gitignore
├── Dockerfile
└── README.md

📜 License

MIT

About

🌍 World Weaver — генератор миров на основе Pollinations AI (GPT-5.4 + gpt-image-2 + ltx-2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors