How to authenticate REST and WebSocket requests with your API key.
All InsightX API requests require a valid API key. Your key is a UUID tied to your account and determines your rate limits and feature access.
Create an account and manage your API keys at the InsightX Hub.
REST API
Pass your API key in the X-API-Key header on every request:
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.insightx.network/scanner/v1/tokens/sol/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key (UUID format) |
Error Responses
| Scenario | Status | Detail |
|---|---|---|
| Missing header | 401 | Missing X-API-Key |
| Invalid format | 401 | Invalid API key format |
| Key not found or inactive | 401 | API key not active |
WebSocket API
Pass your API key as a query parameter when opening the connection:
wss://api.insightx.network/ws/?api-key=YOUR_API_KEY
If the key is missing, malformed, or inactive, the server rejects the connection with close code 4401 before the handshake completes. See WebSocket Error Codes for the full list.
Rate Limits
Your API plan defines two rate-limiting windows for REST requests:
| Window | Description |
|---|---|
| Per minute | Maximum number of requests allowed per calendar minute |
| Per month | Maximum number of requests allowed per calendar month |
Rate limit counters are tracked per client account, not per individual API key. If you have multiple keys under one account, they share the same limits.
Rate Limit Headers
Every successful REST response includes headers showing your remaining quota:
| Header | Description |
|---|---|
X-RateLimit-Minute-Remaining | Requests remaining in the current minute window |
X-Quota-Month-Remaining | Requests remaining in the current month window |
When You Exceed a Limit
| Window | Status | Header |
|---|---|---|
| Minute limit | 429 Too Many Requests | Retry-After set to seconds until the current minute expires |
| Month limit | 429 Too Many Requests | -- |
Free Tier IP Limits
Free-tier accounts have an additional per-IP rate limit to prevent abuse. If you're on a free plan, the following headers also appear:
| Header | Description |
|---|---|
X-RateLimit-IP-Minute-Remaining | Per-IP requests remaining this minute |
X-RateLimit-IP-Month-Remaining | Per-IP requests remaining this month |
WebSocket Limits
WebSocket connections have separate limits from REST requests:
| Limit | Description |
|---|---|
| Max connections | Maximum simultaneous WebSocket connections across all your keys |
| Max topics | Maximum address+stream subscriptions on a single connection |
See WebSocket Overview for details on plan limits and how they are enforced.
Managing Your Account
To create or revoke API keys, view your current plan, or upgrade, visit the InsightX Hub.