Setting Up Your
OpenAI API Key
Dungeonwright uses your own OpenAI API key to power AI writing features — generating NPC descriptions, quest hooks, session recaps, and images. Your key is stored locally on your device. No data passes through Dungeonwright's servers.
Before you start
You need an OpenAI account with a payment method added. API usage is billed per request — typical usage costs a few cents per session. New accounts receive free credits to get started.
Create an OpenAI account
If you don't have one yet, go to the OpenAI platform and sign up. It only takes a minute.
platform.openai.com/signupAdd a payment method
OpenAI requires a credit card before you can generate API keys. Go to Settings → Billing in the OpenAI platform and add your card. You only pay for what you use.
Open the API Keys page
In the OpenAI platform, navigate to API Keys in the left sidebar, or click the link below.
platform.openai.com/api-keysCreate a new secret key
Click + Create new secret key. Give it a name like Dungeonwright so you can identify it later. Then click Create secret key.
Copy it immediately. OpenAI only shows the full key once. If you close the dialog without copying, you'll need to create a new key.
Open Dungeonwright Settings
In Dungeonwright, click the Settings icon in the bottom-left of the sidebar. Open the AI section.
Paste your key and save
Paste the key you copied into the OpenAI API Key field. It starts with sk-. Click Save.
Your key is encrypted and stored locally in your vault. It never leaves your machine unless you make an AI request.
You're all set
AI features are now enabled across Dungeonwright — on NPC, location, quest, and session pages. Look for the AI button or select any text to summon the inline writing assistant.
Frequently Asked Questions
Which model does Dungeonwright use?
By default, gpt-4o. You can change the default model in Settings → AI → Default Model. Any model available in your OpenAI account works.
Is my key safe?
Yes. Your API key is stored in Dungeonwright's local vault on your device using the system's secure storage. It is never transmitted to Dungeonwright's servers — there aren't any.
I get an error when using AI features. What do I check?
Common causes:
- —The key was entered incorrectly — go to Settings and re-paste it
- —No billing method on your OpenAI account — add a card at platform.openai.com
- —You've exceeded your usage limit — check your OpenAI billing dashboard
- —The selected model isn't available on your tier — try gpt-4o-mini as a fallback