Assistant Billing

Gateway as a Platform

Assistant Billing

Build and run your own AI gateway with built-in billing. Open-source infrastructure for routing, payments, analytics, and a React component library for your customer-facing frontend.

OpenAI and Anthropic APIs

$ curl https://gateway.assistant-billing.dev/v1/chat/completions \
  -H "Authorization: Bearer sk_ab_..." \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'

Features

Multi-Provider Routing

Route to 100+ AI models across OpenAI, Anthropic, Google, and more. Priority, round-robin, cost-optimized, or latency-based strategies with automatic failover.

Two-Level Billing

Separate balances for you and your customers. Stripe integration, per-request cost deduction, configurable markup and platform fees.

Customer Management

Identify customers by external reference — bring your own auth. Track balances, usage, and transactions per customer or team.

Frontend Components

@assistant-billing/react provides headless React primitives for wallet, API keys, and provider management. Built-in SSR support.

Real-Time Analytics

Per-request logging with cost, latency, token usage, and cache status. Daily aggregation for dashboard charts.

Open Source

Self-host the entire stack. Next.js dashboard, Cloudflare Workers APIs, PostgreSQL. Deploy anywhere.