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.
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#
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | No key, or unknown, disabled, deleted or expired |
| 403 | account_banned | The account is banned |
| 403 | account_suspended | Suspended for an hour after repeated blocked requests or answers |
| 429 | rate_limited | Too many requests with invalid keys from your address; wait for Retry-After |