Skip to main content
GET
Training Status
Get the current training status including indexes being trained and the first-train vector-count floor.

Authentication

Required - admin (root) API key via X-API-Key header. Per-user (cdbk_) keys are rejected with 403:
When RBAC is not enabled (CYBORGDB_SERVICE_ROOT_KEY unset), no header is required.

Request

This is a GET request with no request body. Authentication is required via the admin API key header.

Response

Training States

Training state is inferred from the currently_training and queued_indexes fields:
  • If currently_training is non-null, that index is actively being trained
  • Indexes in queued_indexes are waiting their turn
  • An index not in either field has completed or has not been trained

Exceptions

Authentication failed (invalid API key)
Authenticated with a per-user (cdbk_) key — training status requires the admin (root) API key
Internal server error

Example Usage

Get Training Status:
Monitor Training Progress:
Wait for Training Completion:
Check First-Train Floor:
Training is automatically triggered when:
  1. An untrained index’s vector count exceeds the first-train floor (num_vectors > retrain_threshold)
  2. A trained index grows enough that its optimal number of inverted lists exceeds the current n_lists
  3. Manual training is requested via the /v1/indexes/train endpoint
Set AUTO_TRAIN_DISABLED=true on the service to turn off automatic training. See Train an Encrypted Index for details.
Use this endpoint to avoid querying an index while it’s being trained, as training can temporarily affect query performance.