API Keys

Use API keys to authenticate requests, separate environments, and control spending per integration.

What You Can Do

  • Create up to 3 active API keys at the same time
  • Set an optional daily spend limit per key
  • Set an optional expiration date per key
  • Rename keys for production, staging, CI, or client-specific use
  • Revoke a key instantly if it should no longer be used

Create a Key

Open Dashboard → API Keys, click Create New Key, and enter:

  • A descriptive key name
  • An optional daily spend limit in USD
  • An optional expiration date and time

You will only see the full key once after creation. Save it in your secret manager immediately.

Use a Key

http
Authorization: Bearer sk_your_api_key_here
bash
curl https://api.cheapaiapi.com/v1/credits \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json"

Daily Spend Limits

If a key reaches its configured daily spend cap, further requests may return 429 until the daily window resets or the limit is raised.

This is useful for:

  • Protecting staging and test environments
  • Containing risk for client or partner integrations
  • Limiting spend for temporary experiments

Expiration Dates

Set an expiration date when access should end automatically, for example:

  • Contractor or agency access
  • One-off demos
  • Short-lived internal tools

Expired keys are no longer accepted and will return 401.

Recent Activity

Each key detail page includes recent task activity, including:

  • Timestamp
  • Task type
  • Model hint when available
  • Estimated cost charged to that key
  • Status and basic latency

Security Tips

  • Use separate keys for production, staging, and local development
  • Prefer short-lived keys for temporary collaborators
  • Set conservative spend caps on non-production keys
  • Revoke exposed keys immediately