Direct API clients sign in with AgentDoor, using an Ed25519 key pair you hold. The base URL is https://api.fereai.xyz. The hosted MCP login in the browser is a different path; see MCP Support.

The flow

1

Register your public key

POST /v1/auth/register
Returns a registration_id and a challenge. The registration expires after 5 minutes.
2

Sign the challenge to verify

POST /v1/auth/verify
Returns your agent_id. Fere creates the account and its wallets on this step. Keep the agent_id; you need it for every token.
3

Mint a token

POST /v1/auth/token
timestamp is the current Unix time in seconds, as a string, and must be within 300 seconds of Fere’s clock. Returns a token starting with agt_ and expires_in (3600 seconds).
4

Call the API

Send Authorization: Bearer agt_... on every call. When the token expires, mint a new one with a fresh timestamp. You don’t register again.

Errors

Every AgentDoor error body has the same shape. Read detail.error.code.

Rate limits on sign-in

The three sign-in routes have a per-IP limit at the edge: register and verify share 10 per minute and 50 per hour, and token allows 120 per minute. That 429 has a plain body, {"message": "API rate limit exceeded", "request_id": "..."}, with no detail.error. Wait at least Retry-After seconds, then send the same request once. Don’t register a new key to get a fresh budget. Calls made after sign-in have a separate per-account limit; see Rate limits.