Docs

Authentication


title: "Authentication"

Authentication

Every request to the Profile Scoring API must include your API key in the Authorization header as a Bearer token.

Authorization: Bearer ask_live_abc123def456

Generating a key

Sign in at ausynth.com and go to Account > API Keys. Click Create key. The key is shown once. Copy it and store it securely.

Keys start with ask_live_ followed by a random string. If you lose a key, you cannot retrieve it. Generate a new one and revoke the old one.

Using the key

Include the Authorization header in every API call. Do not pass the key as a URL parameter, in a query string, or in the request body. URL parameters are logged in server access logs and browser history, which exposes the key.

# Correct
curl -H "Authorization: Bearer ask_live_abc123def456" ...

# Wrong - never do this
curl "https://api.ausynth.com/api/score?api_key=ask_live_abc123def456"

Key rotation

To rotate a key, generate a new one from Account > API Keys, update your application to use the new key, then revoke the old key. Both keys will work simultaneously until you revoke the old one, so there is no downtime during rotation.

Keeping keys safe

Do not commit API keys to version control. Use environment variables or a secrets manager instead:

export AUSYNTH_API_KEY="ask_live_abc123def456"
import os
api_key = os.environ["AUSYNTH_API_KEY"]

If you believe a key has been compromised, revoke it immediately from Account > API Keys and generate a replacement.

What happens without a key

Requests without a valid Authorization header receive a 401 Unauthorized response:

{
  "error": "unauthorized",
  "message": "Missing or invalid API key. Generate one at /account/api."
}

Rate limits by account tier

TierRequests per hour
Free (5 credits/week)10
Paid100

Rate limits are per key. If you exceed the limit, you receive a 429 Too Many Requests response with a retry_after_seconds field. See Error Codes for details.

How to check your tier

Your current credit balance and account tier are visible on your dashboard. The tier is determined by whether you have an active credit bundle. Free accounts have 5 credits per week. Purchasing any bundle upgrades you to the paid tier for the bundle duration.

To upgrade, go to Account > Billing and select a credit bundle.