Create spend key
Spend Keys
Create spend key
Create a new spend key for the authenticated wallet. The raw key is returned once in the response — store it securely. Requires a merchant secret key (aks_live_* / aks_test_*).
POST
Create spend key
Authorizations
Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'
Body
application/json
Maximum string length:
255Available options:
active, paused Available options:
openai, anthropic Minimum array length:
1Response
201 - application/json
Spend key created
Masked key preview (e.g., lava_sk_a1b2c3d4****)
Available options:
active, paused Request format this key accepts
Available options:
openai, anthropic Current spend in this cycle (decimal string)
Total spend tracked for this key across completed/current cycles (decimal string)
Current request count in this cycle
Required range:
x >= 0Total request count tracked for this key across completed/current cycles
Required range:
x >= 0The raw spend key (shown once)