PydanticAI
PydanticAI supports custom OpenAI-compatible providers. Construct anOpenAIChatModel explicitly so requests use Radium’s Chat Completions endpoint.
Before you start
You need Python 3.10 or newer, a Radium API key, and a terminal or PowerShell window.1. Create a project and install PydanticAI
2. Set your Radium credentials
3. Create main.py
4. Run it
Choose a model
Migrate an existing PydanticAI agent
Replace its model/provider configuration:Troubleshooting
Validation
These instructions were verified with Python 3.12.7 and
pydantic-ai-slim[openai]==2.31.1 on August 20, 2026. You do not need that exact package version.tool_plain execution passed with hal-1.0, clarke-1.0, and tycho-1.0.
Next steps
API quickstart
Call Radium directly
Tool calling
The tool_use and tool_result contract