Authentication

Every request sends your key in the Authorization header.

AERLESS_, then 32 letters, digits, - or _

Where it goes#

request
curl
curl https://api.aerless.si/v1/models \
  -H "Authorization: Bearer $AERLESS_API_KEY"
Python
client = OpenAI(
    base_url="https://api.aerless.si/v1",
    api_key=os.environ["AERLESS_API_KEY"],
)
Node
const client = new OpenAI({
  baseURL: "https://api.aerless.si/v1",
  apiKey: process.env.AERLESS_API_KEY,
});

Limits on a key#

All optional, set per key in the dashboard.

Spend limit per day, week, month or lifetime. Past it: 402 key_limit, before any charge.
Expiry: after it the key stops working.

Models: limit a key to the models you pick. Any other model is refused with 403.

Keeping keys safe#

  • The full key is shown once. Lost it? Create a new one.
  • One key per app, so you can revoke one alone.
  • Keep keys on the server, never in a web page or a mobile app.
  • If a key leaks, delete it and create a new one. Report misuse to support@aerless.io.

Errors#

StatusCodeMeaning
401invalid_api_keyNo key, or unknown, disabled, deleted or expired
403account_bannedThe account is banned
403account_suspendedSuspended for an hour after repeated blocked requests or answers
429rate_limitedToo many requests with invalid keys from your address; wait for Retry-After