Skip to main content
API Documentation

Authentication

Creating API keys, using bearer tokens, key security and rate limit headers.

Every request requires an API key. The key is sent in the Authorization header using the Bearer scheme; keys are not accepted as query parameters.

Request header

Add the header below to every request. If it is missing or the key is invalid, a 401 response is returned.

Authorization: Bearer ab_live_xxxxxxxxxxxxxxxxxxxxxxxx

Where do I get a key?

API keys are issued only from the API customer panel at www.astrowise.io/api-panel; your main site account does not grant API access. Create your API customer account there, buy a plan or an endpoint package, then generate your key.

Go to the API panel

Key lifecycle

  1. Creation The full key value is shown only once at creation time; afterwards only the last characters are visible.
  2. Rotation You can keep as many parallel keys as your plan allows, switching to a new one before retiring the old.
  3. Revocation Revoke a suspected leaked key instantly from the panel; requests made with a revoked key receive 401.

Key format

Live keys start with the ab_live_ prefix. The prefix makes it easy to detect a key that was accidentally shared in a codebase.

Never ship keys to the client

API keys must live server-side only. Keys placed in a browser, a mobile app bundle or a public repository are exposed to credit drain and abuse.

Rate limit headers

Every response carries headers reporting your remaining allowance. When the limit is exceeded a 429 is returned and the Retry-After header tells you how many seconds to wait.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
Retry-After: 24