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

# Quickstart

> Send your first request to Radium in four steps

# Quickstart

## 1. Create an account

Go to [deploy.radium.cloud](https://deploy.radium.cloud) and sign up.

## 2. Create an API key

Navigate to **API Keys** in the dashboard. Click **Create key**, copy the value and export it in your terminal.

```bash theme={null}
export RADIUM_API_KEY="YOUR_RADIUM_API_KEY"
```

## 3. Send a request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.radium.cloud/v1/chat/completions \\
    -H "Authorization: Bearer $RADIUM_API_KEY" \\
    -H "Content-Type: application/json" \\
    -d '{
      "model": "clarke-1.0",
      "messages": [{"role": "user", "content": "Explain rate limiting in 3 sentences."}]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI
  client = OpenAI(
      api_key="YOUR_RADIUM_API_KEY",
      base_url="https://api.radium.cloud/v1"
  )
  response = client.chat.completions.create(
      model="clarke-1.0",
      messages=[{"role": "user", "content": "Explain rate limiting in 3 sentences."}],
  )
  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  import OpenAI from "openai";
  const client = new OpenAI({
    apiKey: process.env.RADIUM_API_KEY,
    baseURL: "https://api.radium.cloud/v1",
  });
  const response = await client.chat.completions.create({
    model: "clarke-1.0",
    messages: [{ role: "user", content: "Explain rate limiting in 3 sentences." }],
  });
  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

## 4. Read the response

A Chat Completions response looks like this:

```json theme={null}
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1699999999,
  "model": "clarke-1.0",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Rate limiting controls how many requests a client can make..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 19,
    "completion_tokens": 45,
    "total_tokens": 64
  }
}
```

## Same request in Anthropic format

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.radium.cloud/v1/messages \\
    -H "x-api-key: $RADIUM_API_KEY" \\
    -H "anthropic-version: 2023-06-01" \\
    -H "Content-Type: application/json" \\
    -d '{
      "model": "clarke-1.0",
      "max_tokens": 1024,
      "messages": [{"role": "user", "content": "Explain rate limiting in 3 sentences."}]
    }'
  ```

  ```python Python theme={null}
  from anthropic import Anthropic
  client = Anthropic(
      api_key="YOUR_RADIUM_API_KEY",
      base_url="https://api.radium.cloud",
  )
  response = client.messages.create(
      model="clarke-1.0",
      max_tokens=1024,
      messages=[{"role": "user", "content": "Explain rate limiting in 3 sentences."}],
  )
  print(response.content[-1].text)
  ```

  ```typescript TypeScript theme={null}
  import Anthropic from "@anthropic-ai/sdk";
  const client = new Anthropic({
    apiKey: process.env.RADIUM_API_KEY,
    baseURL: "https://api.radium.cloud",
  });
  const response = await client.messages.create({
    model: "clarke-1.0",
    max_tokens: 1024,
    messages: [{ role: "user", content: "Explain rate limiting in 3 sentences." }],
  });
  console.log(response.content.at(-1)?.text);
  ```
</CodeGroup>

## Anatomy of a request

1. **Base URL**: `https://api.radium.cloud/v1` for OpenAI format, `https://api.radium.cloud` for Anthropic format.
2. **API key**: Passed as `Authorization: Bearer` for OpenAI, or `x-api-key` for Anthropic.
3. **Model string**: `hal-1.0`, `clarke-1.0` or `tycho-1.0`.
4. **Messages**: Same array of `{role, content}` objects you already use.

## Next steps

<CardGroup cols={2}>
  <Card title="Models overview" icon="brain" href="/models/overview">Compare tiers and pick the right model</Card>
  <Card title="Authentication" icon="key" href="/authentication">Keys, rotation and security</Card>
  <Card title="From OpenAI" icon="arrows-rotate" href="/switching/from-openai">Parameter compatibility guide</Card>
  <Card title="From Anthropic" icon="arrows-rotate" href="/switching/from-anthropic">Messages API migration</Card>
</CardGroup>


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