API
Authentication
API keys: creating them in the app, sending them, and revoking them.
API keys
Keys belong to a wallet. Create, name, list and revoke them at API keys in the app after signing in. A key looks like `aw_live_` followed by 43 characters. It is shown in full once, at creation; Allwit stores only a hash of it and the first characters (`aw_live_ab12…`) so you can tell your keys apart, along with when each was created and last used.
Treat a key like a password: it spends WIT from your wallet. Use one key per application so you can revoke one without touching the others. A wallet can hold up to 20 active keys.
Sending a key
Send the key as a bearer token on every request. That is exactly what the OpenAI SDKs do with `api_key`, so with them you set nothing else.
Authorization: Bearer aw_live_…| Response | Meaning |
|---|---|
| 401 `missing_api_key` | No `Authorization: Bearer` header. |
| 401 `invalid_api_key` | The key is unknown, malformed or has been revoked. |
Revoking
Revoke a key from the same page. Requests made with it fail with 401 from the next request on; nothing in flight is interrupted. Revoked keys stay in your list, marked revoked, so the record of what used them is kept.