Skip to content

Getting an API Key

claude edited this page Nov 10, 2026 · 1 revision

Getting an API key: What an API key is, how to get one, and how to keep it safe.

Getting an API key

Preen needs an API key to work. This page shows what that is, how to get one, and how to keep it safe.

What is an API key?

An API key is a long password for a program. Your provider gives it to you. When Preen asks the provider to sort a message, it shows the key. That tells the provider who is asking, and whose account to charge.

Preen has no account of its own. You make an account with a provider. You use your own key.

Preen works with two providers:

  • OpenRouter
  • TypeSafe

You only need one. Pick the one you want in Preen's settings under Provider & cost.

Make a key at OpenRouter

  1. Go to the OpenRouter website. Make an account, or sign in.
  2. Open the keys page: openrouter.ai/keys.
  3. Click the button to create a key.
  4. Give the key a name. Use a name like "Preen" so you know what it is for.
  5. Choose a credit limit. This is the most the key can spend. A small limit is a good start. OpenRouter suggests a limit on every key.
  6. Create the key, then copy it. Keep it private. If you lose it, make a new one.

OpenRouter's own API keys guide is the official source. Its website may change; if it differs from this page, follow OpenRouter's.

Make a key at TypeSafe

TypeSafe makes Jev, the model Preen uses. You can also get a key from TypeSafe directly.

  1. Make an account, or sign in, at the TypeSafe console.
  2. Open the keys page: console.typesafe.ai/keys.
  3. Create a key and copy it.
  4. Put it in Preen the same way as below, and choose TypeSafe as the provider.

TypeSafe's own Quick start is the full, official guide. Its steps may change; if they differ from this page, follow TypeSafe's.

Put the key in Preen

  1. In Thunderbird, open Preen's settings.
  2. Go to Provider & cost.
  3. Pick your Provider.
  4. Paste the key in the API key box.
  5. Click Test connection.

Thunderbird may ask if Preen can contact the provider. Say yes.

Test connection sends one tiny yes/no question. It sends no mail. If it works, Preen shows the model name and a "Connected" message. If it fails, see Troubleshooting.

Your key is saved on your computer in your Thunderbird profile. It is not encrypted. Preen sends it only to your provider.

After that, Preen asks you to agree to send mail to the provider. Read the note and choose. See Getting started.

What does it cost?

Preen has no fee of its own. Your provider charges you each time Preen asks it to sort a message. You pay the provider, not Preen.

How much you pay depends on:

  • the provider and the model you use,
  • how many messages you sort,
  • how much of each message Preen sends. Deep sends part of the text and costs a bit more than Surface.

We do not list prices here. Prices change. Look at your provider's price page.

Preen can show you a dollar estimate:

  1. Click Test connection.
  2. If your provider reports the cost of the test, Preen fills in the Price per million input tokens for you.
  3. Preen then shows a line like "about $X per 100 emails and $Y per 1,000 emails". These are estimates, not bills. Your provider's bill is the real cost.

If your provider does not report a cost, you can type the price yourself. See Costs and limits.

Keep your key safe

  • Make a key just for Preen. Do not use the same key for other things. If you stop using Preen, delete the key.
  • Set a spending limit at your provider. If the key leaks, it can only spend that much.
  • Set a limit inside Preen too. Use Messages per day and Estimated monthly cost limit in the settings.
  • Do not share the key. Do not put it in emails or screenshots.
  • Be careful with exported settings. Preen leaves your key out of a settings file. If you tick Include my API key, the file holds the key in plain text.
  • If you think the key leaked, delete it at your provider and make a new one. Paste the new one in Preen.

Next

Clone this wiki locally