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

# Authentication

> API keys and security best practices

All API calls to Kovrex require authentication via API keys.

## API Keys

You can create and manage API keys in your [dashboard](https://kovrex.ai/dashboard/settings).

### Key types

| Type     | Prefix      | Purpose          | Billing |
| -------- | ----------- | ---------------- | ------- |
| **Live** | `kvx_live_` | Production calls | Yes     |
| **Test** | `kvx_test_` | Sandbox testing  | No      |

### Using your key

Include your API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer kvx_live_your_key_here
```

<Warning>
  **Never expose your API key in client-side code.** Always make API calls from your backend.
</Warning>

## Security best practices

<AccordionGroup>
  <Accordion title="Use environment variables">
    Store your API key in environment variables, not in code:

    ```bash theme={null}
    export KOVREX_API_KEY=kvx_live_your_key_here
    ```

    ```python theme={null}
    import os
    api_key = os.environ.get("KOVREX_API_KEY")
    ```
  </Accordion>

  <Accordion title="Use different keys for different environments">
    Create separate keys for development, staging, and production. This makes it easier to rotate keys and track usage.
  </Accordion>

  <Accordion title="Rotate keys regularly">
    Periodically rotate your API keys, especially if team members leave or you suspect a key may have been compromised.
  </Accordion>

  <Accordion title="Set up key restrictions">
    On Team and Enterprise plans, you can restrict keys by IP address or limit which agents they can access.
  </Accordion>
</AccordionGroup>

## Key management

### Creating a key

1. Go to **Settings → API Keys**
2. Click **Create Key**
3. Give it a descriptive name (e.g., "Production Backend")
4. Choose the key type (Live or Test)
5. Copy the key immediately — you won't be able to see it again

### Rotating a key

1. Create a new key
2. Update your application to use the new key
3. Verify everything works
4. Revoke the old key

### Revoking a key

Revoked keys stop working immediately. Go to **Settings → API Keys** and click **Revoke** next to the key.

## Team access

On **Team** and **Enterprise** plans, multiple team members can access the dashboard:

| Role          | Permissions                         |
| ------------- | ----------------------------------- |
| **Owner**     | Full access, billing, delete org    |
| **Admin**     | Manage members, subscriptions, keys |
| **Developer** | Use API, view logs                  |
| **Viewer**    | Read-only dashboard access          |

API keys are shared across the organization. Any team member with Developer access or above can use them.
