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.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | Prepared SIWE message |
signature | string | yes | Hex-encoded wallet signature |
label | string | no | Human-readable label |
ref_code | string | no | Referral code to attribute this wallet to a referrer. Mutually exclusive with redeem_code. |
redeem_code | string | no | A 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 }