Skip to main content

OpenRouter

Prefer guided AI setup?

Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.

Overview​

Connect your OpenRouter account to Nirvai to access multiple AI models from different providers through a single unified API. OpenRouter supports models from OpenAI, Anthropic, Google, Meta, and many more.

Supported Authentication Methods​

  • API Key - Required

Prerequisites​

  • An OpenRouter account
  • Credits or payment method added

Setup Instructions​

Step 1: Create an OpenRouter Account​

  1. Go to OpenRouter
  2. Sign up or log in to your account

Step 2: Generate an API Key​

  1. Navigate to the API Keys page
  2. Click Create new secret key
  3. Optionally, name your key (e.g., Nirvai Integration)
  4. Copy the API key immediately

Step 3: Add to Nirvai​

  1. In Nirvai, go to create a new OpenRouter credential
  2. Paste your API key in the API Key field
  3. Save the credential

Features​

OpenRouter provides:

  • Multi-model access: Use models from various providers
  • Automatic fallbacks: Configure backup models
  • Cost optimization: Compare prices across providers
  • Usage tracking: Monitor spending per model

Available Providers​

Access models from:

  • OpenAI (GPT-4, GPT-3.5)
  • Anthropic (Claude)
  • Google (Gemini)
  • Meta (Llama)
  • Mistral
  • And many more

Troubleshooting​

API Key Not Working​

  • Verify you copied the complete key
  • Check your account has credits available
  • Ensure the key hasn't been revoked

Model Not Available​

  • Some models require additional credits
  • Check model availability on OpenRouter dashboard

Rate Limit Errors​

  • Review your usage limits
  • Consider adding more credits

Documentation adapted for Nirvai platform


Next Steps​

Got your credential? Connect it to an agent

Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.