Authentication

All API requests must include your API key. You can include it in two ways:

Option 1: Authorization Header (Recommended)

Use the Bearer token format in the Authorization header:

Authorization: Bearer bgapi_your_key_here

Option 2: X-API-Key Header

Alternatively, use the X-API-Key header:

X-API-Key: bgapi_your_key_here

Example Request

curl -X POST https://mycosmicadvisor.com/api/v1/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer bgapi_your_key_here" \
  -d '{"birthDate": "1990-12-25", ...}'

API Key Management

  • Create new API keys from your dashboard
  • Keep your API keys secure and never share them publicly
  • Delete compromised keys immediately and create new ones
  • Monitor usage in your dashboard

Security Best Practices

  • Store API keys in environment variables, never in code
  • Use separate API keys for development and production
  • Rotate API keys periodically
  • Implement rate limiting on your end to prevent abuse