MarketIntell

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:

  1. Authorization: Bearer <key> header (recommended)
  2. X-API-Key: <key> header
  3. ?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

ScopeDescription
readRead access to data endpoints
writeWrite/modify data
chatAccess to the Chat API
alphaAccess alpha signals and scans
agentsCreate and manage autonomous agents
webhooksManage webhook subscriptions
adminFull administrative access (required for key management)

Keys created via /v1/auth/signup are granted read and chat scopes on the free tier.

Rate Limits

Rate limits are applied per API key and vary by subscription tier.

TierQueries per DayRate Limit (req/min)
Free2010
Pro50060
EnterpriseUnlimited300

Rate Limit Headers

Every response includes headers indicating your current rate limit status:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetSeconds 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: 45

Rate 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.

On this page