Authentication

Authenticate requests with your 000 Labs API key.

Authenticate every request with your API key as a bearer token in the Authorization header. Requests without a valid key return 401.

HTTP header
Authorization: Bearer <000_LABS_API_KEY>

Environment variables

Store your 000 Labs key as 000_LABS_API_KEY. Since the name begins with digits, use env to pass it to your application:

shell
env 000_LABS_API_KEY="<your 000 Labs API key>" python3 app.py

Key options

OptionEffect when exceeded / not matched
Credit limitRequests return 402 once the key's lifetime spend reaches its limit.
ExpirationRequests return 401 after the expiry date.
Model accessRequests for models outside the list return 403. Ranges like openai/* are supported.
IP allowlistRequests from other IPs return 403. Single IPs and IPv4 CIDR ranges are supported.
Keep keys secret. Never ship a key in browser or mobile code. Keys are stored hashed — if you lose one, revoke it and create a new one.