> For the complete documentation index, see [llms.txt](https://docs.hermiv.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hermiv.tech/authentication-and-security/api-keys.md).

# API Key Authorization

Hermiv uses cryptographic API keys to authenticate and authorize requests across our streaming and REST gateways.

***

## 1. Obtaining Your API Key

API keys are managed through the **Hermiv Developer Portal**:

1. Log in to <https://dash.hermiv.tech> using your Web3 wallet (Phantom, MetaMask), Discord, or Email via Privy.
2. Navigate to **API Keys Vault**.
3. Generate a new key for your bot or execution daemon.

Keys follow a standardized prefix format:

* Production Keys: `hmv_live_<32-hex-characters>`
* Test / Sandbox Keys: `hmv_test_<32-hex-characters>`

> ⚠️ **Security Warning:** Never commit your API key to public version control or expose it in client-side browser code. Always inject it via environment variables (`HERMIV_API_KEY`).

***

## 2. Authentication Methods

Hermiv supports three flexible authorization methods depending on your transport protocol:

### Method A: HTTP Request Header (Recommended for REST)

Send your key in the `X-Hermiv-Key` or standard `Authorization` header:

```bash
# Using X-Hermiv-Key
curl -H "X-Hermiv-Key: hmv_live_9a7d8e6c4b2a1f0e8d7c6b5a4f3e2d1c" \
     "https://api.minerva-id.xyz/v1/signals"

# Using Authorization Bearer
curl -H "Authorization: Bearer hmv_live_9a7d8e6c4b2a1f0e8d7c6b5a4f3e2d1c" \
     "https://api.minerva-id.xyz/v1/signals"
```

### Method B: URL Query Parameter (Recommended for SSE & Web Browsers)

Because native browser `EventSource` cannot send custom HTTP headers, you can append your key via the `api_key` query parameter:

```bash
curl -N "https://api.minerva-id.xyz/v1/stream?api_key=hmv_live_9a7d8e6c4b2a1f0e8d7c6b5a4f3e2d1c"
```

### Method C: WebSocket Handshake Message

When connecting to `wss://api.minerva-id.xyz/v1/ws`, you can authenticate immediately after connection:

```json
{
  "action": "auth",
  "key": "hmv_live_9a7d8e6c4b2a1f0e8d7c6b5a4f3e2d1c"
}
```

The gateway confirms your authentication status:

```json
{
  "type": "authenticated",
  "status": "ok",
  "tier": "pro",
  "max_connections": 2
}
```

***

## 3. Account Tiers & Permissions

| Feature                    | Trial / Sandbox      | Pro Tier ($99/mo)         | Institutional / Quant ($299/mo)          |
| -------------------------- | -------------------- | ------------------------- | ---------------------------------------- |
| **Ingest Latency**         | 30s Artificial Delay | **Zero-Delay (< 0.1 ms)** | **Zero-Delay (< 0.1 ms)**                |
| **Max Concurrent Sockets** | 1 connection         | 2 connections             | 5 connections                            |
| **REST Rate Limit**        | 10 requests / min    | 60 requests / min         | 300 requests / min                       |
| **Chains Monitored**       | Solana               | Solana, Robinhood L2, BSC | Solana, Robinhood L2, BSC                |
| **Anti-Honeypot Gate**     | Basic                | Full Bytecode Vaccine     | Full Bytecode Vaccine + Priority Ingress |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hermiv.tech/authentication-and-security/api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
