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

# Authentication

> How to get and use your Kyma API key.

## Get your API key

**1. Register**

Go to [kymaapi.com](https://kymaapi.com) and create an account with email + password, or sign in with Google.

**2. Copy your key**

Your API key starts with `kyma-`. The full key is shown once, when it is created: copy it then. If you lose it, create a new one on the [Keys page](https://kymaapi.com/keys), which lists your keys by their first and last characters only.

**3. Use it**

Pass your key as a Bearer token in the `Authorization` header.

> [!NOTE]
>
> The \$0.50 signup credit is added once your email is verified (Google sign-in counts as verified). It spends on [free tier](https://docs.kymaapi.com/pricing.md#free-tier) models only; any other model returns `402 model_requires_paid` until your first top-up.

## Using your API key

Include your key in every API request:

```bash theme={null}
curl https://kymaapi.com/v1/chat/completions \
  -H "Authorization: Bearer kyma-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "llama-3.3-70b", "messages": [{"role": "user", "content": "Hello"}]}'
```

With the OpenAI SDK:

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://kymaapi.com/v1",
    api_key="kyma-your-api-key"  # or set OPENAI_API_KEY env var
)
```

## Environment variables

> [!TIP]
>
> Never hardcode your API key. Use environment variables instead.

```bash theme={null}
export OPENAI_API_KEY="kyma-your-api-key"
export OPENAI_BASE_URL="https://kymaapi.com/v1"
```

Then in your code:

```python theme={null}
client = OpenAI()  # automatically reads env vars
```

## Managing keys

* **Create keys**: [Keys page](https://kymaapi.com/keys) → Create Key
* **Multiple keys**: Create separate keys for dev/staging/production
* **Delete keys**: Remove compromised keys instantly from the [Keys page](https://kymaapi.com/keys)
* **View usage**: Track requests per key in Dashboard


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