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

# Authentication

> Learn how to authenticate with the LeoKit API using API keys and configure your client settings

## API Key Authentication

All LeoKit API endpoints require authentication via an API key. You can pass the API key using either the request header (recommended) or query parameter.

### Header Method (Recommended)

Pass your API key in the `Api-Key` header:

```http theme={null}
Api-Key: your_api_key_here
```

### Query Parameter Method (Alternative)

Alternatively, you can pass the API key as a query parameter:

```http theme={null}
GET /leokit/quote?api_key=your_api_key_here&...
```

## Client Configuration

Each API key is associated with a client configuration that controls various aspects of the API behavior. These settings allow you to customize which chains and protocols are available to your application.

### Disabled Chains

You can exclude specific blockchain networks from quotes and asset lists by providing an array of blockchain short names.

**Example:**

```json theme={null}
{
  "disabled_chains": ["SOL", "AVAX", "FANTOM"]
}
```

This configuration would exclude Solana, Avalanche, and Fantom from all API responses.

### Disabled Protocols

You can exclude specific DEX protocols from quote aggregation by providing an array of protocol UUIDs.

**Example:**

```json theme={null}
{
  "disabled_protocols": ["thorchain-uuid", "maya-uuid"]
}
```

This configuration would prevent THORChain and MAYAChain quotes from being included in results.

### Client Fees

Configure revenue sharing for each protocol using the client fees setting. This allows you to earn a percentage of each swap.

**Example:**

```json theme={null}
{
  "client_fees": {
    "fee_bps": 30,
    "thorchain_address": "thor1...",
    "mayachain_address": "maya1...",
    "chainflip_address": "0x...",
    "relay_address": "0x...",
    "near_address": "example.near"
  }
}
```

**Parameters:**

* `fee_bps`: Fee in basis points (30 = 0.30%)
* Protocol-specific addresses: Your wallet addresses for receiving fees on each protocol

## Invalid API Key Response

If you provide an invalid or missing API key, the API will return a 403 Forbidden error:

**Status Code:** `403 Forbidden`

```json theme={null}
{
  "error": "Unknown Api-Key",
  "status": 403,
  "code": "CLIENT_CONFIG_IS_NOT_SET"
}
```

Make sure to include a valid API key with every request to avoid authentication errors.
