Skip to content

Latest commit

 

History

History
113 lines (87 loc) · 1.58 KB

File metadata and controls

113 lines (87 loc) · 1.58 KB

REST API

Base path:

/api/v1

If VORTEX_API_KEY is configured, all /api/** requests require:

X-Vortex-Api-Key: <secret>

Clients may send:

X-Request-ID: client-request-id

A safe request ID is echoed in the response.

Create index — JSON

POST /api/v1/indexes
Content-Type: application/json
{
  "vectorCount": 2,
  "dimension": 3,
  "vectors": [
    1.0, 0.0, 0.0,
    0.0, 1.0, 0.0
  ]
}

Create index — binary

POST /api/v1/indexes
Content-Type: application/octet-stream
X-Vortex-Vector-Count: 2
X-Vortex-Dimension: 3

Body: six little-endian float32 values.

Single search

POST /api/v1/indexes/{id}/search
{
  "query": [1.0, 0.0, 0.0],
  "topK": 2,
  "precision": "FP32_EXACT"
}

Precision values:

FP32_EXACT
FP16_STORAGE_FP32_ACCUMULATION

Batch search

POST /api/v1/indexes/{id}/search/batch
{
  "queries": [
    1.0, 0.0, 0.0,
    0.0, 1.0, 0.0
  ],
  "queryCount": 2,
  "topK": 2,
  "precision": "FP32_EXACT"
}

Other endpoints

GET    /api/v1/indexes
GET    /api/v1/indexes/{id}
DELETE /api/v1/indexes/{id}
GET    /api/v1/system

Error statuses

400  invalid shape/value/topK
401  API key missing or invalid
404  index not found
413  request Content-Length exceeds configured limit
429  GPU search concurrency unavailable
507  active-index or vector-memory capacity exceeded
503  native CUDA/JNI engine failure
500  unexpected server failure

Errors use application/problem+json and include a request ID when available.