https://api.abstract.inc/v1 carries an API key as a Bearer token:
/v1/responses.
GET /v1/models needs the key too.
Get a key
Theabstract CLI signs you in and saves a key on your machine.
abstract login prints a link and a code.
Open the link in a browser and confirm the code.
The CLI then creates a key on your account and saves it in ~/.config/abstract/credentials.json, readable by you alone.
A machine that is already signed in keeps its key.
The account needs a payment method or credit before the CLI can create a key.
Set one up at abstract.inc/start?setup=billing.
Use the key
abstract token prints the saved key and nothing else.
Pass it inside a command as $(abstract token):
ABSTRACT_API_KEY and sends it as the Bearer token.
Check the key
abstract status shows the saved key’s safe prefix and calls GET /v1/models with it.
Handle 401
The API answers HTTP 401 when the key is missing, wrong, or revoked.
Do not retry a 401 with the same key.
Revoke a key
See the CLI reference for every command.