Token Kiosk
API Reference

API Keys

Documentation for /v1/auth/keys endpoints (Create, list, revoke).

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
ref_codestringnoReferral code to attribute this wallet to a referrer. Mutually exclusive with redeem_code.
redeem_codestringnoA one-time redemption code to credit this wallet's balance. Mutually exclusive with ref_code. If used, the response includes redeemed_credit_usdc.

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