Skip to main content

Overview

The Cost Optix API uses API keys for authentication. API keys are scoped to your organization and carry a permission level that controls what operations they can perform. API access is available on all tiers, with daily call limits depending on your plan:

Generating an API Key

  1. Log into your Cost Optix dashboard
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Give it a descriptive name (e.g. CI Pipeline, Grafana Integration)
  5. Select a permission level
  6. Optionally set an expiry date
  7. Copy the key immediately — it will not be shown again

Permission Levels


Using Your API Key

Include your API key in every request using the X-API-Key header:
Never expose your API key in client-side code or public repositories. Treat it like a password.

Base URL


Example Requests

Check authentication:
Get cost summary:

Key Rotation

API keys can be revoked at any time from Settings → API Keys. When rotating keys:
  1. Create the new key
  2. Update all systems using the old key
  3. Revoke the old key
Revocation is immediate — the old key will stop working as soon as it is revoked.

Rate Limiting

Requests that exceed your daily limit return a 429 Too Many Requests response. The response includes a Retry-After header indicating when your quota resets (midnight UTC).

Error Responses

All API errors follow a consistent format: