Skip to content
alkalinesPublic

About

An OpenRouter alternative, made to have a better ChatUI and integrations.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Radium

One gateway for your models, providers, and AI applications.

Radium is an open-source AI gateway and chat platform designed to run on your own infrastructure. It combines an OpenAI-compatible API, a capable AI chatroom, and detailed generation telemetry in one deployable system.

Radium is under active development. The Chat Completions compatibility layer is available today, but it does not yet cover every OpenAI API or parameter.

The Radium Platform

Radium Gateway

Connect AI applications to a single OpenAI-compatible endpoint while Radium handles the providers behind it.

  • Route streaming and non-streaming chat completions across configured models and providers.
  • Configure workspace-local provider endpoints, model mappings, and bring-your-own provider credentials through Convex Secret Store.
  • Use the shared model catalogue while each workspace controls provider availability, pricing, context limits, and supported parameters.
  • Issue hashed, workspace-scoped rad-sk-... API keys.
  • Record token usage, generation cost, time to first token, and completion duration as operational estimates; Radium does not charge or require prepaid credits.

Radium currently exposes:

POST /api/openai/v1/chat/completions
GET  /api/openai/v1/models

Explore the Gateway API

Radium Chatroom

Use the same gateway through Radium's built-in chat experience. The Chatroom supports persistent conversations, model and provider selection, reasoning controls, configurable tools, and user-connected MCP servers.

Each signed-in user can own multiple personal workspaces. Owners manage the workspace configuration and credentials; explicit members can use its configured models and shared chats while their personal chats remain private. The Chatroom and public Gateway API share workspace configuration, credentials, usage records, and the internal completion pipeline.

See how requests move through Radium Read the Chatroom ownership model

Radium Telemetry

The new telemetry system gives each generation an inspectable execution trace. It records request status, provider and model selection, timing, token usage, generation steps, and tool calls. Traces and spans can be explored in the Gateway UI.

Telemetry is opt-in per workspace. Input recording and output recording are separate controls, general Gateway telemetry is owner-only, and private chat records are filtered from owner views. Deployments can optionally export traces to an OTLP/HTTP collector.

Configure telemetry export

Self-Hosted By Design

The repository contains intended full-image and frontend-only container paths for self-hosting. Those container and release paths are currently blocked and unverified pending the workspace-layout audit; do not treat the command below as a working quickstart until that task is resolved. The verified development path uses the website package and Convex Cloud described below.

Intended full-image invocation (currently blocked/unverified):

SECRET_STORE_KEYS="1:$(openssl rand -base64 32)" \
docker compose up --build

The intended full image would deploy the bundled Convex functions at startup and persist backend state in a Docker volume; this behavior is not currently a verified release path.

Read the deployment guide

Future Direction

The following offerings are planned and are not available yet:

  • Radium Membership: a program for people and teams operating their own Radium deployments, with a simpler path from setup to ongoing use.
  • Radium Enterprise: an enterprise-grade offering focused on larger organizations, operational requirements, and managed deployment needs.

The open-source, self-hostable foundation remains central to Radium.

Technology

Radium is built with TanStack Start, React 19, Convex, AI SDK, Better Auth, Tailwind CSS, shadcn/ui, and Bun.

Local Development

Prerequisites

  • Bun
  • A Convex account and deployment
  • Credentials for at least one supported AI provider

Quick Start

  1. Install dependencies and create the frontend environment file.

    bun install
    cp apps/web/.env.example apps/web/.env.local
  2. Link or create a Convex development deployment from the backend package.

    bun run --cwd packages/backend dev
  3. Configure the required Convex runtime values from packages/backend/.env.example using the deployment guide. Set VITE_CONVEX_URL and VITE_CONVEX_SITE_URL in apps/web/.env.local to this deployment's client and HTTP origins.

  4. In another terminal, start the web application.

    bun run --cwd apps/web vite:dev
  5. Open http://localhost:3000 and create an account.

The application provisions a personal workspace after sign-in. The workspace owner can import a provider, configure its credentials, and issue API keys under Gateway. No balance record or initial credit value is required for new BYOK operation. Owners can add existing Better Auth users directly as workspace members; there is no invitation-acceptance flow.

After initial configuration, bun run dev starts Vite, Convex, the component build watcher, and the Worker source watcher together. Enroll the local Worker first using Worker setup. The Worker watcher restarts the process on imported file changes; without enrollment its startup reports an error while the other development processes continue.

Try The API

OpenAI-compatible endpoints are served from VITE_CONVEX_SITE_URL:

curl "$VITE_CONVEX_SITE_URL/api/openai/v1/chat/completions" \
  -H "Authorization: Bearer $RADIUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-slug",
    "messages": [{ "role": "user", "content": "Hello" }],
    "stream": false
  }'

Documentation

Commands

Command Purpose
bun run dev Build/watch components, start Vite, Convex, and the restarting Worker watcher
bun run dev:worker Watch and restart an enrolled Worker; see Worker setup
bun run build:components Build local Convex component packages from checked-in bindings
bun run codegen Generate Worker bindings, build the package, then generate backend bindings
bun run --cwd apps/web vite:dev Start only the web app on port 3000
bun run --cwd packages/backend dev Start and develop against Convex
bun run --cwd apps/web vite:build Build the production application
bun run --cwd apps/web vite:start Run the built application
bun run lint Run ESLint
bun run format Format supported files with oxfmt
bun run format:check Check formatting without writing changes
bun run test Run backend unit and Convex handler tests with Vitest

Contributing

Use Bun and run the relevant checks before opening a pull request:

bun run lint
bun run format:check
bun run --cwd apps/web vite:build
bun run test

The test script runs all backend unit and Convex handler tests through Vitest. Update the relevant documentation whenever behavior, configuration, commands, or public APIs change.

About

An OpenRouter alternative, made to have a better ChatUI and integrations.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages