Skip to main content
Infrastructure Layer

Intelligent AI Routing

One unified API. A curated, live model list. Automatic task-to-model matching based on capability scoring, tier, and budget constraints.

Three Routing Tiers

The models below are the ones the router is serving right now, read live from the API. The set can change without notice.

Economy

Fast, cheap inference for high-volume agent tasks: summaries, simple Q&A, structured extraction.

  • google/gemini-3.1-flash-lite$0 listed input rate
  • deepseek/deepseek-v4-flash$0.2/M in

Mid

Balanced capability for tool use, coding, and multi-step reasoning at reasonable cost.

  • minimax/minimax-m2.5$0.3/M in
  • qwen/qwen3-coder$0.3/M in
  • openai/gpt-5-mini$0.3/M in
  • google/gemini-3-flash-preview$0.3/M in
  • moonshotai/kimi-k2.6$0.3/M in

Premium

Highest-capability tier for complex reasoning, agentic workflows, long-context tasks, and highest-stakes outputs.

  • anthropic/claude-sonnet-4.5$2/M in
  • openai/gpt-5.1$2/M in
  • openai/gpt-5.1-codex-max$2/M in
  • anthropic/claude-opus-4.7$2/M in

Prices are SwarmSync's listed per-model rates per million tokens and may differ from what a provider charges directly. You pay the listed rate plus an 8% SwarmSync fee.

How It Works

Automatic Model Selection

Pass model: "auto" and the router scores your task across 8 capabilities, matches the task profile to each model's strength vector, and picks the best-fit model within your tier.

8-Dimension Capability Scoring

Every model has a strength vector across coding, reasoning, creative writing, structured output, long context, conversation, tool use, and multilingual. Routing is dot-product similarity.

Budget-Aware Routing

Set a budget cap on your agent and the router automatically stays within economy or mid tier. Premium models are only selected when the task score exceeds your tier threshold.

Direct Model Pinning

Need a specific model? Pin it directly with a model ID exactly as listed by GET /v1/models. The router passes through pinned requests without scoring overhead.

A Curated Set of Models

Direct-provider models behind one unified OpenAI-compatible API. The exact set changes over time and is always listed at GET /v1/models. Switch providers without changing your agent code.

Streaming + Tool Use

Full support for streaming responses and function calling across all compatible models. The router respects tool-use capability flags and never routes tool-use tasks to models that don't support them.

8 Task Dimensions

The router classifies every prompt across these dimensions, then finds the model whose strength vector best matches the task profile.

Coding
Reasoning
Creative Writing
Structured Output
Long Context
Conversation
Tool Use
Multilingual

API Surface

Drop-in OpenAI-compatible. Works with any SDK that targets the OpenAI API.

POST
/v1/chat/completions

OpenAI-compatible chat completions with auto-routing

GET
/v1/models

List all available models with tier, pricing, and capabilities

POST
/v1/route

Preview which model would be selected for a given prompt (no LLM call made)

GET
/v1/auth/keys

List routing API keys for your account (requires auth)

GET
/v1/usage

Usage stats and cost summary for this API key

Quick Start

Use any OpenAI-compatible client. Set model: "auto" to enable intelligent routing.

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.swarmsync.ai/v1',
  apiKey: process.env.SWARMSYNC_ROUTING_KEY,
});

const response = await client.chat.completions.create({
  model: 'auto',          // auto-routes to best model
  // model: 'economy',    // → economy tier (same as swarmsync/budget)
  // model: 'premium',    // → premium tier (same as swarmsync/performance)
  messages: [{ role: 'user', content: 'Your prompt here' }],
});

One API Key. One Endpoint.

Get a routing key from your console settings and start calling a curated set of models through a single OpenAI-compatible endpoint.