# Authentication

## Main API: HTTP, gRPC, and QUIC

The main NextBlock API uses an API key.

* For **HTTP**, send the API key in the `Authorization` header.
* For **gRPC**, send the API key in the `authorization` metadata field.
* For **QUIC**, send the API key once during the initial auth handshake on the bidirectional auth stream.

```
authorization: your-api-key-here
```

## TX Stream Uses Different Authentication

The TX Stream service does **not** use the same API-key authentication flow as the main API.

TX Stream access is tied to the Solana wallet that paid for the service, and the client authenticates by signing an auth message with that wallet.

See [TX Stream API](https://docs.nextblock.io/api/tx-stream) for the TX Stream-specific authentication flow.
