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

# API Keys

> How Fetchlake's scoped API keys work

## How API Keys Work

When you purchase access to a knowledge base, Fetchlake issues you a **scoped API key**. This key is your credential for querying that specific knowledge base via the API.

## Key Principles

> [card] Fetchlake-Issued
>
> All API keys are issued by Fetchlake. You never receive supplier infrastructure keys or direct access to publisher systems.

> [card] Scoped Access
>
> Each key grants access to exactly one knowledge base. If you purchase access to multiple knowledge bases, you'll have separate keys for each.

> [card] Revocable
>
> Keys can be revoked at any time from your dashboard if compromised or no longer needed.

## API Key Format

Your API key will look something like:

```
ak_3f9c1e7a52d84b06...
```

Keys start with `ak_` followed by 64 random characters. Treat the whole key as a secret: anyone who has it can use your access.

## Managing Your Keys

Access your API keys from the [Dashboard](https://www.fetchlake.com/dashboard). For each key, you can see:

| Field | Description |
| - | - |
| **Knowledge Base** | Which KB this key grants access to |
| **Created At** | When the key was issued |
| **Last Used** | Most recent API call with this key |
| **Prefix** | First few characters for identification |

> [!WARNING]
>
> **Never expose your API key in client-side code, public repositories, or logs.** Treat it like a password.

## Security Best Practices

**1. Use Environment Variables**

Store your API key in environment variables, not in code:

```bash theme={null}
export FETCHLAKE_API_KEY="ak_..."
```

**2. Rotate Keys Periodically**

If you suspect a key may be compromised, revoke it immediately and generate a new one.

**3. Use Server-Side Only**

Make API calls from your backend server, never from browser JavaScript or mobile apps.

## Next Steps

> [card] [Authentication](https://docs.fetchlake.com/api-reference/authentication.md)
>
> Learn how to use your API key in requests

> [card] [Rate Limits](https://docs.fetchlake.com/api-reference/rate-limits.md)
>
> Understand usage caps and limits


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