For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Management

Manage user API keys.

List user API keys

get

Return all API keys that belong to the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

List of user API keys

application/json
api_keystringRequired

API Key for use with completions API

Example: nexos-3****-56iupo3240v22
idstringRequired

Unique identifier for the API key

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

Display name for the API key

Example: Production API Key
enabledbooleanRequired

Whether the API key is enabled.

Example: true
removedbooleanRequired

Whether the API key has been soft-deleted

Example: false
created_atstring · date-timeOptional

The time the key was created.

Example: 2024-11-19T10:00:00Z
updated_atstring · date-timeOptional

The time the key was last updated.

Example: 2024-11-19T12:00:00Z
last_used_atstring · date-timeOptional

The time the key was last used.

Example: 2024-11-19T12:00:00Z
expiration_datestring · date-timeOptional

The date when the key expires. Null if the key does not expire.

Example: 2025-11-19T12:00:00Z
get/v1/user/api_keys
GET /v1/user/api_keys HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

List of user API keys

[
  {
    "api_key": "nexos-3****-56iupo3240v22",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Production API Key",
    "enabled": true,
    "removed": false,
    "created_at": "2024-11-19T10:00:00Z",
    "updated_at": "2024-11-19T12:00:00Z",
    "last_used_at": "2024-11-19T12:00:00Z",
    "expiration_date": "2025-11-19T12:00:00Z"
  }
]

Create user API key

post

Create a new API key for the current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 255Required

The name of the key (needs to be unique).

Example: My API Key
enabledbooleanOptional

Whether the API key is enabled. Only applicable when updating a key.

Example: true
expiration_datestring · date-time · nullableOptional

The date when the key expires. Null means no expiration.

Example: 2027-01-01T12:00:00Z
Responses
201

User API Key

application/json
api_keystringRequired

API Key for use with completions API

Example: nexos-3****-56iupo3240v22
idstringRequired

Unique identifier for the API key

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

Display name for the API key

Example: Production API Key
enabledbooleanRequired

Whether the API key is enabled.

Example: true
removedbooleanRequired

Whether the API key has been soft-deleted

Example: false
created_atstring · date-timeOptional

The time the key was created.

Example: 2024-11-19T10:00:00Z
updated_atstring · date-timeOptional

The time the key was last updated.

Example: 2024-11-19T12:00:00Z
last_used_atstring · date-timeOptional

The time the key was last used.

Example: 2024-11-19T12:00:00Z
expiration_datestring · date-timeOptional

The date when the key expires. Null if the key does not expire.

Example: 2025-11-19T12:00:00Z
post/v1/user/api_keys
POST /v1/user/api_keys HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "name": "My API Key",
  "enabled": true,
  "expiration_date": "2027-01-01T12:00:00Z"
}
201

User API Key

{
  "api_key": "nexos-3****-56iupo3240v22",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Production API Key",
  "enabled": true,
  "removed": false,
  "created_at": "2024-11-19T10:00:00Z",
  "updated_at": "2024-11-19T12:00:00Z",
  "last_used_at": "2024-11-19T12:00:00Z",
  "expiration_date": "2025-11-19T12:00:00Z"
}

Update many user API keys

post

Update multiple user API keys in a single request.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
Responses
200

Updated API keys

application/json
api_keystringRequired

API Key for use with completions API

Example: nexos-3****-56iupo3240v22
idstringRequired

Unique identifier for the API key

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

Display name for the API key

Example: Production API Key
enabledbooleanRequired

Whether the API key is enabled.

Example: true
removedbooleanRequired

Whether the API key has been soft-deleted

Example: false
created_atstring · date-timeOptional

The time the key was created.

Example: 2024-11-19T10:00:00Z
updated_atstring · date-timeOptional

The time the key was last updated.

Example: 2024-11-19T12:00:00Z
last_used_atstring · date-timeOptional

The time the key was last used.

Example: 2024-11-19T12:00:00Z
expiration_datestring · date-timeOptional

The date when the key expires. Null if the key does not expire.

Example: 2025-11-19T12:00:00Z
post/v1/user/api_keys/bulk
POST /v1/user/api_keys/bulk HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 145

{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "enabled": true,
      "expiration_date": "2026-01-01T00:00:00.000Z",
      "remove": true
    }
  ]
}
200

Updated API keys

[
  {
    "api_key": "nexos-3****-56iupo3240v22",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Production API Key",
    "enabled": true,
    "removed": false,
    "created_at": "2024-11-19T10:00:00Z",
    "updated_at": "2024-11-19T12:00:00Z",
    "last_used_at": "2024-11-19T12:00:00Z",
    "expiration_date": "2025-11-19T12:00:00Z"
  }
]

Delete user API key

delete

Permanently delete a user API key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keyIdstringRequired

The ID of the key.

Responses
204

API key deleted successfully.

No content

delete/v1/user/api_keys/{keyId}
DELETE /v1/user/api_keys/{keyId} HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update user API key

patch

Update a user API key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keyIdstringRequired

The ID of the key.

Body
namestring · min: 1 · max: 255Required

The name of the key (needs to be unique).

Example: My API Key
enabledbooleanOptional

Whether the API key is enabled. Only applicable when updating a key.

Example: true
expiration_datestring · date-time · nullableOptional

The date when the key expires. Null means no expiration.

Example: 2027-01-01T12:00:00Z
Responses
200

User API Key

application/json
api_keystringRequired

API Key for use with completions API

Example: nexos-3****-56iupo3240v22
idstringRequired

Unique identifier for the API key

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

Display name for the API key

Example: Production API Key
enabledbooleanRequired

Whether the API key is enabled.

Example: true
removedbooleanRequired

Whether the API key has been soft-deleted

Example: false
created_atstring · date-timeOptional

The time the key was created.

Example: 2024-11-19T10:00:00Z
updated_atstring · date-timeOptional

The time the key was last updated.

Example: 2024-11-19T12:00:00Z
last_used_atstring · date-timeOptional

The time the key was last used.

Example: 2024-11-19T12:00:00Z
expiration_datestring · date-timeOptional

The date when the key expires. Null if the key does not expire.

Example: 2025-11-19T12:00:00Z
patch/v1/user/api_keys/{keyId}
PATCH /v1/user/api_keys/{keyId} HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "name": "My API Key",
  "enabled": true,
  "expiration_date": "2027-01-01T12:00:00Z"
}
{
  "api_key": "nexos-3****-56iupo3240v22",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Production API Key",
  "enabled": true,
  "removed": false,
  "created_at": "2024-11-19T10:00:00Z",
  "updated_at": "2024-11-19T12:00:00Z",
  "last_used_at": "2024-11-19T12:00:00Z",
  "expiration_date": "2025-11-19T12:00:00Z"
}
Deprecated

Regenerate user API key

patch

Regenerate the value of a user API key.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keyIdstringRequired

The ID of the key.

Responses
200

User API Key

application/json
api_keystringRequired

API Key for use with completions API

Example: nexos-3****-56iupo3240v22
idstringRequired

Unique identifier for the API key

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

Display name for the API key

Example: Production API Key
enabledbooleanRequired

Whether the API key is enabled.

Example: true
removedbooleanRequired

Whether the API key has been soft-deleted

Example: false
created_atstring · date-timeOptional

The time the key was created.

Example: 2024-11-19T10:00:00Z
updated_atstring · date-timeOptional

The time the key was last updated.

Example: 2024-11-19T12:00:00Z
last_used_atstring · date-timeOptional

The time the key was last used.

Example: 2024-11-19T12:00:00Z
expiration_datestring · date-timeOptional

The date when the key expires. Null if the key does not expire.

Example: 2025-11-19T12:00:00Z
patch/v1/user/api_keys/{keyId}/regenerate
PATCH /v1/user/api_keys/{keyId}/regenerate HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "api_key": "nexos-3****-56iupo3240v22",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Production API Key",
  "enabled": true,
  "removed": false,
  "created_at": "2024-11-19T10:00:00Z",
  "updated_at": "2024-11-19T12:00:00Z",
  "last_used_at": "2024-11-19T12:00:00Z",
  "expiration_date": "2025-11-19T12:00:00Z"
}

Last updated