The SDK logs in with one Radion API key. The SDK sends it as the X-API-Key header when it opens the WebSocket. Keys start with sk_. You make and manage them in the dashboard.
Pass the key when you build the client:
import { Radion } from "@radion-app/sdk";
const radion = new Radion({ apiKey: process.env.RADION_API_KEY });
import os
from radion import Radion
radion = Radion(api_key=os.getenv("RADION_API_KEY"))
use radion_sdk::Radion;
let radion = Radion::builder()
.api_key(std::env::var("RADION_API_KEY")?)
.build()?;
Never put keys in source control or in URLs. Read them from an environment
variable (RADION_API_KEY) or your secrets manager. The SDK only sends the
key in the upgrade header. It never puts the key in the query string.
If the key is missing or empty, the SDK fails right away with a RadionConnectionError (Rust: RadionError::Connection), before any network call. Your key also sets the rate limits for the connection. If the key is revoked while you are connected, the server closes the connection with a key_revoked error.