Skip to main content
View on GitHub → One gateway for many LLMs. Route agent requests across OpenAI-compatible models through AIsa with a single API key.

Install

Start a new agent session after installing so the skill loads.

What can agents do with it?

Model matching

Pick a model based on task type and constraints.

Provider coverage

Route across GPT, Claude, Gemini, Qwen, DeepSeek, Grok, and more.

Cost-aware routing

Choose cheaper models when quality needs allow it.

Fallback planning

Suggest alternates when a model is unavailable.

🔥 What Can You Do?

Multi-Model Chat

Model Comparison

Vision Analysis

Cost Optimization

Fallback Strategy

Why LLM Router?

Supported Model Families

Note: Model availability may vary. Check aisa.one/models for the full list of currently available models and pricing.

Quick Start

API Endpoints

OpenAI-Compatible Chat Completions

Request

Parameters

Message Format

Response

Streaming Response

Streaming returns Server-Sent Events (SSE):

Vision / Image Analysis

Analyze images by passing image URLs or base64 data:

Function Calling

Enable tools/functions for structured outputs:

Google Gemini Format

For Gemini models, you can also use the native format:

Python Client

Installation

No installation required - uses standard library only.

CLI Usage

Python SDK Usage

Use Cases

1. Cost-Optimized Routing

Use cheaper models for simple tasks:

2. Fallback Strategy

Automatic fallback on failure:

3. Model A/B Testing

Compare model outputs:

4. Specialized Model Selection

Choose the best model for each task:

Error Handling

Errors return JSON with error field:
Common error codes:
  • 401 - Invalid or missing API key
  • 402 - Insufficient credits
  • 404 - Model not found
  • 429 - Rate limit exceeded
  • 500 - Server error

Best Practices

  1. Use streaming for long responses to improve UX
  2. Set max_tokens to control costs
  3. Implement fallback for production reliability
  4. Cache responses for repeated queries
  5. Monitor usage via response metadata
  6. Use appropriate models - don’t use GPT-4 for simple tasks

OpenAI SDK Compatibility

Just change the base URL and key:

Pricing

Token-based pricing varies by model. Check aisa.one/models for current rates. Every response includes usage.cost and usage.credits_remaining.

Full API Reference

See API Reference for complete endpoint documentation.

Get started

  1. Sign up at aisa.one and create an API key in the console.
  2. Set it in your shell: export AISA_API_KEY="your-key".
  3. Install the skill with one of the commands under Install, then start a new agent session.

Model Catalog

Browse supported model IDs and families.

Compare models

Compare models before routing production traffic.

AIsa CN-LLM Route

Chinese-language model routing.