Providers
All 10 AI providers — env var, default model, capabilities, base URL, native() package, and quirks. OpenAI, Anthropic, Groq (free) plus seven Pro providers.
Radon AI supports 10 providers. Three are free (OpenAI, Anthropic, Groq); the
other seven are Pro. Every provider implements the
same interface — the differences below are absorbed inside each adapter and don't
change your chat() code.
Each adapter reads its API key from apiKey in the provider config, falling back
to the RADON_<PROVIDER>_API_KEY environment variable. Override any provider's
base URL with the baseUrl option (for proxies, gateways, or Azure).
At a glance
| Slug | Provider | Tier | Wire format | Embeddings | Vision |
|---|---|---|---|---|---|
openai | OpenAI | Free | OpenAI | ✅ | ✅ |
anthropic | Anthropic (Claude) | Free | Anthropic Messages | — | ✅ |
groq | Groq | Free | OpenAI-compatible | — | ✅ |
google | Google Gemini | Pro | Gemini | ✅ | ✅ |
mistral | Mistral AI | Pro | OpenAI-compatible | ✅ | ✅ |
deepseek | DeepSeek | Pro | OpenAI-compatible | — | — |
openrouter | OpenRouter | Pro | OpenAI-compatible | — | ✅ |
xai | xAI (Grok) | Pro | OpenAI-compatible | — | ✅ |
together | Together AI | Pro | OpenAI-compatible | ✅ | ✅ |
ollama | Ollama (local) | Pro | OpenAI-compatible | ✅ | ✅ |
Capability flags are provider-can-ever
The embeddings and vision columns say whether the provider can ever do it — the specific model you pick still matters (a text-only model won't accept images). Choose an appropriate model.
OpenAI
The reference implementation of the OpenAI Chat Completions wire format. Free tier.
Env varRADON_OPENAI_API_KEYGet a key at platform.openai.com/api-keys.
Default modelgpt-4oAlso known: gpt-4o-mini, gpt-4-turbo, o1, o1-mini.
Embeddingsyesdefault: text-embedding-3-smallNative /embeddings endpoint.
VisionyesImage URLs and inline base64 both accepted.
Base URLhttps://api.openai.com/v1Override via baseUrl for Azure OpenAI or a proxy.
native() packageopenainpm i openai.
Anthropic (Claude)
The Messages API — structurally unlike OpenAI, fully bridged by Radon. Free tier.
Env varRADON_ANTHROPIC_API_KEYGet a key at console.anthropic.com/settings/keys.
Default modelclaude-sonnet-4-6Also known: claude-opus-4-8, claude-haiku-4-5-20251001.
EmbeddingsnoNo embeddings endpoint — embed() throws UnsupportedOperationError. Use a
dedicated embeddings provider.
VisionyesImage URLs and inline base64 both accepted.
Base URLhttps://api.anthropic.com/v1Messages API version is pinned to 2023-06-01.
native() package@anthropic-ai/sdknpm i @anthropic-ai/sdk.
Anthropic quirks
max_tokens is required — Radon supplies a default of 4096 when you omit
maxTokens. There's no response_format, so structured
output is best-effort via a system instruction (force
a tool for a hard guarantee). stop maps to stop_sequences; frequency/presence
penalties aren't supported.
Groq
An OpenAI-compatible endpoint for very fast open-model inference. Free tier.
Env varRADON_GROQ_API_KEYGet a key at console.groq.com/keys.
Default modelllama-3.3-70b-versatileAlso known: llama-3.1-8b-instant,
meta-llama/llama-4-scout-17b-16e-instruct, moonshotai/kimi-k2-instruct.
EmbeddingsnoNo embeddings endpoint — embed() throws UnsupportedOperationError.
VisionyesAvailable on select models.
Base URLhttps://api.groq.com/openai/v1OpenAI-compatible surface.
native() packagegroq-sdknpm i groq-sdk.
Google Gemini
Gemini's REST shape is unlike the other two families — fully bridged. Pro tier.
Env varRADON_GOOGLE_API_KEYGet a key at aistudio.google.com/apikey.
Default modelgemini-2.0-flashAlso known: gemini-2.0-flash-lite, gemini-1.5-pro.
Embeddingsyesdefault: text-embedding-004Uses the batchEmbedContents endpoint.
VisionyesPrefer inline base64 — see the URL caveat below.
Base URLhttps://generativelanguage.googleapis.com/v1betaAuth via the x-goog-api-key header.
native() package@google/generative-ainpm i @google/generative-ai.
Gemini quirks
Gemini cannot fetch arbitrary web image URLs — use inline base64 for
vision. Tool-call ids are synthesized (call_0, call_1,
…) and results are matched by tool name. Gemini accepts only a subset of JSON
Schema, so Radon strips unsupported keywords from tool and
structured-output schemas.
Mistral AI
OpenAI-compatible chat plus a native embeddings endpoint. Pro tier.
Env varRADON_MISTRAL_API_KEYGet a key at console.mistral.ai/api-keys.
Default modelmistral-large-latestAlso known: mistral-small-latest, pixtral-large-latest.
Embeddingsyesdefault: mistral-embedNative /embeddings endpoint.
VisionyesVia Pixtral models.
Base URLhttps://api.mistral.ai/v1OpenAI-compatible surface.
native() package@mistralai/mistralainpm i @mistralai/mistralai.
DeepSeek
Documented drop-in OpenAI-SDK compatibility. Pro tier.
Env varRADON_DEEPSEEK_API_KEYGet a key at platform.deepseek.com/api_keys.
Default modeldeepseek-chatAlso known: deepseek-reasoner.
EmbeddingsnoNo embeddings endpoint — embed() throws UnsupportedOperationError.
VisionnoNo image input.
Base URLhttps://api.deepseek.com/v1OpenAI-compatible surface.
native() packageopenaiUses the openai SDK pointed at the DeepSeek base URL.
deepseek-reasoner returns its final answer in content; reasoning traces live
in res.raw (see reasoning tokens).
OpenRouter
An OpenAI-compatible gateway to hundreds of models across vendors. Pro tier.
Env varRADON_OPENROUTER_API_KEYGet a key at openrouter.ai/keys.
Default modelopenai/gpt-4oModel ids are namespaced vendor/model, e.g. anthropic/claude-3.7-sonnet,
google/gemini-2.0-flash-001.
EmbeddingsnoThe gateway routes chat, not embeddings — embed() throws.
VisionyesDepends on the routed model.
Base URLhttps://openrouter.ai/api/v1OpenAI-compatible surface.
native() packageopenaiUses the openai SDK pointed at the OpenRouter base URL.
OpenRouter attribution
OpenRouter optionally attributes traffic via HTTP-Referer / X-Title headers.
Set them with the referer / title provider options, or the
RADON_OPENROUTER_REFERER / RADON_OPENROUTER_TITLE env vars. Always use
vendor/model ids.
xAI (Grok)
OpenAI-compatible REST API for Grok. Pro tier.
Env varRADON_XAI_API_KEYGet a key at console.x.ai.
Default modelgrok-3Also known: grok-3-mini, grok-2-vision-1212.
EmbeddingsnoNo general embeddings endpoint — embed() throws.
VisionyesVia Grok vision models.
Base URLhttps://api.x.ai/v1OpenAI-compatible surface.
native() packageopenaiUses the openai SDK pointed at the xAI base URL.
Together AI
Open models behind an OpenAI-compatible API, plus native embeddings. Pro tier.
Env varRADON_TOGETHER_API_KEYGet a key at api.together.ai/settings/api-keys.
Default modelmeta-llama/Llama-3.3-70B-Instruct-TurboAlso known: Qwen/Qwen2.5-72B-Instruct-Turbo.
Embeddingsyesdefault: BAAI/bge-base-en-v1.5Native /embeddings endpoint.
VisionyesAvailable on select models.
Base URLhttps://api.together.xyz/v1OpenAI-compatible surface.
native() packagetogether-ainpm i together-ai.
Ollama (local)
Runs models on your machine — a deliberate divergence from the rest. Pro tier (gating is licensing symmetry only; the adapter is built to the same bar).
API keynoneOllama is local and needs no API key.
Default modelllama3.2Also known: llama3.3, qwen2.5, llava (vision), nomic-embed-text.
Availability depends on what you've ollama pulled.
Embeddingsyesdefault: nomic-embed-textNative embeddings endpoint.
VisionyesVia multimodal models like llava.
Base URLhttp://localhost:11434/v1Set the baseUrl option (or RADON_OLLAMA_BASE_URL) for a remote host.
native() packageopenaiUses the openai SDK pointed at the Ollama base URL (with a dummy key).
Bring your own provider
For an OpenAI-compatible endpoint, extend OpenAICompatibleProvider and register
it — you get chat, streaming, tools, and embeddings for free. For anything else,
implement the ModelProvider interface (or extend BaseProvider).
import { OpenAICompatibleProvider, registerProvider } from "@radonsdk/ai";
class MyLlmProvider extends OpenAICompatibleProvider {
readonly name = "my-llm";
readonly defaultModel = "my-model";
readonly capabilities = {
chat: true, streaming: true, tools: true,
embeddings: false, vision: false, jsonMode: true,
};
protected defaultBaseUrl() { return "https://llm.mycompany.internal/v1"; }
}
registerProvider("my-llm", async () => MyLlmProvider);Custom providers are Pro-gated but built exactly like the built-ins.
Next steps
Fallback chains
Automatically retry a failed chat() on backup providers — a Pro feature. How the chain works, which errors stop it, and why streaming doesn't support it.
API reference
Every method, option, and return type in @radonsdk/ai — the RadonAI class, ChatOptions, EmbedOptions, ChatResult, the StreamChunk union, and ChatStream.