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

# Keys and authentication

> How to send your AlphaYou key, how many keys you can have, and how to revoke one.

## Send your key

Send the key with every request. Either header works on the REST API:

```bash theme={null}
# Option 1
curl -H "x-api-key: ay_your_key" "https://api.alphayou.net/api/v1/datasets"

# Option 2
curl -H "Authorization: Bearer ay_your_key" "https://api.alphayou.net/api/v1/datasets"
```

The hosted MCP server at `https://api.alphayou.net/api/v1/mcp` takes the key as a Bearer token.

The no-key research MCP at `https://alphayou.net/api/mcp/market` needs no key.

## Get, swap and revoke keys

Manage keys at [alphayou.net/developers](https://alphayou.net/developers).

* An account can hold up to **2 live keys** at once. Make the new key, switch your code to it, then revoke the old one. Nothing goes down.
* A revoked key stops working at once. Calls with it return `401`.
* On the **Free** plan the daily allowance belongs to the account. Every key on the account, and every alias of the same inbox (for example `name+2@gmail.com`), shares one allowance.
* On **Pro** each key has its own allowance.
* Making extra keys or accounts to get around a limit is not allowed. See the [API terms](https://alphayou.net/legal/api-terms).

## Check what your key can do

```bash theme={null}
curl -H "x-api-key: $ALPHAYOU_API_KEY" \
  "https://api.alphayou.net/api/mcp/whoami"
```

A Free key returns something like this:

```json theme={null}
{
  "tier": "free",
  "tools": [
    "alphayou_search_datasets",
    "alphayou_funds",
    "alphayou_company_disclosures",
    "alphayou_insider_trades"
  ],
  "toolCount": 4
}
```

The response also shows your limits and what each call costs.

## Keep your key safe

* Treat it like a password. You are responsible for every call made with it.
* Never put it in a web page, a mobile app or a public code repository.
* Never paste it into a chat, a screenshot or a support message.
* If it leaks, make a new key and revoke the old one at once.

## Get help

Write to [info@alphayou.net](mailto:info@alphayou.net). If you think a key was suspended by mistake, say so in the same email.


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