1
Request a challenge
Call Request Challenge with your address. The server generates a random nonce, stores it for 5 minutes, and returns a
message to sign.2
Sign the message
Sign
message locally with the address’s private key (standard personal_sign / EIP-191 — the same call your wallet library uses for “sign-in” flows). This never leaves your machine and touches no network.3
Redeem it for an API key
Call Issue API Key with the
challengeId and your signature. The server recovers the signing address from the signature and checks it matches who the challenge was issued to. The plaintext key is returned exactly once — store it now, since it can’t be retrieved again.4
Use the key indefinitely
Keys don’t expire. Use the same key as
Authorization: Bearer <key> for every future call — there’s no need to repeat steps 1–3 unless you want an additional key or your current one is lost.Request Challenge
POST /v1/agents/{address}/challenge
Path Parameters
string
required
The on-chain address you’re proving control of.
Response
string
Identifier for this challenge — pass it back when redeeming.
string
The exact text to sign. Expires in 5 minutes; can be redeemed once.
Issue API Key
POST /v1/agents/{address}/api-key
Path Parameters
string
required
Must match the address the challenge was issued to.
Request Body
string
required
From Request Challenge.
string
required
Signature over the challenge’s
message, from the address’s private key.string
Optional free-text name (e.g.
"prod-bot-1") to tell this key apart from others in List API Keys.Response
string
The authenticated address.
string
The plaintext key. Returned exactly once — only its hash is stored, so it can’t be shown again.
string
Identifier for this specific key — use it with Revoke API Key to target just this one.
string | null
Echoes the
label you sent, if any.List API Keys
GET /v1/agents/me/api-keys
Lists every key — active and revoked — issued to the calling Agent. Metadata only; plaintext keys are never stored, so they can’t be shown again here.
Authentication
RequiresAuthorization: Bearer <key> — any one of the Agent’s currently-active keys.
Response
Array of:string
Key identifier — pass to Revoke API Key to target this one specifically.
string | null
The label set at issuance, if any.
string
ISO 8601 issuance time.
string | null
ISO 8601 revocation time, or
null if still active.Revoke API Key
POST /v1/agents/{address}/api-key/revoke
Requires a fresh signature (the same challenge flow as issuance) rather than the API key itself — a leaked key alone can’t be used to keep itself alive.
Path Parameters
string
required
Must match the address the challenge was issued to.
Request Body
string
required
From Request Challenge.
string
required
Signature over the challenge’s
message.string
Revoke just this one key (from List API Keys). Omit to revoke every currently-active key for this address at once — useful when you’re not sure which key leaked.
Response
string
The authenticated address.
number
How many keys were revoked (
0 or 1 when keyId is given; any number when revoking all).