> For the complete documentation index, see [llms.txt](https://help.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.botpenguin.com/settings/integrations/openrouter.md).

# OpenRouter

### What is OpenRouter?

OpenRouter is a unified API platform that gives you access to a wide range of AI models from different providers — all through a single integration. By connecting OpenRouter to BotPenguin, you can choose which AI model powers your chatbot, whether that is GPT-4, Claude, Mistral, Llama, or any other model available on the OpenRouter platform.

***

### When Should You Use This?

Use this integration when:

* You want to power your AI chatbot with a specific AI model of your choice
* You need flexibility to switch between different large language models (LLMs) without changing your bot setup
* You are trying to optimise cost or performance by selecting the right model for your use case

***

### Benefits of OpenRouter

* 🤖 Access a wide selection of AI models through a single API key
* 🔄 Switch between models without rebuilding your bot
* 💰 Control costs by choosing models that fit your budget and performance needs
* ⚡ Reduce vendor dependency with a model-agnostic setup
* 🎯 Fine-tune chatbot behaviour by selecting the best model for your specific use case

***

### Expected Outcome

After setting this up:

* Your BotPenguin chatbot will be powered by the AI model you select via OpenRouter
* You will have the flexibility to change models from one place without reconfiguring your bot
* AI responses will be generated through OpenRouter's API using the credits in your account

{% hint style="info" icon="lightbulb" %}
Tip: Test your chatbot after connecting OpenRouter to confirm the selected model is responding correctly before going live.
{% endhint %}

***

### 🔐 Prerequisites

Before setting up this integration, ensure you have:

* An active OpenRouter account ([openrouter.ai](https://openrouter.ai/))
* A generated OpenRouter API key
* **Credits added to your OpenRouter account** — a minimum payment of **$5** is required for the API key to function
* Admin access to your BotPenguin account

{% hint style="warning" icon="triangle-exclamation" %}
Your API key will not work without credits added to your OpenRouter account. Complete the billing setup before proceeding.
{% endhint %}

***

### How to Set Up OpenRouter

#### Part 1 — Generate Your OpenRouter API Key

1. Go to [openrouter.ai](https://openrouter.ai/) and click **"Sign Up"** or **"Sign In"** to access your account.

<figure><img src="/files/hwb8a5Il0zeR5Ugs9jqs" alt=""><figcaption></figcaption></figure>

2. Once signed in, navigate to the API Keys section. You will see a button to **"Create API Key"** — click it.

<figure><img src="/files/a0mtFIjEVWYTcTk97wSN" alt=""><figcaption></figcaption></figure>

3. Enter a name for your key and set an expiry duration. Expiry can be set anywhere between 1 hour and 180 days.

<figure><img src="/files/L9wjS7fkGCreuHTFPhlP" alt=""><figcaption></figcaption></figure>

4. Click **"Create API Key"**. Copy the key displayed on the screen immediately — it will not be shown again.

<figure><img src="/files/aEwhPQEApl10LdhYJxG5" alt=""><figcaption></figcaption></figure>

***

#### Part 2 — Add Credits to Your OpenRouter Account

{% hint style="warning" icon="triangle-exclamation" %}
⚠️ Your API key will not work until credits are added. This is a mandatory step.
{% endhint %}

5. In the left sidebar of OpenRouter, go to **"Credits"**.

<figure><img src="/files/UXX7b1hmZwldb6AurX6O" alt=""><figcaption></figcaption></figure>

6. Click **"Add Credits"**. If you have not set up a billing account yet, follow the on-screen steps to create one and add your payment card.

<figure><img src="/files/cEgMrwIIBWhbOWgyTjHY" alt=""><figcaption></figcaption></figure>

7. OpenRouter requires a **minimum payment of $5** to load credits. Complete the payment as prompted.

***

#### Part 3 — Connect OpenRouter in BotPenguin

8. In your BotPenguin Customer Panel, click **"More"** from the left sidebar, then select **"Integrations"**. Locate **"OpenRouter"** from the integrations list and click **"Connect"**.

<figure><img src="/files/c4fJU6BKOQKLQUflUktM" alt=""><figcaption></figcaption></figure>

10. Click **"Connect"** to begin setting up the integration.

<figure><img src="/files/wdYUPrE7xH0SBmHEUq4f" alt=""><figcaption></figcaption></figure>

11. Enter a **Configuration Name** (this can be any label you choose) and paste the **API key** you copied in Step 4.

<figure><img src="/files/WYhuVFyQnqoLjBrFVu7a" alt=""><figcaption></figcaption></figure>

11. Click **"Save"** to complete the connection.

<figure><img src="/files/O6Yu3RpCVOZmUjcGAHFu" alt=""><figcaption></figcaption></figure>

***

### ⚙️ Configuration Options

| Field                  | Description                                              |
| ---------------------- | -------------------------------------------------------- |
| **Configuration Name** | A label to identify this API key setup. Can be any name. |
| **API Key**            | The API key generated from your OpenRouter account.      |

***

### 🚫 Limitations

* The API key will not function without active credits in your OpenRouter billing account
* API key expiry is set at creation time (1 hour to 180 days) and cannot be extended — a new key must be created after expiry
* Model availability depends on what OpenRouter currently supports; not all models may be available at all times
* Response quality and speed vary depending on the model selected

***

### Best Practices

> 💡 Always add sufficient credits before going live — running out mid-conversation will cause the chatbot to stop responding.

> ⚠️ Set a longer API key expiry (e.g., 90–180 days) for production environments to avoid unexpected disconnections.

> 🔄 Keep a note of your API key expiry date and rotate keys proactively before they expire.

> 🎯 Test with a lower-cost model first to validate your setup before switching to premium models.

***

### Troubleshooting

<details>

<summary>API key is not working after setup</summary>

Ensure credits have been added to your OpenRouter billing account. An API key without credits will be rejected by OpenRouter's API.

</details>

<details>

<summary>Integration not connecting in BotPenguin</summary>

Double-check that the API key was copied correctly with no extra spaces. Try regenerating the key in OpenRouter and reconnecting.

</details>

<details>

<summary>Chatbot not responding after integration is connected</summary>

Verify that the correct model is selected in your bot's AI settings. Also confirm your OpenRouter credits have not been exhausted.

</details>

<details>

<summary>API key expired</summary>

Generate a new API key from your OpenRouter account and update the configuration in BotPenguin's Integrations panel.

</details>

***

### FAQs

<details>

<summary>Do I need to add credits to use OpenRouter?</summary>

Yes. OpenRouter requires a minimum payment of $5 to activate credits on your account. Without credits, your API key will not function regardless of the integration setup.

</details>

<details>

<summary>How long can I set my API key expiry for?</summary>

You can set the expiry anywhere between 1 hour and 180 days at the time of key creation. The expiry cannot be changed after the key is created — you will need to generate a new key.

</details>

<details>

<summary>Can I have multiple OpenRouter configurations in BotPenguin?</summary>

Yes. You can add multiple configurations using different API keys. Each configuration can be named separately for easy identification.

</details>

<details>

<summary>What AI models can I access through OpenRouter?</summary>

OpenRouter provides access to a wide range of models including GPT-4, Claude, Mistral, Llama, and others. Model availability may vary — check the OpenRouter platform for the current list.

</details>

<details>

<summary>What happens when my OpenRouter credits run out?</summary>

Once credits are exhausted, API calls will fail and your chatbot will stop generating AI responses. Top up your OpenRouter billing account to restore functionality.

</details>

<details>

<summary>Can I reconnect OpenRouter if I change my API key?</summary>

Yes. Go to More → Integrations → OpenRouter, remove the existing configuration, and add a new one with the updated API key.

</details>

<details>

<summary>Does this integration require any coding?</summary>

No. The entire setup is done through BotPenguin's no-code integrations panel and the OpenRouter dashboard.

</details>

***

### Support

If you still have questions for our team, write to us at [**support@botpenguin.com**](mailto:support@botpenguin.com). We'll get back to you within 48 hours.

***

🎉 Congratulations, you have successfully connected OpenRouter to BotPenguin! Your chatbot is now ready to run on your chosen AI model.
