# Authentication

> How to authenticate with the HushSearch API.

Source: http://localhost:3000/docs/getting-started/authentication

All API requests must include your API key in the `X-API-Key` header.

```bash
curl -X POST https://api.hushsearch.io/v1/search/ \
  -H "X-API-Key: hs_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest AI news"}'
```

## Getting Your API Key

1. [Sign up](https://hushsearch.io/signup) — you get **500 free credits** with no card required
2. Go to [Dashboard → API Keys](http://localhost:3000/dashboard/keys)
3. Click **Create Secret Key**, give it a name
4. Copy the `hs_live_...` key — **it's shown only once**

## Key Format

All keys start with `hs_live_` followed by a 43-character random string:

```
hs_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789abc
```

## Dashboard Auth (JWT)

When using the dashboard playground or authenticated API endpoints from the browser, requests use a Supabase JWT in the `Authorization: Bearer <token>` header. This is handled automatically by the dashboard.
