Code RouterCode Router
User GuideAPI ReferenceAI ApplicationsHelp & SupportBusiness Cooperation

Project Introduction

An overview of Code Router, a unified, self-hostable, OpenAI-compatible AI gateway for reaching many model providers through one key and one base URL.

Overview

Code Router is a unified, OpenAI-compatible AI gateway (also called a relay). It puts a single entry point in front of many upstream model providers, so your applications can reach all of them through one API key and one base URL instead of juggling a separate key, SDK, and endpoint for each vendor.

Because the gateway speaks the OpenAI Chat Completions protocol, most existing tools, SDKs, and applications work by changing only the base URL and the key — no code rewrite required.

https://ai.sammier.com

OpenAI-compatible endpoint:

https://ai.sammier.com/v1

Code Router is a self-hostable gateway. The base URLs above are placeholders for this demo — replace them with your own deployment's address. (Public hosted endpoint, if any: TBD.)

What it does

One key, one base URL

Route requests to many model providers behind a single OpenAI-compatible endpoint.

Model groups

Bundle upstream models into named groups so callers request a stable name while you control what backs it.

Token groups & quotas

Issue API tokens, organize them into groups, and apply per-token or per-group quotas and limits.

Usage tracking

Record requests and token usage per key for visibility and accounting.

Core concepts

  • Unified OpenAI-compatible interface. A single API surface compatible with the OpenAI request/response format. Point your client at the gateway's base URL and use a Code Router API key.
  • Providers & channels. Each upstream provider is configured as a channel that holds its own connection settings. Provider credentials are configured at the gateway, not embedded in every client.
  • Model groups. Map a caller-facing model name to one or more upstream channels, which lets you swap or load-balance backends without changing client code.
  • Token groups & quotas. Group API tokens and attach quotas/limits so usage can be scoped and capped per token or per group.
  • Usage tracking. Per-key request and token-usage records for monitoring and accounting.

Specific supported providers and models depend entirely on the channels you configure in your own deployment. The exact built-in provider list for this demo is still being finalized (provider list TBD). You are responsible for legally obtaining and configuring any upstream API keys you use.

Who it's for

Code Router suits anyone who needs to consolidate access to multiple AI model providers behind one consistent interface — for example personal projects, internal team tooling, or private self-hosted deployments. It is intended for legally authorized use of upstream provider accounts and services.

Built on open source

Code Router is built on a mature, open-source AI-gateway codebase and is self-hostable. The source for this build lives in the project repository:

For licensing terms, refer to the LICENSE file in the source repository.

Status & feedback

Code Router is an early-stage demo. Operational details such as pricing, payment options, availability/uptime, and official support channels are not established yet (all TBD). Do not treat any example values in these docs as real commercial terms.

Code Router is provided "as is," without warranties of any kind. For questions, bug reports, or suggestions, open an issue in the source repository on GitHub. Other contact methods are not available at this time (TBD).

How is this guide?

Last updated on