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

# Authentication: Using API Keys with Kovi by Techeval

> Kovi uses API key authentication. Get your key from the Techeval dashboard and pass it in every SDK initialization or REST request header.

Kovi authenticates every API request using a secret API key tied to your Techeval account. You include this key when you initialise the Python SDK or when you make a direct REST API call. Requests made without a valid key are rejected with a `401 Unauthorized` response. Keep your key private — it carries the same authority as your account credentials.

## Getting Your API Key

<Steps>
  ### Log in to the Techeval dashboard

  Go to [techeval.ai](https://techeval.ai) and sign in with your account credentials. New accounts receive **10 free interview credits** automatically on first login.

  ### Open the API Keys settings

  Click your account avatar or company name in the top-right corner, then select **Settings** from the dropdown menu.

  ### Navigate to API Keys

  Inside Settings, select the **API Keys** tab from the left-hand navigation panel.

  ### Copy your key

  Click **Copy** next to your live API key. Store it somewhere secure — for example, in a password manager or a secrets manager such as AWS Secrets Manager or HashiCorp Vault. You will not be shown the full key again after you leave this page.
</Steps>

***

## Using with the Python SDK

Pass your API key as the `api_key` argument when you create a `KoviClient` instance. Every subsequent SDK method call — such as `schedule_interview()` — automatically includes this key in the request.

```python theme={null}
from kovi import KoviClient

client = KoviClient(api_key="YOUR_LIVE_API_KEY_HERE")
```

You only need to initialise the client once. Create a single instance at application startup and reuse it throughout the lifetime of your process.

***

## Using with the REST API

If you are calling the Kovi REST API directly — for example, from a language without an official SDK — pass your API key in the `Authorization` header using the **Bearer** scheme:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

A full example using `curl`:

```bash theme={null}
curl -X POST https://api.techeval.ai/v1/interviews \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "role": "AI Engineer", "interview_type": "System Design" }'
```

***

## Keeping Your Key Secure

<Warning>
  **Never hard-code your API key in source code or commit it to version control.** If your key is exposed in a public repository, anyone can use it to consume your interview credits. Treat it like a password.

  Use an environment variable instead:

  ```python theme={null}
  import os
  from kovi import KoviClient

  api_key = os.environ.get("KOVI_API_KEY")
  client = KoviClient(api_key=api_key)
  ```

  Set the environment variable in your shell or deployment environment:

  ```bash theme={null}
  export KOVI_API_KEY="YOUR_LIVE_API_KEY_HERE"
  ```

  For production deployments, inject the secret through your CI/CD platform (e.g., GitHub Actions Secrets, AWS Parameter Store, or a Kubernetes Secret) rather than storing it in `.env` files that might be committed by accident.
</Warning>

***

## Key Rotation

If you suspect your API key has been compromised, or as a routine security practice, you can regenerate it at any time:

1. Go to **Settings → API Keys** in the [Techeval dashboard](https://techeval.ai).
2. Click **Regenerate Key**.
3. Confirm the action in the dialog.

**The old key is invalidated immediately.** Any SDK clients or services still using the previous key will receive `401 Unauthorized` errors until you update them to use the new key. Update all integrations — your production service, CI/CD pipelines, and any local `.env` files — before regenerating in a live environment.

For questions about key management or enterprise SSO options, contact [support@techeval.ai](mailto:support@techeval.ai).


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