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://api-token-kiosk.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://api-token-kiosk.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
    }
  ]
}

Update API Key

PATCH /v1/auth/keys/:key_id

Update a key's label and/or spend limit. Requires SIWE authentication in the request body.

curl -X PATCH https://api-token-kiosk.gaib.ai/v1/auth/keys/1 \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<siwe>",
    "signature": "0x...",
    "label": "new-label",
    "budget_usd": 10.0
  }'
{
  "id": 1,
  "label": "new-label",
  "key_prefix": "sk-1234...5678",
  "created_at": "2026-04-07T12:00:00.000Z",
  "revoked_at": null,
  "budget_micro_usd": 10000000,
  "budget_usd": 10,
  "spent_micro_usd": 0,
  "spent_usd": 0,
  "locked_micro_usd": 0,
  "locked_usd": 0
}
FieldTypeRequiredDescription
messagestringyesPrepared SIWE message
signaturestringyesHex-encoded wallet signature
labelstringnoNew label (or empty/null to clear)
budget_usdnumbernoSpend cap in USD (or null to remove the limit)

Revoke API Key

DELETE /v1/auth/keys/:key_id

Requires SIWE authentication in the request body.

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

On this page