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

# API Keys

> Create and manage API keys for your apps and environments.

# API Keys

API keys authenticate your requests to Routor. You can create multiple keys, one per app, environment, or team member.

***

## Creating an API Key

1. Click **API Keys** in the left sidebar
2. Click **Create Key**
3. Enter a name like `production`, `staging`, or `my-chatbot`
4. Click **Create**
5. Copy the key. It starts with `sk-routor-` and is only shown once

> 📷 **\[Screenshot: API Keys page with the Create Key button highlighted and the key list below it]**
> 📷 **\[Screenshot: New key dialog showing the full key with a Copy button and a warning that it won't be shown again]**

***

## Using Your Key

Pass it in the `Authorization` header:

```bash theme={null}
Authorization: Bearer sk-routor-YOUR_KEY_HERE
```

Or set it as the `apiKey` in the OpenAI SDK:

```typescript theme={null}
const client = new OpenAI({
  apiKey:  "sk-routor-YOUR_KEY_HERE",
  baseURL: "https://api.routor.ai/v1",
});
```

***

## Key List

The API Keys page shows all your active keys:

| Column      | Description                           |
| ----------- | ------------------------------------- |
| Name        | The name you gave the key             |
| Key preview | First 18 characters followed by `...` |
| Created     | When the key was created              |
| Type        | `Standard` or `Profile key`           |
| Delete      | Remove the key permanently            |

**Profile keys** are created automatically when you create a [Routing Profile](../playground/create-profile.md). They have the profile routing rules baked in.

> 📷 **\[Screenshot: API Keys table with two rows, one standard key and one profile key]**

***

## Deleting a Key

Click **Delete** next to a key. This is immediate and permanent. Any app using that key will get `401` errors from that point on.

> If you delete a profile key, the routing profile still exists but has no key. You will need to recreate the profile to get a new one.

***

## Key Security

* Keys are stored as one-way hashes. Routor cannot recover a key if you lose it
* The key is only shown at creation time, so copy it immediately
* Treat your Routor key like a password and do not commit it to version control
* Use environment variables in production:

```bash theme={null}
# .env
ROUTOR_API_KEY=sk-routor-YOUR_KEY_HERE
```
