HTTP API reference

All routes require Authorization: Bearer <api-key> except /health. Bodies are JSON unless noted.

Method & pathDescription
POST /v1/vectorsInsert a vector (with optional metadata).
PUT /v1/vectors/:idUpsert (replace) the vector for an id.
GET /v1/vectors/:idFetch a vector.
DELETE /v1/vectors/:idDelete a vector.
GET /v1/vectors/:id/payloadGet the JSON payload.
PUT /v1/vectors/:id/payloadReplace the payload.
PATCH /v1/vectors/:id/payloadMerge-patch the payload (RFC 7396).
POST /v1/searchk-NN search (vector, k, optional ef_search, filter).
POST /v1/build/bulkBulk build (raw float32 body; X-LSMVec-N / X-LSMVec-Dim headers). Empty DB only.
GET /v1/statsTombstone / bloom / counters.
GET /healthUnauthenticated liveness check.
GET /readyDB open & responsive.

Error codes: 400 invalid argument, 401 unauthorized, 404 not found, 413 payload too large, 429 rate limited, 5xx server error.

Python client reference

pip install lsmvec-client — dependency-free (stdlib urllib; numpy optional for bulk_build).

MethodNotes
insert(id, vector, metadata=None)Insert with optional metadata.
upsert(id, vector)Insert-or-replace the vector.
get(id) -> dict{"id", "vector"}.
delete(id)
get_payload(id) / set_payload(id, p) / merge_payload(id, p)Payload read / replace / merge-patch.
search(vector, k=10, ef_search=None, filter=None)Returns [SearchResult(id, distance)].
bulk_build(vectors, threads=0) -> dictOne-pass initial load (empty DB only).
stats() / health() / ready()Diagnostics.

Errors map to typed exceptions (all subclass LSMVecError): InvalidArgument (400), Unauthorized (401), NotFound (404), PayloadTooLarge (413), RateLimited (429), ServerError (5xx).

Build from source

Prerequisites: a C++17 compiler (GCC 8+/Clang 10+), CMake ≥ 3.10, Boost (headers), and zstd / snappy / lz4 / bz2 / zlib. On macOS also jemalloc.

# initialize the Aster submodule, then build
git submodule update --init --recursive
make aster        # builds lib/aster/librocksdb.a (required first)
make              # builds the static + shared libs and the test binary

For the Python engine module (requires Aster built + ninja):

python -m pip install .        # builds and installs the lsm_vec module
python -c "import lsm_vec; print('OK')"

Run the server (self-host)

Self-host the same HTTP API as Asteroid Cloud. Run the lsm_vec_http server (or the lsmvec Docker image), then point lsmvec-client at your own host (base_url="http://localhost:8000") — everything in the Asteroid Cloud section applies unchanged.

# environment knobs (graph params + threads)
LSMVEC_M=8 LSMVEC_MMAX=24 LSMVEC_EFC=32 LSMVEC_HTTP_THREADS=1 \
  ./build/bin/lsm_vec_http   # serves the REST API on :8000

Back to Asteroid Cloud · Asteroid Database (LSM-Vec).