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

# Authentication

> API keys, fees, and rate limits.

<Tip>
  **[Get a key.](/tools/get-api-key)** Instant, no review, 30 seconds. It 4x's your rate limit
  (30 → 120 req/min) and puts your project on RAVN's radar, worth having if you want a
  partnership or a rev-share deal down the line.
</Tip>

No key required to start if you just want to poke around: every endpoint works with no
`x-api-key` header at all, so you can make your first call right now. `GET /health` is always
public regardless of tier.

## Calling from a browser

**CORS is enabled on every endpoint**, so a wallet widget, dapp frontend, or any other
browser-side integration can call the API directly, with no server-side proxy required.

`x-request-id` and `ravn-version` are exposed via `Access-Control-Expose-Headers`, so your
client-side code can read them. Quote `x-request-id` if you ever report a bad quote to us; it
is how we find your exact request.

<Note>
  Because your key travels to the browser in that setup, treat a client-side key as public. It
  only ever raises a rate limit and carries no spending authority (RAVN never takes custody, and
  every swap is still signed by the user's own wallet), but rotate it like any other public
  credential, or keep it server-side and proxy if you would rather not expose it at all.
</Note>

There are three tiers:

| Tier | How to get it | Rate limit | Identity |
| - | - | - | - |
| No key | Nothing, just call the API | 30 req/min, per IP | Anonymous |
| Self-serve key | [Get an API key](/tools/get-api-key), instant, no review | 120 req/min | Named, by project |
| Enterprise key | Reach out to RAVN directly | Custom | Named, custom deal |

To use a self-serve or enterprise key, pass it in the `x-api-key` header:

```
x-api-key: rvn_live_your_key_here
```

A key that doesn't match either store returns `401 UNAUTHORIZED`. Exceeding your tier's limit
returns `429 RATE_LIMITED`, with a `retryAfterSec` value in `details`.

RAVN itself charges 0 bps, always. Self-serve keys can set their own swap fee (0% by default,
up to a cap); enterprise fees are set directly by RAVN as part of your arrangement. Full
breakdown, the quote `fee` object, and how this differs from optional x402 call fees: see
[Pricing](/pricing).

## Enterprise partnerships

Building something that needs a custom rate limit or a dedicated fee arrangement, or just want
to work closely with the RAVN team? DM [@ravnexchange](https://x.com/ravnexchange) on X or reach
out via [ravn.exchange](https://ravn.exchange); include a word on what you're building so we can
set your limits.


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