> ## 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.

# Configuration

> Configure the Radion client — API key, endpoints, and realtime tuning.

The `Radion` client takes a few options. Only `apiKey` is required.

| Option    | Type     | Default                   | Description                                   |
| --------- | -------- | ------------------------- | --------------------------------------------- |
| `apiKey`  | `string` | —                         | **Required.** Sent as the `X-API-Key` header. |
| `baseUrl` | `string` | `https://api.radion.app`  | The base URL for the Radion API.              |
| `wsUrl`   | `string` | `wss://api.radion.app/ws` | Use your own realtime endpoint.               |

<CodeGroup>
  ```typescript TypeScript theme={null}
  const radion = new Radion({
    apiKey: process.env.RADION_API_KEY,
    // wsUrl: "wss://api.radion.app/ws",
    realtime: {
      reconnect: { initialDelayMs: 500, maxDelayMs: 30_000 },
      heartbeat: { intervalMs: 15_000, timeoutMs: 10_000 },
    },
  });
  ```

  ```python Python theme={null}
  radion = Radion(
      api_key="sk_...",
      # ws_url="wss://api.radion.app/ws",
      reconnect=True,
      heartbeat=True,
      heartbeat_interval=15.0,
      heartbeat_timeout=10.0,
  )
  ```

  ```rust Rust theme={null}
  use radion_sdk::Radion;
  use radion_sdk::realtime::{HeartbeatOptions, ReconnectOptions, RealtimeClient, RealtimeOptions};
  use std::time::Duration;

  // The top-level builder takes the API key and endpoints:
  let radion = Radion::builder()
      .api_key("sk_...")
      // .ws_url("wss://api.radion.app/ws")
      .build()?;

  // Realtime tuning lives on RealtimeOptions (standalone client):
  let client = RealtimeClient::new(
      RealtimeOptions::new("sk_...")
          .reconnect(ReconnectOptions {
              initial_delay: Duration::from_millis(500),
              max_delay: Duration::from_secs(30),
              factor: 2.0,
              jitter: 0.2,
          })
          .heartbeat(HeartbeatOptions {
              interval: Duration::from_secs(15),
              timeout: Duration::from_secs(10),
          }),
  );
  ```
</CodeGroup>

## Realtime tuning

To turn off reconnect or heartbeat, pass `false` (TypeScript) or `False` (Python). In Rust, build a `RealtimeClient` with `RealtimeOptions` and call `.disable_reconnect()` or `.disable_heartbeat()`. See [Reconnect & heartbeats](/sdks/realtime/reconnect) to learn how they work.
