Skip to main content

Authentication

All API requests require an API key passed via the x-api-key header.

API Key Format

x-api-key: cs_live_abc123...

The cs_live_ prefix indicates a production key. Keep your API key secret — do not expose it in client-side code or public repositories.

Rate Limits

Rate limits are enforced per API key on a daily basis (UTC midnight reset).

TierDaily LimitDescription
Free1,000 requests/dayFor exploration and prototyping
Pro10,000 requests/dayFor production applications
Enterprise100,000 requests/dayFor high-volume integrations

Rate Limit Headers

Every successful response includes rate limit information:

x-ratelimit-limit: 1000
x-ratelimit-remaining: 997
x-ratelimit-reset: 1711411200
HeaderDescription
x-ratelimit-limitYour daily request limit
x-ratelimit-remainingRequests remaining today
x-ratelimit-resetUnix timestamp of next UTC midnight reset

When rate limited (HTTP 429), you'll also receive:

retry-after: 43200

The retry-after value is in seconds until your limit resets.

Error Codes

All errors follow a consistent format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}

Error Reference

StatusCodeDescriptionRecommended Action
400BAD_REQUESTInvalid request parametersCheck your query parameters
401MISSING_API_KEYNo API key in headerAdd x-api-key header to your request
401INVALID_API_KEYKey is invalid or revokedVerify your key in the API Keys Dashboard
403TIER_INSUFFICIENTEndpoint requires a higher tierUpgrade your plan
404NOT_FOUNDResource not foundCheck space_id or entity_id
429RATE_LIMIT_EXCEEDEDDaily limit exceededWait for reset (see retry-after header) or upgrade
500INTERNAL_ERRORServer errorRetry after a few seconds

Example Error Responses

401 — Missing API Key

{
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via x-api-key header."
  }
}

429 — Rate Limited

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Daily rate limit exceeded. Upgrade to Pro for higher limits.",
    "retry_after": 43200
  }
}

403 — Tier Insufficient

{
  "error": {
    "code": "TIER_INSUFFICIENT",
    "message": "This endpoint requires API Pro. Upgrade at https://chainsights.one/account/api-keys",
    "required_tier": "pro"
  }
}

Need more requests?

View pricing plans to upgrade your API tier for higher rate limits and access to premium endpoints.