The Testing Academy · Guides OpenRouter · API key · credits
Guide · 3 min video · watch and follow

How to get an OpenRouter key and add credits

One account, one key, a few dollars of credit, and you can call hundreds of models (DeepSeek, Claude, Qwen and more) through a single API. Watch the video first, then follow the steps.

01

Go to OpenRouter

Visit the official site: openrouter.ai. One key here works across every model they route to.

02

Sign up or log in

  • Use Google or GitHub to sign in. No separate password needed.
03

Generate the API key

  1. After login, go to the Keys / API Keys section.
  2. Click New Key.
  3. Give it a name (for example, Demo).
  4. Copy the key immediately. You will not see it in full again.

Keep the key secret. Never commit it to a repo or paste it in chat.

04

Add credits (important)

OpenRouter is not fully free:

  • Go to Billing.
  • Add a small amount of credit (something like $5 goes a long way).
  • Some models are very cheap (DeepSeek and friends).
  • Make sure the card you use has international e-commerce transactions enabled.
05

Use the key

In your project or VS Code, export it in the terminal:

export OPENROUTER_API_KEY="your_api_key_here"

Or put it inside a .env file:

OPENROUTER_API_KEY=your_api_key_here
06

Reference links