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

# From OpenAI

> Migrate from OpenAI to Radium

# From OpenAI

Radium implements the standard OpenAI Chat Completions API. Point your existing OpenAI SDK client at Radium and change three values.

## Before and after

```diff Python theme={null}
  from openai import OpenAI
  client = OpenAI(
-     api_key=os.environ["OPENAI_API_KEY"],
-     base_url="https://api.openai.com/v1",
+     api_key=os.environ["RADIUM_API_KEY"],
+     base_url="https://api.radium.cloud/v1",
  )
  response = client.chat.completions.create(
-     model="gpt-4o",
+     model="clarke-1.0",
      messages=[{"role": "user", "content": "Hello"}],
  )
```

```diff TypeScript theme={null}
  import OpenAI from "openai";
  const client = new OpenAI({
-   apiKey: process.env.OPENAI_API_KEY,
-   baseURL: "https://api.openai.com/v1",
+   apiKey: process.env.RADIUM_API_KEY,
+   baseURL: "https://api.radium.cloud/v1",
  });
  const response = await client.chat.completions.create({
-   model: "gpt-4o",
+   model: "clarke-1.0",
    messages: [{ role: "user", content: "Hello" }],
  });
```

## Model mapping

| OpenAI model | Radium equivalent | Best for |
| - | - | - |
| `gpt-4o` | `clarke-1.0` | General-purpose, RAG, copilots |
| `o1` / `o1-mini` | `hal-1.0` | Complex reasoning, multi-step agents |
| `gpt-4o-mini` | `tycho-1.0` | Fast, cheap classification and extraction |

## Supported endpoints

## Supported endpoints

| Endpoint | Status | Notes |
| - | - | - |
| `POST /v1/chat/completions` | Supported | Full compatibility |
| `POST /v1/responses` | Not supported | Coming soon |
| `GET /v1/models` | Supported | Lists hal-1.0, clarke-1.0, tycho-1.0 |
| `POST /v1/embeddings` | Not supported | Use a dedicated embedding provider |

## Parameter compatibility

| Parameter | Status | Notes |
| - | - | - |
| `model` | Required | Use `hal-1.0`, `clarke-1.0` or `tycho-1.0` |
| `messages` | Supported | Same format |
| `max_tokens` | Supported | Same behavior |
| `temperature` | Supported | Same behavior |
| `top_p` | Supported | Same behavior |
| `stream` | Supported | Same format |
| `tools` | Supported | Same schema |
| `tool_choice` | Supported | Same behavior |
| `response_format` | Supported | JSON mode and JSON schema |
| `presence_penalty` | Supported | Range: -2.0 to 2.0 |
| `frequency_penalty` | Supported | Range: -2.0 to 2.0 |
| `logprobs` | Supported | Returns logprobs per token |
| `seed` | Supported | Integer for reproducibility |

## Known differences

* Model strings are different. Using `gpt-*` returns a model-not-found error.
* Radium does not publish the names of underlying open-weight models.
* Rate limits and pricing differ. See [Rate limits](/core-concepts/rate-limits) and [Pricing](/core-concepts/pricing-and-billing).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.