OpenRouter
Unified model aggregation with intelligent routing and competitive pricing.
The OpenRouter AI Provider (uno.anahata.asi.openrouter.OpenRouterAiProvider) connects your Anahata ASI container to openrouter.ai. Through a single API key, gain instant, native access to hundreds of frontier and open-source models from OpenAI, Anthropic, Google, Meta, DeepSeek, Mistral, and xAI (Grok).
Deep Metadata Discovery
Anahata's specialized OpenRouterModel automatically queries OpenRouter's /v1/models endpoint and discovers the true architectural specifications of every available model:
- Input Context Lengths: Maps
context_lengthandtop_provider.context_lengthdirectly tomaxInputTokens(from 8K up to 1M+). - True Output Modalities: Reads
architecture.output_modalitiescleanly, eliminating ambiguity between input perception and output response generation. - Native Function Calling: Automatically inspects
supported_parametersfortools, enabling Anahata's Java execution and workspace tools without manual toggling. - Sampling Defaults: Pre-seeds optimal temperature, top-p, and top-k values directly from the model creator's
default_parameters.
Provider-Specific Output Ceilings
Unlike generic OpenAI proxies that assume a static 4K or 16K output ceiling, OpenRouter reports the top provider's maximum single-turn completion capacity:
For long-generation models like Grok 4.6, top_provider.max_completion_tokens reveals up to 450,000 output tokens. Anahata ASI automatically captures this limit into maxOutputTokens and dynamically negotiates generation headroom during deep coding and architectural turns.
Live Benchmarks & Pricing Transparency
OpenRouter bundles live performance and economics directly into its model responses:
Anahata ASI extracts per-token prompt and completion costs and embeds them cleanly into model descriptions (e.g. [In: $2.00/M | Out: $6.00/M]). Live Artificial Analysis coding and intelligence benchmarks are rendered directly inside model tooltips and inspection cards.
1-Click Configuration
Getting started with OpenRouter in Anahata ASI takes seconds:
- Obtain an API key from openrouter.ai/keys.
- Open the AI Providers settings panel in Anahata ASI (NetBeans, Desktop, or IntelliJ).
- Select OpenRouter from the provider list and paste your API key into the Key Pool.
- Click Test Connection to instantly discover hundreds of models and start prompting!