curl -X GET "https://api.danubeai.com/v1/api-keys" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
keys = client.api_keys.list()
for key in keys:
print(f"{key.name} ({key.key_prefix}...)")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const keys = await client.apiKeys.list();
keys.forEach(key => console.log(`${key.name} (${key.keyPrefix}...)`));
[
{
"id": "abc123",
"key_prefix": "3q2xJd0e",
"name": "Production Key",
"created_at": "2026-01-15T10:00:00Z",
"last_used": "2026-02-20T14:30:00Z",
"permissions": null
},
{
"id": "def456",
"key_prefix": "nQ3vX8pK",
"name": "Restricted Key",
"created_at": "2026-02-01T10:00:00Z",
"last_used": null,
"permissions": {
"allowed_services": ["service_uuid_1"],
"allowed_tools": null,
"max_spend_per_call_cents": null,
"max_spend_per_day_cents": null
}
}
]
API Keys
List API Keys
List all active API keys for the authenticated user
GET
/
v1
/
api-keys
curl -X GET "https://api.danubeai.com/v1/api-keys" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
keys = client.api_keys.list()
for key in keys:
print(f"{key.name} ({key.key_prefix}...)")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const keys = await client.apiKeys.list();
keys.forEach(key => console.log(`${key.name} (${key.keyPrefix}...)`));
[
{
"id": "abc123",
"key_prefix": "3q2xJd0e",
"name": "Production Key",
"created_at": "2026-01-15T10:00:00Z",
"last_used": "2026-02-20T14:30:00Z",
"permissions": null
},
{
"id": "def456",
"key_prefix": "nQ3vX8pK",
"name": "Restricted Key",
"created_at": "2026-02-01T10:00:00Z",
"last_used": null,
"permissions": {
"allowed_services": ["service_uuid_1"],
"allowed_tools": null,
"max_spend_per_call_cents": null,
"max_spend_per_day_cents": null
}
}
]
Overview
Returns all active API keys for the authenticated user. The plaintext key value is never returned after creation — only thekey_prefix (first 8 characters) is shown for identification.
Auth: A dashboard session (Authorization: Bearer <jwt>) or an API key (danube-api-key). An agent can manage keys with its own key.
Query Parameters
string
List the keys that belong to this organization instead of the keys you created. An owner or admin of the organization gets every member’s keys, each with
user_id and created_by_name; a member gets only their own. 403 when you are not a member.Response
Returns an array of API key objects.string
API key UUID
string
First 8 characters of the key (for identification)
string
Display name for the key
string
ISO 8601 creation timestamp
string
ISO 8601 timestamp of last usage (null if never used)
string
The organization the key belongs to
object
Resource permissions.
null means unrestricted access.Example
curl -X GET "https://api.danubeai.com/v1/api-keys" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
keys = client.api_keys.list()
for key in keys:
print(f"{key.name} ({key.key_prefix}...)")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const keys = await client.apiKeys.list();
keys.forEach(key => console.log(`${key.name} (${key.keyPrefix}...)`));
[
{
"id": "abc123",
"key_prefix": "3q2xJd0e",
"name": "Production Key",
"created_at": "2026-01-15T10:00:00Z",
"last_used": "2026-02-20T14:30:00Z",
"permissions": null
},
{
"id": "def456",
"key_prefix": "nQ3vX8pK",
"name": "Restricted Key",
"created_at": "2026-02-01T10:00:00Z",
"last_used": null,
"permissions": {
"allowed_services": ["service_uuid_1"],
"allowed_tools": null,
"max_spend_per_call_cents": null,
"max_spend_per_day_cents": null
}
}
]
