Zum Inhalt springen
DeutschlandGPT

List API keys

Returns all non-archived API keys (user keys plus agent keys) for the caller's workspace, including their permissions, spending limits, and current-month spend. Admins see all keys; non-admins see only their own.

GEThttps://api.deutschlandgpt.de/v2/apiKeys

Example request

curl https://api.deutschlandgpt.de/v2/apiKeys \
  -X GET \
  -H "Authorization: Bearer $DGPT_API_KEY"

Response

200application/json
{
  "apiKeys": [
    {
      "id": "string",
      "name": "string",
      "obscuredApiKey": "string",
      "state": "active",
      "createdAt": "2025-01-01T00:00:00Z",
      "lastUsedAt": "2025-01-01T00:00:00Z",
      "monthlySpendingLimit": 0,
      "currentMonthSpend": 0,
      "adminScopes": [
        "admin:export_usage"
      ],
      "modelIds": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "documentFolderIds": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "customGptIds": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "restrictDocumentFolders": true,
      "restrictCustomGpts": true
    }
  ]
}

List of API keys

apiKeysobject[]required
idstringrequired

24-character key ID.

namestringrequired

Display name.

obscuredApiKeystringrequired

Masked key for display (e.g. sk_abc...xyz).

statestringrequired

Current key state.

createdAtstring<date-time>required

ISO 8601 creation timestamp.

lastUsedAtstring<date-time> | nulloptional

Last time the key was used, or null.

monthlySpendingLimitinteger | nullrequired

Monthly limit in microcents. Null = unlimited.

currentMonthSpendintegerrequired

Spend this calendar month in microcents.

adminScopesstring[]required

Admin scopes granted to this key.

modelIdsstring<uuid>[]required

Model IDs the key is restricted to. Empty = all models.

documentFolderIdsstring<uuid>[]required

Document folder IDs the key is restricted to (applies when restrictDocumentFolders is true).

customGptIdsstring<uuid>[]required

Custom GPT IDs the key is restricted to (applies when restrictCustomGpts is true).

restrictDocumentFoldersbooleanrequired

When false, the key can access all document folders; when true, access is limited to documentFolderIds.

restrictCustomGptsbooleanrequired

When false, the key can access all Custom GPTs; when true, access is limited to customGptIds.

Response codes

200

List of API keys

object
401

Unauthorized

403

Insufficient permissions

Was this page helpful?