API referenceInstance API
GUIDE & REFERENCE

Vectors

Every registered vectors instance operation, with source-derived inputs, outputs, access policy, and errors.

This reference covers 6 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.

MethodPathOperation
POST/v1/ml/vector/createVector create
POST/v1/ml/vector/addVector add
POST/v1/ml/vector/searchVector search
POST/v1/ml/vector/saveVector save
GET/v1/ml/vectorVector list
GET/v1/vector/healthVector health

POST /v1/ml/vector/create

Vector create

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonVectorCreateRequest

FieldRust typeRequired on inputNotes
nameStringYes
dimsusizeYes
metricStringYes
struct VectorCreateRequest {
    name: String,
    dims: usize,
    metric: String,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({"ok": true})

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:2896. Registration: akasha-daemon/src/main.rs:4570.

POST /v1/ml/vector/add

Vector add

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonVectorAddRequest

FieldRust typeRequired on inputNotes
nameStringYes
idStringYes
vectorVec<f32>Yes
struct VectorAddRequest {
    name: String,
    id: String,
    vector: Vec<f32>,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({"ok": true})

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:2915. Registration: akasha-daemon/src/main.rs:4571.

POST /v1/ml/vector/search

Vector search

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonVectorSearchRequest

FieldRust typeRequired on inputNotes
nameStringYes
vectorVec<f32>Yes
kusizeYes
struct VectorSearchRequest {
    name: String,
    vector: Vec<f32>,
    k: usize,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({"matches": results})

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:2935. Registration: akasha-daemon/src/main.rs:4572.

POST /v1/ml/vector/save

Vector save

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonVectorSaveRequest

FieldRust typeRequired on inputNotes
nameStringYes
struct VectorSaveRequest {
    name: String,
}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({"ok": true})

Errors and validation

Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:2953. Registration: akasha-daemon/src/main.rs:4573.

GET /v1/ml/vector

Vector list

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({"indices": db.vector_list()})

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:2964. Registration: akasha-daemon/src/main.rs:4574.

GET /v1/vector/health

Vector health

AvailabilitySource contract
Registrationconfig.enable_vector
Runtime servicevector
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

Serialization is delegated or the handler returns a raw response. Consult the exact handler below; the OpenAPI response intentionally remains unconstrained.

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10289. Registration: akasha-daemon/src/main.rs:4575.

On this page