How to integrate OpenRouter with 1-Click OpenClaw

Learn how to configure OpenRouter as your AI provider within the Hostinger 1-Click OpenClaw environment using simple CLI commands.

Updated 24 hours ago

The 1-Click OpenClaw solution at Hostinger provides a streamlined environment for deploying AI agents. By integrating it with OpenRouter, you can access a unified API for hundreds of LLMs. This setup is managed directly through the OpenClaw CLI, allowing you to authenticate and configure your models without manual file editing.

Pre-requisites

  • A Hostinger VPS running the 1-Click OpenClaw application.
  • An OpenRouter API Key (obtainable from openrouter.ai).
  • Access to your server via the CLI.

Step 1: Access the OpenClaw CLI

To manage your 1-Click instance, you need to use the dedicated command-line interface:

  1. Log in to your hPanel and navigate to the VPS section.
  2. Access your OpenClaw instance.
  3. Click on Dashboard.
  4. Click on Command line (CLI) button.

Step 2: Authenticate OpenRouter

Instead of manually editing JSON files, use the built-in authentication command to connect your OpenRouter account:

  1. In the CLI , run the following command:
    openclaw models auth login --provider openai-codex
  2. When prompted, enter your OpenRouter API Key.

 

Note: Ensure your key starts with sk-or- to be recognized correctly.

Step 3: Set OpenRouter as the Default Provider

After authenticating, you need to tell OpenClaw to use OpenRouter for its agent requests:

  1. Run the onboarding wizard:
    openclaw onboard
  2. Select OpenRouter from the list of available providers.
  3. Choose your preferred model (e.g., anthropic/claude-3.5-sonnet or google/gemini-pro-1.5).
  4. The CLI will automatically update your configuration and environment variables.

Step 4: Verify the Integration

To confirm that OpenClaw is successfully communicating with OpenRouter, run:

openclaw models list --provider openrouter

If the integration is successful, you will see a list of available models pulled directly from your OpenRouter account.

By utilizing the 1-Click OpenClaw CLI, you can integrate OpenRouter in seconds. This allows your AI agents to leverage the latest models with minimal configuration overhead, all within your optimized Hostinger VPS environment.

 

Notes:

  • Command Access: If the openclaw command is not recognized, ensure you are logged in as the root user.
  • Model IDs: When selecting models, use the full identifier provided by OpenRouter (e.g., openrouter/auto for automatic routing).
  • Reputation: If your connection to OpenRouter is timed out, verify that your VPS IP address is not being blocked by a firewall or flagged for a low reputation.