Overview
The CostOptix API uses API keys. A key belongs to your organisation and carries permissions that control what it can do. Every plan includes API access, with a daily call limit:
Limits reset at 00:00 UTC.
Creating a key
- Go to Settings → API Keys and click Create API Key.
- Give it a name you will recognise, such as
CI pipelineorGrafana. - Pick its permissions.
- Optionally set an expiry: 7 days, 30 days, 90 days or 1 year.
- Copy the key straight away. It is shown only once.
Permissions
The four
ingest permissions are deliberately narrow. A key that holds only ingest permissions can push that data and nothing else: it cannot read costs or change settings. Adding read, write or admin to the same key removes that limit, so keep ingest keys separate. That makes them safe to leave on a cluster, a machine or a developer laptop. The guided setup on the Kubernetes, Hosts and LLM Usage pages creates the right key for you.
Using a key
Send the key in theX-API-Key header:
Examples
List connected accounts:month for the current month.
Rotating and revoking keys
Revoke a key at any time from Settings → API Keys. Revocation is immediate. To rotate without downtime:- Create the new key.
- Update everything that uses the old one.
- Revoke the old key.
Rate limits
When the daily limit is reached, the API returns429 Too Many Requests with details of the limit and when it resets: