Tools & Ecosystem

AI Task Router

One lightweight interface for AI Badgr, OpenAI, and Anthropic. Reduce integration overhead, optimize costs, and ensure reliability.

One lightweight interface for AI Badgr, OpenAI, and Anthropic. Reduce integration overhead, optimize costs by defaulting to Badgr, and ensure reliability with automatic fallback.

Multi-provider support

Seamlessly switch between AI Badgr, OpenAI, and Anthropic.

Streaming & embeddings

Full support for streaming responses and embedding models.

Observability hooks

Built-in hooks for logging, monitoring, and analytics.

Installation
npm install @aibadgr/router
Quick Start
import { Router } from '@aibadgr/router';

const router = new Router({
  defaultProvider: 'aibadgr',
  apiKey: process.env.AIBADGR_API_KEY,
  fallback: ['openai', 'anthropic']
});

const response = await router.chat.completions.create({
  model: 'gpt-3.5-turbo',
  messages: [{ role: 'user', content: 'Hello!' }]
});