Start Authentication
Authentication
Every call carries one key, and the key decides what the call may do and spend.
Send your key as Authorization: Bearer <key> or as x-api-key: <key>. Keys are kept only as a hash, so each is shown once when you create it and can't be read back.
Rename or revoke a key in Moth Console at any time. A key can also carry its own spend cap, expiry and list of models, which Keys and limits explains.
Keep keys on your server. A key shipped inside a browser or a phone app can be read by anyone who has the app.
Moth Chat and Moth Console sign in with your wallet instead, with one signature and no transaction, and act on the same balance as your keys.