Add an OpenRouter AI key
An OpenRouter API key lets Dirigible's AI tools write alt text, excerpts, and more on your site. OpenRouter is a prepaid service: you add credits to your OpenRouter account, and each AI request takes a tiny amount from that balance. Dirigible doesn't bill you for it.
What the key is used for
| Feature | Where you find it |
|---|---|
| AI Alt Text | Dirigible β AI Alt Text, plus automatic alt text for new uploads |
| AI Excerpts | Dirigible β AI Excerpts, plus Generate an excerpt... in the editor's Excerpt panel and Generate SEO description under the SEO description field |
| AI Featured Images | Dirigible β AI Featured Images |
| AI Focal Points | Dirigible β AI Focal Points |
| Documentation AI Fill | The AI: Fill from File box when editing a Dirigible Documentation doc |
| Theme Setup | The AI step, logo generation, and Generate Content |
Saved key or pasted key
There are two ways to give Dirigible a key.
- Saved for the whole site. Save it once at Dirigible β AI / OpenRouter. Every AI tool uses it, and each tool screen shows Using site OpenRouter key with the last four characters of the key.
- Pasted on a tool screen. Without a saved key, each tool screen shows an OpenRouter API Key box. A key pasted there only lasts until you leave or reload the page.
Some features only work with a saved key: automatic alt text on upload, the editor's Generate an excerpt... and Generate SEO description buttons. Those buttons don't appear at all until a key is saved. Save the key unless you have a reason not to.
Create an OpenRouter account and add credits
- Go to openrouter.ai and sign up.
- Open the Credits page and buy credits. $10 is plenty to start. OpenRouter adds a small fee when you buy credits, but the AI requests themselves aren't marked up.
Credits sit in your account until a key spends them. OpenRouter may expire credits a year after purchase.
Create a key with a $5 monthly limit
Give each website its own key. That way you can see what each site spends and cap it separately.
- Open the Keys page and create a new key.
- Name it after the site, like "Acme Bakery website", so you can tell your keys apart later.
- Set the credit limit to 5 and set the limit to reset monthly.
- Create the key and copy it right away. It starts with
sk-or-, and OpenRouter won't show it again.
We recommend $5 a month per site. For most sites that covers far more AI work than you'll use (see the estimates below), and it stops a mistake from draining your whole balance.
The limit applies to that one key, not your whole account. Monthly limits reset at midnight UTC on the first of the month. You can also choose daily or weekly, or raise the limit on the key's page any time.
When the limit runs out
Once a key reaches its limit, OpenRouter turns down its requests until the limit resets or you raise it. The same happens if your account runs out of credits. In Dirigible:
- The tool screens and editor buttons show "API request failed. Check your API key and modelβ¦"
- Documentation AI Fill shows OpenRouter's own message about the limit.
- Automatic alt text skips new uploads without a warning. Those images keep empty alt text. Fill them in later from Dirigible β AI Alt Text.
If AI suddenly stops working, check the key's usage on OpenRouter first.
Save the key in Dirigible
- In WordPress, go to Dirigible β AI / OpenRouter.
- Paste the key into OpenRouter API Key.
- Click Save Settings.
You should see OpenRouter settings saved. and a green note that a site key is saved, with the last four characters of the key. The box stays empty after saving. That's expected: the key is stored securely and never shown again.
To confirm the key works, open Dirigible β AI Alt Text. It should say Using site OpenRouter key. Generate alt text for one image.
- Enter a valid OpenRouter key beginning with sk-or-. means the pasted text wasn't an OpenRouter key. Copy it again from OpenRouter.
- To switch keys, paste a new one and save. To go back to pasting a key on each tool screen, click Remove Saved Key.
Saving a key also turns on automatic alt text for new uploads, since that setting is on by default. To turn it off, see Turn on automatic alt text for new uploads.
The same page has Site Description, Live URL, and Tone Tags. Theme Setup uses them when it writes copy. You can leave them blank for the other AI tools.
What $5 a month gets you
These are rough estimates using each tool's recommended Model at current OpenRouter prices. Real costs change with image size, post length, and the model you pick.
| Task | About what each costs | About how many per $5 |
|---|---|---|
| Alt text for one image | Less than a hundredth of a cent | 20,000 or more |
| Focal point for one image | Less than a hundredth of a cent | 20,000 or more |
| Excerpt or SEO description for one post | About a tenth of a cent | 5,000 |
| Featured image suggestion for one post | A few hundredths of a cent | 10,000 |
| Documentation AI Fill from one PDF | Up to half a cent | 1,000 |
For example, writing alt text for a library of 1,000 images costs roughly 10 cents.
A pricier choice in the Model menu uses credits faster. The top models in the list cost 10 to 30 times more than the recommended one. Keep the recommended model unless the results aren't good enough. In Documentation AI Fill, Mistral OCR in PDF Parser also adds its own charge per page.