Skip to main content

Framework integration

Radium is a drop-in replacement for OpenAI and Anthropic endpoints. This recipe shows how to configure popular frameworks to route through Radium with zero code changes beyond base_url and api_key.

OpenAI SDK (official)

LangChain

langchain_example.py

Vercel AI SDK

vercel-sdk.ts

Pydantic AI

pydantic_ai_example.py

Anthropic SDK

anthropic_example.py

LiteLLM (universal gateway)

litellm_example.py

Run any example

Tips

  • Every framework uses the same two values: api_key and base_url (or api_base).
  • Model names on Radium are tycho-1.0, clarke-1.0, and hal-1.0 — pass them directly wherever the framework expects a model string.
  • Streaming works out of the box — no special config needed beyond what the framework already supports.
  • Tool calling follows the OpenAI schema — supported in LangChain, Pydantic AI, and LiteLLM without extra setup.
  • Embeddings use text-embedding-3-small — configure it the same way you’d configure text-embedding-3-small on OpenAI.

Next steps

Switching with fallback

Route intelligently between Radium models

Tool calling agent

Build an agent using your favorite framework