API · Get startedPremiers pas
Authentication
Every API call carries your Chainz sign-in token as a bearer token. How to get it and renew it.
Cette page est en anglais pour l'instant.Every call carries your sign-in token in the Authorization header:
Authorization: Bearer <token>Get your token
While signed in to Chainz in your browser, open:
$CHAINZ_URL/api/auth/tokenThe answer is JSON; the token is the idToken field. From a script, send your session cookie:
TOKEN=$(curl -s $CHAINZ_URL/api/auth/token \
--cookie "next-auth.session-token=$SESSION" | jq -r .idToken)$SESSION is the value of the next-auth.session-token cookie of the Chainz app (your browser's developer tools › Application › Cookies).
Warning
The token acts as you: anyone who has it can run your flows and spend your credits. Keep it out of code repositories and shared documents.
Expiry
The token expires like your session. When a call returns 401, get a new one.
API keys
Settings › API Keys can create keys, but they do not run flows yet. Use the token above until they do; this page will say when.
Browsers
/api/auth/token only answers pages of the Chainz app itself: a script on another website cannot read your token.
Last updated 2026-11-30Mis à jour le 2026-11-30