API Keys
Manage your API keys in the dashboard and use them to authenticate API requests.
- Dashboard:
/dashboard/api-keys
- Create, rotate, revoke keys. For security, store full keys securely—only shown once on creation.
Get current key info
Endpoint: GET /api/v1/apikeys/me
curl -X GET "https://api.kushrouter.com/api/v1/apikeys/me" \
-H "Authorization: Bearer $API_KEY"
Example response:
{
"data": {
"id": "key_123",
"name": "Default key",
"created": "2025-09-10T12:34:56.000Z",
"expiresAt": null,
"isActive": true,
"rateLimit": 60,
"rateLimitRemaining": 59,
"rateLimitReset": 1739124000,
"quota": 100.0,
"used": 25.3,
"lastUsed": null,
"models": ["gpt-4o-mini", "claude-3-5-sonnet-20241022"],
"permissions": ["messages:write", "batches:write"]
}
}
Rotate API key
Endpoint: POST /api/v1/apikeys/rotate
curl -X POST "https://api.kushrouter.com/api/v1/apikeys/rotate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Example response:
{
"newApiKey": "kr_live_..._new_secret_value_shown_once"
}
Note: The full secret is only returned once upon rotation. Save it in a secure store.