Authentication
API key authentication, scopes, and rate limits
Authentication
All MarketIntell API endpoints require authentication via an API key. Keys can be passed in three ways:
Authorization: Bearer <key>header (recommended)X-API-Key: <key>header?api_key=<key>query parameter (for SSE connections only — not recommended for general use)
API Key Authentication
Include your API key in every request:
curl -X POST https://api.marketintell.ai/v1/chat \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"message": "BTC price analysis"}'Or with the X-API-Key header:
curl -X POST https://api.marketintell.ai/v1/chat \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"message": "BTC price analysis"}'API keys are prefixed with mi_k_.
Creating API Keys
After signing up, you can create additional API keys with specific scopes:
curl -X POST https://api.marketintell.ai/v1/auth/keys \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "Production Backend",
"scopes": ["read", "chat", "alpha"]
}'Available Scopes
| Scope | Description |
|---|---|
read | Read access to data endpoints |
write | Write/modify data |
chat | Access to the Chat API |
alpha | Access alpha signals and scans |
agents | Create and manage autonomous agents |
webhooks | Manage webhook subscriptions |
admin | Full administrative access (required for key management) |
Keys created via
/v1/auth/signupare grantedreadandchatscopes on the free tier.
Rate Limits
Rate limits are applied per API key and vary by subscription tier.
| Tier | Queries per Day | Rate Limit (req/min) |
|---|---|---|
| Free | 20 | 10 |
| Pro | 500 | 60 |
| Enterprise | Unlimited | 300 |
Rate Limit Headers
Every response includes headers indicating your current rate limit status:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Seconds until the rate limit window resets |
Example Response Headers
HTTP/1.1 200 OK
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 7
X-RateLimit-Reset: 45Rate Limit Exceeded
When you exceed your rate limit, the API returns a 429 Too Many Requests response:
{
"success": false,
"error": "Rate limit exceeded. Resets at 2025-01-16T00:00:00Z"
}See the Error Handling Guide for retry strategies when rate limited.
Security Best Practices
- Never expose API keys in client-side code. Use a backend proxy to forward requests.
- Rotate keys regularly. Create a new key, update your services, then revoke the old one.
- Use scoped keys. Give each key only the permissions it needs.
- Monitor usage. Check rate limit headers to track consumption.