--- title: Using OpenRouter API Key in LobeChat description: >- Learn how to integrate and utilize OpenRouter's language model APIs in LobeChat. Follow these steps to register, create an API key, recharge credit, and configure OpenRouter for seamless conversations. tags: - OpenRouter - LobeChat - API Key - Web UI --- # Using OpenRouter in LobeChat {'Using [OpenRouter](https://openrouter.ai/) is a service that provides a variety of excellent large language model APIs, supporting models such as OpenAI (including GPT-3.5/4), Anthropic (Claude2, Instant), LLaMA 2, and PaLM Bison. This document will guide you on how to use OpenRouter in LobeChat: ### Step 1: Register and Log in to OpenRouter - Visit [OpenRouter.ai](https://openrouter.ai/) and create an account - You can log in using your Google account or MetaMask wallet {'Register ### Step 2: Create an API Key - Go to the `Keys` menu or visit [OpenRouter Keys](https://openrouter.ai/keys) directly - Click on `Create Key` to start the creation process - Name your API key in the pop-up dialog, for example, "LobeChat Key" - Leave the `Credit limit` blank to indicate no amount limit {'Create - Copy the API key from the pop-up dialog and save it securely {'Get Please store the key securely as it will only appear once. If you lose it accidentally, you will need to create a new key. ### Step 3: Recharge Credit - Go to the `Credit` menu or visit [OpenRouter Credit](https://openrouter.ai/credits) directly - Click on `Manage Credits` to recharge your credit, you can check model prices at [https://openrouter.ai/models](https://openrouter.ai/models) - OpenRouter provides some free models that can be used without recharging {'Recharge ### Step 4: Configure OpenRouter in LobeChat - Visit the `Settings` interface in LobeChat - Find the setting for `OpenRouter` under `Language Models` - Enable OpenRouter and enter the API key you obtained {'Configure - Choose an OpenRouter model for your assistant to start the conversation {'Use You may need to pay the API service provider during usage, please refer to OpenRouter's relevant fee policies. You can now engage in conversations using the models provided by OpenRouter in LobeChat.