/v1/api-keysCreate a new API key and site ID. The API key is returned in cleartext only once — it is stored hashed on the server.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | optional | Display name for your site. Min 1, max 255 chars. Defaults to "My Website". |
| callback_url | string | optional | Your callback URL. Must be a valid URL if provided. |
Response 201
{ "api_key": "avk_...", "site_id": "site_...", "_notice": "Save your api_key now — it cannot be retrieved again.", "integration": { "button_html": "<a href=\"https://auth.auth-agents.com/v1/agent-login?api_key=site_...&redirect_uri=YOUR_CALLBACK_URL\">For AI Agents</a>", "verify_session": "GET https://auth.auth-agents.com/v1/sessions/{session_id} with Authorization: Bearer avk_..." }}Response 429
{ "error": "too_many_requests", "error_description": "Rate limit exceeded. Try again in 3542 seconds."}