This guide will walk you through setting up a professional creative writing environment using Kimi K2 Thinking (via Fireworks AI) and Open WebUI. By the end, you'll have a customized AI writing assistant that can help you write novels, screenplays, or any long-form creative work.
P.S: if you get stuck anywhere in this guide or your eyes glaze over skimming it, just copy it into your favorite AI chatbot and ask it to walk you through it step by step and ask it any and all questions as you get confused!
What You'll Build
- Private, local writing interface that runs on your computer.
- Cloud AI model (Kimi K2 Thinking) with 256K context window - enough for ~88,000 words of reference material.
- Custom system prompts tailored to your creative project.
- Zero data retention - Fireworks doesn't store your creative work.
- Cost-effective - $0.60/M input tokens, $2.50/M output tokens.
Part 1: Get Your Fireworks AI API Key
Step 1: Create a Fireworks Account
- Go to https://fireworks.ai
- Click "Sign Up" or "Get Started"
- Create your account (free $1 credit to start; that's enough to test this workflow without paying)
Step 2: Generate Your API Key
- Log into your Fireworks dashboard
- Navigate to your account settings (usually top-right corner)
- Find the "API Keys" section
- Click "Create New API Key"
- Copy this key immediately - you won't see it again
- Save it in a secure location (password manager, secure note, etc.)
Important: Treat this API key like a password. Never share it publicly or commit it to version control.
Part 2: Install Docker Desktop
Docker will run Open WebUI on your computer as a self-contained application.
For Mac/Windows:
- Go to https://www.docker.com/products/docker-desktop/
- Download Docker Desktop for your operating system
- Install it (follow the installer prompts)
- Launch Docker Desktop and wait for it to fully start (you'll see a whale icon in your system tray/menu bar)
- Keep Docker Desktop running - Open WebUI needs it
Part 3: Set Up Open WebUI
Step 1: Open Your Terminal
- Mac: Press Cmd + Space, type "Terminal", press Enter
- Windows: Press Win + R, type "cmd", press Enter
Step 2: Run the Open WebUI Container
Copy and paste this command into your terminal, then press Enter:
bash
docker run -d -p 3000:8080 --name open-webui -v open-webui:/app/backend/data ghcr.io/open-webui/open-webui:main
What this does:
- Downloads and runs Open WebUI
- Makes it available at http://localhost:3000
- Saves all your data in a Docker volume (persists between restarts)
Wait for the download to complete (may take a few minutes the first time).
Step 3: Access Open WebUI
- Open your web browser
- Go to: http://localhost:3000
- You should see the Open WebUI welcome screen
Step 4: Create Your Account
- Click "Sign Up"
- Create a username and password
- This is a local account - it only exists on your computer
- Log in with your new credentials
Part 4: Connect Fireworks AI to Open WebUI
Step 1: Access Settings
- In Open WebUI, click your profile icon (bottom-left corner)
- Select "Admin Panel" or "Settings"
- Navigate to "Connections" or "API Keys"
Step 2: Add Fireworks Connection
- Look for "Add Connection" or "External API"
- Select "OpenAI Compatible" (Fireworks uses OpenAI-compatible API)
- Fill in these details:
API Configuration:
- Name: Fireworks AI
- API Base URL: https://api.fireworks.ai/inference/v1
- API Key: [Paste your Fireworks API key from Part 1]
- Click "Save" or "Test Connection"
Step 3: Add the Kimi K2 Thinking Model
- Still in settings, find "Models" section
- Click "Add Model" or the "+" button
- Enter the model identifier: accounts/fireworks/models/kimi-k2-thinking
- Set a display name: Kimi K2 Thinking
- Save the model
Part 5: Create Your Writing Project Folder
Step 1: Create a New Folder
- In Open WebUI's main interface, look for "Folders" or "Workspaces" (usually in the left sidebar)
- Click "New Folder" or the "+" icon
- Name it after your project (e.g., "My Novel - Book 1", "Screenplay Project", etc.)
Step 2: Configure Folder Settings
- Click on your new folder
- Click the settings/gear icon for folder settings
- Set these parameters:
Model Selection:
- Default Model: Kimi K2 Thinking
Model Parameters: Look for "Advanced Parameters" or "Model Params" and add:
json
{
"max_tokens": 8192,
"stream": true,
"reasoning_effort": "high"
}
```
**Note:** If your UI has separate fields instead of JSON:
- `max_tokens`: 8192
- `stream`: true (or enable streaming toggle)
- `reasoning_effort`: high
4. Save folder settings
Note: you can also set this profile wide for the "model" in OpenWebUI. For that, you go to settings > Advanced and set max_tokens (click default, and instead it'll give you a text editor where you can set it to whatever you want).
Part 6: Set Up Your System Prompt
This is the most important part - the system prompt guides how the AI approaches your writing.
Step 1: Access System Prompt
1. In your folder settings, find "System Prompt" or "Instructions"
2. You'll see a text box where you can enter instructions
Step 2: Copy and Customize This Template
This is a system prompt template we created by synthesizing some of the suggestions we found on Reddit. Feel free to customize it to your needs. Ifyouneed help with that, just tell your ai chatbot what you want to change or what you want help with, and then ask it to "revise this system prompt template based on our discussion."
```
PROJECT OVERVIEW:
You are a creative writing assistant helping to write [DESCRIBE YOUR PROJECT: e.g., "a young adult science fiction novel" or "a psychological thriller screenplay"].
Genre: [YOUR GENRE]
Style: [DESIRED STYLE: e.g., "Erik Larson-inspired prose with flowing sentences", "Toni Morrison style poetic prose" or "Hemingway-esque minimalism"]
POV: [POINT OF VIEW: e.g., "Third person limited, main character perspective"]
Tone: [DESIRED TONE: e.g., "Adventurous and hopeful with moments of tension"]
WRITING APPROACH - THREE PHASES:
===== PHASE 1: PRE-WRITING ORIENTATION =====
Before writing any scene or chapter, think through these strategic questions:
1. CONTINUITY & STATE
- What happened in the last scene/chapter?
- What is the character's current emotional/physical state?
- What unresolved threads are active?
2. SCENE GOALS
- What is the main goal of this scene?
- What does the protagonist want in this moment?
- What obstacles stand in their way?
3. PLOT PROGRESSION
- Which plot threads advance in this scene?
- What new information is revealed?
- What questions are raised for the reader?
4. CHARACTER DEVELOPMENT
- How does this scene develop the protagonist?
- What internal conflict or growth occurs?
- How do relationships shift or deepen?
5. STRUCTURE & PACING
- Where does this scene start? (Start late in the action)
- What is the turning point or key moment?
- Where does it end? (End early, with momentum)
- What is the scene's pacing rhythm? (Fast/slow/varied)
6. ATMOSPHERE & MOOD
- What is the emotional tone of this scene?
- What sensory details anchor the reader?
- What's the environmental/setting mood?
7. ENDING STRATEGY
- How does this scene propel into the next?
- What hook or question keeps readers turning pages?
===== PHASE 2: WRITING =====
PROSE STYLE:
- [CUSTOMIZE: e.g., "Use simple, accessible language with careful word placement"]
- [CUSTOMIZE: e.g., "Create flowing compound sentences with natural rhythm"]
- [CUSTOMIZE: e.g., "Use present participial phrases to convey motion and immediacy"]
- Show, don't tell - use concrete sensory details
- Write in [YOUR TENSE: e.g., "simple past tense"]
- Maintain [YOUR POV] perspective consistently
SCENE CRAFT:
- Start scenes late, end them early
- Every moment should advance plot, character, or both
- Build mystery/curiosity gaps - what questions emerge naturally?
- Create cause-and-effect chains (reactive, sequential logic)
- Ground readers with visual, sensory details that transport them
- Don't rush the world - let readers experience it richly
CHARACTER VOICE:
- Each character should have distinct speech patterns
- Dialogue reveals character, advances plot, or creates tension
- Balance dialogue with action and internal thought
- Characters act according to their established traits and motivations
PACING:
- Vary sentence length and structure
- Build tension through rhythm and word choice
- Give important moments room to breathe
- Quick cuts for action, longer beats for emotion
===== PHASE 3: POST-DRAFT CONTINUITY CHECK =====
After writing, verify:
1. CHARACTER CONSISTENCY
- Do actions align with established abilities/traits?
- Is the character's voice consistent?
- Are emotional reactions believable given circumstances?
2. WORLD RULES
- Does anything violate established world mechanics?
- Are [MAGIC SYSTEM/TECH/RULES] used consistently?
- Does geography/setting remain accurate?
3. TIMELINE & LOGIC
- Does the sequence of events make sense?
- Are there any contradictions with previous scenes?
- Is cause-and-effect maintained?
If any issues arise, note them but don't automatically rewrite - flag them for review.
===== REASONING DEPTH =====
Before writing, engage in extensive internal reasoning about:
- The full chapter/scene arc and how this moment fits
- Character emotional states and development
- Plot threads being advanced or set up
- Thematic resonance
- Scene structure and pacing
Take as much time as needed to think through these elements thoroughly before beginning to write. Quality of thought > speed of response.
===== OUTPUT CONSTRAINT =====
You have a maximum of 8192 tokens (~6000 words) for your written output. Plan your scene structure so that you can complete it satisfyingly within this limit. Ensure you reach a natural stopping point - don't let the response cut off mid-sentence or mid-scene. If writing a full chapter would exceed this limit, write a complete section or beat that can stand alone.
===== ANTI-REPETITION GUIDELINES =====
- Never reuse the same descriptive phrase, metaphor, or turn of phrase within a single chapter
- If describing similar actions (e.g., multiple instances of walking, looking), vary the construction each time
- Each paragraph should provide net new information or emotional development
- Avoid restating what the reader already knows unless for specific dramatic effect
- Character-specific verbal tics or phrases stay with that character only
===== COLLABORATION STYLE =====
When we're brainstorming or planning (not writing):
- Skip the three-phase structure
- Engage conversationally and exploratively
- Ask clarifying questions
- Offer multiple possibilities
- Think aloud about story options
When we're writing chapters/scenes:
- Execute the full three-phase structure
- Focus on quality prose and immersive storytelling
- Maintain consistency with established continuity
```
Step 3: Customize the Template
Replace all the `[BRACKETS]` sections with your specific project details:
- `[DESCRIBE YOUR PROJECT]`: Your actual project (e.g., "a cyberpunk noir detective novel")
- `[YOUR GENRE]`: Your genre
- `[DESIRED STYLE]`: How you want it written
- `[YOUR POV]`: Your perspective choice
- `[MAGIC SYSTEM/TECH/RULES]`: Your world's unique systems
- etc.
Step 4: Save the System Prompt
Click "Save" - this will now guide every conversation in this folder.
Part 7: Upload Your Reference Documents
If you have existing story material (pitch documents, character bios, world-building notes, outlines):
Step 1: Access Knowledge/Workspace
1. Look for "Workspace" or "Knowledge" in Open WebUI's left sidebar
2. Click on it
Step 2: Upload Documents
1. Click "Upload" or drag files into the interface
2. Supported formats: PDF, TXT, MD, DOCX, and more
3. Upload your story bible, character sheets, outlines, etc.
Step 3: Reference Documents in Chat
When writing, you can reference uploaded documents by typing `#` and selecting the document name. This includes that document's content in the context for the AI.
Part 8: Start Writing!
This system prompt is designed to brainstorm with you when prompted, or write with you chapter by chapter when prompted following a three step process: define what needs to happen in this chapter, write the chapter, check for any continuity errors or mistakes once the chapter is done. You'll need to use a decent amount of tokens for this, so make sure you turn up the max token count and tweak it depending on the length of the piece you're writing.
With that out of the way, here's how to start.
Your First Writing Session
1. Click into your project folder
2. Start a new chat
3. Reference any relevant documents with `#`
4. Begin with planning/brainstorming or jump straight to writing
Example prompts:
For brainstorming:
Let's brainstorm the opening scene of Chapter 1. I want to establish
the protagonist's normal world before the inciting incident. What are
some compelling ways to introduce [CHARACTER NAME] that show their
personality and current life situation?
For writing:
Write the opening scene of Chapter 1. The scene should introduce
[CHARACTER] in their everyday environment and hint at the coming change.
Aim for approximately 2000 words.
Part 9: Managing Your Setup
Stopping Open WebUI When Done
When you're finished for the day:
- Open your Terminal
- Run: docker stop open-webui
- Close Docker Desktop if desired
All your data is saved automatically.
Starting Open WebUI Again
- Launch Docker Desktop (wait for it to start)
- Open Terminal
- Run: docker start open-webui
- Go to http://localhost:3000 in your browser
- Log in - everything will be exactly as you left it
Backing Up Your Work
Export conversations:
- Click on any conversation
- Look for export/download options
- Save as text or markdown files
Save your system prompt:
- Copy it periodically to a text file on your computer
- This is your customized "recipe" for the AI
Understanding Your Costs
Fireworks AI Pricing (as of this guide):
- Input tokens: $0.60 per 1 million tokens
- Output tokens: $2.50 per 1 million tokens
- Context window: 256,000 tokens (~88,000 words)
What Does This Mean?
Example calculation:
- You upload 50,000 words of reference material (~67K tokens)
- You ask the AI to write a 3,000-word scene (~4K tokens output)
- Cost: ~$0.04 input + $0.01 output = **$0.05 per scene**
For a full novel:
- If you write 80,000 words with AI assistance (not counting reference material)
- Approximate cost: $5-15 depending on how many iterations/rewrites
Compare this to other AI writing tools which often charge $20-50/month regardless of usage.
Advanced Tips
Adjusting Output Length
In your folder settings, you can change max_tokens:
- 4096 tokens = ~3,000 words
- 8192 tokens = ~6,000 words
- 16384 tokens = ~12,000 words (if supported; our testing indicates it is)
Higher values let you write longer scenes in a single response.
Controlling Thinking Depth
The reasoning_effort parameter controls how much the AI thinks before writing:
- "low": Quick responses
- "medium": Balanced
- "high": Deep reasoning (recommended for creative writing)
- Integer (e.g., 50000): Specific reasoning token budget
Multiple Projects
Create separate folders for different projects:
- Each can have its own system prompt
- Each can reference different documents
- Switch between projects easily
Conversation Organization
- Use clear conversation titles: "Chapter 1 - Draft 1", "Character Development - Alice"
- Keep brainstorming separate from final writing
- Export finished chapters for safekeeping
Troubleshooting
"Can't connect to Open WebUI"
- Check that Docker Desktop is running
- Verify the URL is exactly http://localhost:3000
- Try docker ps in terminal to see if container is running
- Restart with docker restart open-webui
"API Error" or "Invalid API Key"
- Double-check your API key in settings (no extra spaces)
- Verify API Base URL is https://api.fireworks.ai/inference/v1
- Check your Fireworks account has available credits
"Response cut off mid-sentence"
- Increase max_tokens in folder settings
- For responses >4096 tokens, ensure stream: true is enabled
- Break longer chapters into multiple scenes
"Model not responding" or slow responses
- Check your internet connection
- Verify Fireworks API status: https://status.fireworks.ai
- High reasoning_effort takes longer (this is normal)
Privacy & Security Notes
Your Data Privacy:
✅ Fireworks AI: Zero data retention policy, SOC2/HIPAA/GDPR compliant
✅ Open WebUI: Runs locally on your computer, data never leaves your machine except API calls
✅ Your creative work: Only sent to Fireworks during active requests, not stored by them
Best Practices:
- Keep your API key secure
- Regularly export/backup your conversations
- Don't share your Open WebUI password with others (it's local only anyway)
What You've Built
Congratulations! You now have:
✨ A professional AI writing environment with a powerful reasoning model
✨ 256K context window - enough for entire novel outlines and reference material
✨ Customized system prompts tailored to your creative vision
✨ Privacy-focused setup with zero data retention
✨ Cost-effective pay-per-use pricing
✨ Fully persistent - all your work saves automatically
Next Steps
- Customize your system prompt with your specific project details
- Upload your reference materials (outlines, character sheets, world-building)
- Start a conversation and begin creating
- Iterate and refine your system prompt as you discover what works best
- Export finished work regularly to keep backups
Happy writing! 🎉📚✍️
Quick Reference Commands
bash
# Start Open WebUI
docker start open-webui
# Stop Open WebUI
docker stop open-webui
# Check if running
docker ps
# Restart if having issues
docker restart open-webui
# Access in browser
http://localhost:3000
Additional Resources
- Fireworks AI Dashboard: https://fireworks.ai
- Fireworks Documentation: https://docs.fireworks.ai
- Open WebUI Documentation: https://docs.openwebui.com
- Fireworks Discord (for support): https://discord.gg/fireworks-ai
This guide was created based on a real setup process. All steps have been tested and verified. If you encounter issues not covered here, check the troubleshooting section or reach out to the respective communities.







