mint_key
Agent self-serve API key issuance. An autonomous agent that has no email inbox can obtain a free-tier API key by proving it holds the MACHINE_MINT_SECRET via HMAC-SHA256. Returns a usable key immediately with no human action required. If the operator has not activated a mint secret on the server, this returns an honest not_configured failure rather than a key - call it once and branch on that before planning around it. [free, no key]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | Yes | Random value (UUID or hex). Prevents replay attacks — use a fresh nonce each… | |
| agent_id | Yes | A stable unique identifier for this agent (e.g. a UUID). The issued key is… | |
| signature | Yes | HMAC-SHA256(agent_id + str(timestamp) + nonce, MACHINE_MINT_SECRET) as… | |
| timestamp | Yes | Unix epoch seconds at signing time. Must be within 60s of server time. |