> ## Documentation Index
> Fetch the complete documentation index at: https://docs.radion.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate the Radion SDK with your API key.

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](https://radion.app/dashboard).

Pass the key when you build the client:

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Radion } from "@radion-app/sdk";

  const radion = new Radion({ apiKey: process.env.RADION_API_KEY });
  ```

  ```python Python theme={null}
  import os

  from radion import Radion

  radion = Radion(api_key=os.getenv("RADION_API_KEY"))
  ```

  ```rust Rust theme={null}
  use radion_sdk::Radion;

  let radion = Radion::builder()
      .api_key(std::env::var("RADION_API_KEY")?)
      .build()?;
  ```
</CodeGroup>

<Warning>
  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.
</Warning>

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](/websockets/rate-limits) for the connection. If the key is revoked while you are connected, the server closes the connection with a `key_revoked` [error](/sdks/realtime/errors).
