Get started
Authentication
Every sign-in returns { token }, a Predict session token (sp_…). Send it as Authorization: Bearer <token>. It lasts 30 days and renews itself while in use; POST /auth/logout ends it.
A Predict session works only on this API. It can't call the Slay app's routes or touch the Slay (Canton) wallet, so a leaked Predict token can't reach anything beyond Predict.
- 401 means the session is gone: sign in again.
- 503 means a transient failure: keep the token and retry with backoff. Treating 503 as signed-out logs real users out.
- 403 `ACCOUNT_BANNED` means the account is suspended; every authenticated call answers the same way.
Store the token like a password: never in URLs or logs, and only on origins you control.
Clients holding a session from before Predict sessions existed (a Slay session) exchange it once with POST /auth/upgrade; the old session is revoked.