LLM Router for Openclaw

A unified LLM gateway providing a single OpenAI-compatible API to access over 70 different AI models from one interface.

0xjordansg-yolo
v1.0.0
Feb 6, 2026
5
2.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-aisa-llm-gateway

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-aisa-llm-gateway using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is LLM Router?

The LLM Router is a professional-grade gateway designed for autonomous agents and developers who need to consolidate their AI infrastructure. By replacing over 100 individual API keys with a single point of access, this skill allows for seamless switching between models like GPT-4, Claude 3.5, Gemini 2.0, Qwen, and Deepseek. It is built to enhance the capabilities of Openclaw Skills by providing a robust, OpenAI-compatible interface that simplifies multi-model integration.

Beyond simple access, the router provides a standardized layer for billing, cost tracking, and response formatting. This allows developers to focus on building intelligent workflows rather than managing fragmented API documentation or fluctuating provider-specific SDKs. It is the definitive solution for those looking to leverage the full spectrum of modern LLMs within a single, unified environment.

LLM Router Use Cases

  • Implement cost-optimized routing by directing simple queries to inexpensive models and complex tasks to high-end reasoning engines.
  • Create reliable fallback strategies that automatically switch to a secondary provider if the primary model encounters an error or rate limit.
  • Conduct model A/B testing and comparison to evaluate which AI provides the best response for specific specialized tasks.
  • Execute vision and multimodal analysis across different model families using a single standardized request format.
  • Select specialized models for niche tasks such as Deepseek for coding or Qwen for multilingual support within Openclaw Skills.

How LLM Router Works

  1. The user authenticates using a single AISA_API_KEY environment variable.
  2. A request is sent to the unified endpoint specifying the target model name in the JSON payload.
  3. The router interceptor identifies the provider and translates the request into the native format required by the specific AI model.
  4. The response is normalized back into an OpenAI-compatible structure, including unified usage and cost metadata.
  5. The integrated client allows for either synchronous completion or real-time streaming via Server-Sent Events.

LLM Router Setup

To begin using the LLM Router within your Openclaw Skills environment, configure your API key as follows:

export AISA_API_KEY="your-key"

You can then verify the setup by listing available models using the provided Python utility:

python3 scripts/llm_router_client.py models

LLM Router Data Schema & Taxonomy

The skill organizes its interactions using a strictly OpenAI-compatible schema to ensure maximum interoperability.

Attribute Type Description
model string The specific model identifier (e.g., gpt-4o, claude-3-opus)
messages array A list of role-based message objects (system, user, assistant)
usage.cost float The calculated cost of the transaction in USD
usage.total_tokens integer The sum of prompt and completion tokens used

All metadata, including remaining credits and per-model pricing, is returned in the response headers or the usage object of the JSON response.

LLM Router Advanced Features

  • Support for multi-modal vision analysis allowing image data to be processed by any vision-capable model.
  • Native function calling and tool definitions to enable agents to interact with external APIs structuredly.
  • Built-in streaming support using Server-Sent Events (SSE) for high-performance, low-latency user interfaces.
  • Automatic response caching and latency monitoring for optimized agent performance.
  • Comprehensive Python SDK that operates using only standard libraries, ensuring zero-dependency integration for Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins curlpython3
Github Stars: 0
forks: 0