How to get your OpenRouter API key, step by step

Create an OpenRouter account, add credit, and make a safe API key with a 30-day expiry and a spending limit. Takes about two minutes.

DeepRit writes using your own AI account, through a service called OpenRouter. You pay OpenRouter directly for exactly what you use, and DeepRit adds nothing on top. You only need to set this up once a month at most, and it takes about two minutes.

What you'll need

  • An email address or Google account.
  • A card or another payment method that OpenRouter accepts, to add a little credit.

Step 1: Create an OpenRouter account

Go to openrouter.ai and sign up. It's one account that connects to many AI models, so you can switch models later without signing up anywhere else.

Step 2: Add a little credit

Open Credits and add an amount you're comfortable with. Start small, because you can always add more. In DeepRit, each request shows what it cost, so you'll quickly see how far it goes.

Step 3: Create the key

Open Keys and press Create. Name it DeepRit, so you'll recognize it later.

Step 4: Protect the key

This is the important part. Before you create it, set two things:

  • Expiration: 30 days. A key that expires can't be misused forever, even if it leaks.
  • Credit limit. Set a monthly amount you'd be happy to spend. If something ever goes wrong, spending stops at that limit.

When the key expires, you create a new one and paste it in. DeepRit warns you when it's about to run out.

Step 5: Copy it and paste it into DeepRit

OpenRouter shows the key only once, so copy it straight away. It starts with sk-or-.

In DeepRit, open AI key and model from your profile menu, paste the key and press Save key. DeepRit checks it with OpenRouter before saving it.

Choosing a model

The same page lists the models you can use, with the price of each. You can change them whenever you like. Cheaper models are fine for short posts, and stronger ones are worth it for long or careful writing. Images have their own model setting.

How your key is kept safe

  • It's encrypted before it's stored, with a secret that isn't kept in the database.
  • It's never shown again, and it's never sent back to your browser. You'll only see its last four characters.
  • You can delete it from DeepRit whenever you like, with one click.
  • To cancel it completely, also delete it on the Keys page at OpenRouter.

Treat your key like a password. Don't share it or paste it into email or chat. If you think it has been exposed, delete it on OpenRouter right away and create a new one.

Common problems

"OpenRouter didn't accept that key." Check that you copied the whole key, including sk-or-. If it's lost, create a new one, because OpenRouter won't show it again.

"Your OpenRouter account is out of credits." Add credit, or raise the key's limit on OpenRouter.

"OpenRouter rejected your key." It has probably expired. Create a new one and paste it in.

"This model isn't available." Choose another in AI key and model. Models come and go on OpenRouter.

On a team?

If you're on someone's Pro team, you can write on the owner's key without adding your own. You're also welcome to add your own, and DeepRit will use that one for your writing.

Build a writer in one sentence.