Radon AI
One unified, provider-agnostic API for 10 AI model providers — OpenAI, Anthropic, Gemini, Groq, and more. Write ai.chat() once and swap providers with a config change, never a code change.
@radonsdk/ai gives you one typed API — chat, stream, embed — that
every one of 10 AI providers implements. Provider-specific quirks (auth
schemes, wildly different tool-calling formats, SSE framing, JSON-mode dialects)
are absorbed inside each adapter and never leak into your code.
import { RadonAI } from "@radonsdk/ai";
const ai = new RadonAI({
providers: { openai: {} }, // credentials from RADON_OPENAI_API_KEY
defaultProvider: "openai",
});
const res = await ai.chat({
messages: [{ role: "user", content: "Say hello in one word." }],
});
res.content; // "Hello"
res.usage; // { promptTokens, completionTokens, totalTokens }
res.finishReason; // "stop" | "length" | "tool_calls" | ...Switching to Anthropic, Gemini, or Groq later is a one-line config change — the
chat() call above never changes.
Own your keys, no lock-in
Radon runs in your backend against your own provider keys. There's no hosted
gateway, no per-token fee from Radon, and the SDK never stores your secrets —
each adapter reads them from RADON_<PROVIDER>_API_KEY at call time.
What's in the box
Quickstart
Send your first message in under five minutes.
Core concepts
Providers, the one message/result shape, models, streaming, and the escape hatch.
Chat
Messages, roles, sampling parameters, and the normalized result.
Streaming
Token-by-token deltas, normalized identically across providers.
Tool calling
Define one tool schema; it works on every provider. The point of the SDK.
Providers
All 10 providers, their env vars, default models, and quirks.
API reference
Every method, option, and return type.
Errors
Every typed error, its code, and what causes it.
Free vs. Pro
Three providers are free and need no license: OpenAI, Anthropic, Groq — with full chat, streaming, and normalized tool-calling. Tool-calling is core, never an upsell.
The other seven providers — Google (Gemini), Mistral, DeepSeek, OpenRouter,
xAI (Grok), Together AI, Ollama — are Pro Pro, as are a
handful of features on any provider: embeddings, vision / image
input, structured output / JSON mode, and fallback chains. All of these
unlock with a single Radon Pro license, verified
once in await ai.init().
Gating is a licensing concern only — every adapter, free or Pro, is built to the same completeness bar: real API calls, real streaming, real tool-calling.