Create an API key

Up to five active keys. Choose only the access your integration needs.

Key options Project, environment, expiry and budget
!

Keep every key in a server-side environment variable or secret manager. Revoke a key immediately if it is exposed.

Your API keys

Loading active keys…

Advanced environment controls Optional budgets and access limits

Environment controls

Limit access or set a shared monthly budget across your keys in each environment. These settings do not add plan features. Existing policies remain in effect.

Loading environment controls…

Make your first request Server-side example and security essentials

Set COSMIC_API_KEY securely on your server. This example requires astro:birth-chart or astro:* and uses one standard credit.

curl https://api.cosmicephemeris.com/api/astro/birth-chart \
  -H "X-API-Key: $COSMIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2000-01-01","time":"12:00","timezone":"UTC","lat":0,"lon":0}'

Use separate keys for each integration. For planned rotation, create a replacement, update your server, verify requests, then revoke the old key. Revoke exposed keys immediately.

Authentication and key security · Request examples · Tarot and readings requests