Hello, world!
This is a complete, minimal Radium application. Copy it into a file, set your API key, and run it.The script
hello.py
Run it
What it does
- Creates an OpenAI-compatible client pointing at
api.radium.cloud/v1. - Sends a chat request to
clarke-1.0(our Sonnet-class model, ideal for most tasks). - Receives and prints the model’s text response.
- Logs usage so you can see how many tokens were consumed.
Switch to streaming
Replace the non-streaming call with this to get tokens as they arrive:Switch to Anthropic format
Same logic, different SDK and base URL:hello_anthropic.py
Next steps
Streaming response
Stream tokens in real time
Tool calling agent
Build an agent that uses tools
Structured extraction
Extract JSON from text
Models overview
Pick the right model tier