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.ai/v1/models \
-H "Authorization: Bearer $AERLESS_API_KEY"Python
client = OpenAI(
base_url="https://api.aerless.ai/v1",
api_key=os.environ["AERLESS_API_KEY"],
)Node
const client = new OpenAI({
baseURL: "https://api.aerless.ai/v1",
apiKey: process.env.AERLESS_API_KEY,
});Limits on a key#
All optional, set per key in the dashboard.
Models: limit a key to chosen models. Others get 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 mobile app.
- Leaked? Delete it and create a new one. Report misuse to support@aerless.ai.
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 blocks |
| 429 | rate_limited | Too many invalid-key requests from your address; wait for Retry-After |