OpenRouter
The OpenRouter integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to use the OpenRouter API as a conversation agent in Home Assistant.
This integration provides a way to interact with a wide range of AI models available on OpenRouter, while billing is handled by OpenRouter. You can even use your own third-party (like OpenAI) API key.
Configuration
To add the OpenRouter service to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select OpenRouter.
-
Follow the instructions on screen to complete the setup.
Generate an API Key
The API key is used to authenticate requests to OpenRouter. To generate an API key take the following steps:
- Log in to OpenRouter or sign up for an account.
- Go to the API Keys section in your account settings.
- To generate a new key, select Create API Key.
- Give the key a name, and be sure to set up billing limits.
Supported functionality
Generating data with AI
The OpenRouter integration allows you to generate data using AI models available on OpenRouter. You can use this functionality in automations, scripts, or directly in the Home Assistant UI.
Removing the integration
This integration follows standard integration removal, no extra steps are required.
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- Next to the entry you want to remove, select the three dots
menu. Then, select Delete. - Depending on the integration, the entries are listed under one of the following headings:
- Devices
- Hubs
- Services
- Integration entries
- Depending on the integration, the entries are listed under one of the following headings:
- To confirm, select Delete.
- Home Assistant also deletes the devices and entities of the entry.
- If Home Assistant asks you to restart, restart Home Assistant.
- If Home Assistant asks whether to also delete the application credentials, select Remove or Keep.
- If you keep them, Home Assistant uses them automatically when you add the integration again.
- To delete them later, refer to Deleting application credentials.