Trillet AI logo

Create API Key

Generate a new API key for authenticating requests to the Trillet API.

POSThttps://api.trillet.ai/v1/api/keys

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

Request Body

metadataobject

Optional metadata to associate with the API key.

Response Fields

keystring

The generated 32-character API key. Store this securely as it cannot be retrieved again.

_idstring

Unique identifier for the API key record.

userIdstring

User ID associated with the API key.

metadataobject

Metadata associated with the API key.

createdAtstring

Timestamp when the API key was created.

{
  "key": "tk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "_id": "665a1b2c3d4e5f6a7b8c9d0e",
  "userId": "664a1b2c3d4e5f6a7b8c9d0e",
  "metadata": {},
  "createdAt": "2024-06-01T09:00:00.000Z"
}