Token Kiosk
API Reference

API Keys

Create, list, and revoke API keys. SIWE-authenticated.

Create API Key

POST /v1/auth/keys

Requires SIWE authentication in the request body.

curl -X POST https://agent-router.gaib.ai/v1/auth/keys \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<siwe-message>",
    "signature": "0x...",
    "label": "my-app"
  }'
{
  "id": 1,
  "key": "sk-a3f9e2b1c4d5...",
  "label": "my-app",
  "created_at": "2026-04-07T12:00:00.000Z"
}

The key field is returned only once. Store it immediately.

FieldTypeRequiredDescription
messagestringyesPrepared SIWE message
signaturestringyesHex-encoded wallet signature
labelstringnoHuman-readable label

List API Keys

GET /v1/auth/keys

Pass SIWE auth as query parameters.

curl "https://agent-router.gaib.ai/v1/auth/keys?message=<siwe>&signature=<sig>"
{
  "data": [
    {
      "id": 1,
      "label": "my-app",
      "created_at": "2026-04-07T12:00:00.000Z",
      "revoked_at": null
    }
  ]
}

Revoke API Key

DELETE /v1/auth/keys/:key_id

Requires SIWE authentication in the request body.

curl -X DELETE https://agent-router.gaib.ai/v1/auth/keys/1 \
  -H "Content-Type: application/json" \
  -d '{"message": "<siwe>", "signature": "0x..."}'
{ "revoked": true }

On this page