Skip to content

OpenRouter key

OpenRouter gives one API for many AI models. NulSEO uses it for:

  • Vespa, the in-app SEO assistant (Assistant in the sidebar);
  • website research during AI visibility setup;
  • Prompt Research relevance filtering and generated prompt suggestions.

AI answers themselves (in Prompt Tracking, Prompt Explorer and Brand Lookup, including Claude and Perplexity) come from DataForSEO, not OpenRouter. The AI visibility pages still need the OpenRouter key before you can set them up.

The key is optional otherwise. Keyword research, audits, rank tracking, Local SEO and the Google integrations all work without it, and features that need it explain what is missing.

OpenRouter bills your account directly, pay-as-you-go. NulSEO records that spending; by default OpenRouter has no cap, but the Owner can set one. See Spend caps and usage.

Get your key#

  1. Create an account at openrouter.ai and add funds.
  2. Open OpenRouter API Keys and click Create API Key.
  3. Copy the key. It is shown only once.

You can set a spending limit on the key itself in OpenRouter as a second safety net, or leave it unlimited and rely on NulSEO's cap.

Add it to NulSEO#

Put it in .env.selfhost and deploy:

OPENROUTER_API_KEY=sk-or-...
pnpm deploy:selfhost --yes

Or set it in the Cloudflare dashboard#

  1. In Cloudflare, go to Compute → Workers & Pages and open your NulSEO Worker.
  2. Open Settings → Variables & Secrets.
  3. Add a secret named OPENROUTER_API_KEY and paste the key.

Or from a terminal in your NulSEO checkout:

npx wrangler secret put OPENROUTER_API_KEY

Keep .env.selfhost up to date too, so the next deploy does not put back an old value.

Optional settings#

VariableWhat it does
OPENROUTER_MODELChoose the model Vespa uses. Leave it unset for the default.
OPENROUTER_BASE_URLUse another provider with an OpenRouter-compatible API. Leave it unset for OpenRouter.

Check it works#

Open Assistant in a project and ask it a question. If it says the key is missing, check the secret name and redeploy.