Inference
Every registered inference instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 12 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.
| Method | Path | Operation |
|---|---|---|
POST | /v1/inference/:model_id | Inference invoke |
GET | /v1/inference/jobs/:job_id | Inference job status |
GET | /v1/inference/models | Inference list models |
POST | /v1/inference/models | Inference register model |
GET | /v1/inference/models/:model_id | Inference get model |
DELETE | /v1/inference/models/:model_id | Inference delete model |
PATCH | /v1/inference/models/:model_id/status | Inference update model status |
GET | /v1/inference/backends/summary | Inference backend summary |
GET | /v1/inference/jobs | Inference jobs snapshot |
GET | /v1/inference/health | Inference health |
POST | /v1/inference/jobs/:job_id/retry | Inference retry job |
POST | /v1/inference/jobs/:job_id/cancel | Inference cancel job |
POST /v1/inference/:model_id
Inference invoke
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Json — UnifiedInferenceRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
tenant_id | String | Yes | |
payloads | Vec<InferencePayload> | No; optional or defaulted | Serde: default |
config | Option<Value> | No; optional or defaulted | Serde: default |
priority | Option<u8> | No; optional or defaulted | Serde: default |
deadline_ms | Option<u64> | No; optional or defaulted | Serde: default |
struct UnifiedInferenceRequest {
pub tenant_id: String,
#[serde(default)]
pub payloads: Vec<InferencePayload>,
#[serde(default)]
pub config: Option<Value>,
#[serde(default)]
pub priority: Option<u8>,
#[serde(default)]
pub deadline_ms: Option<u64>,
}Response
Declared return: Result<Json<UnifiedInferenceApiResponse>, DaemonError>
struct UnifiedInferenceApiResponse {
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<Uuid>,
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<InferenceResultEnvelope>,
pub backend: BackendKind,
pub telemetry: BackendTelemetrySnapshot,
pub metering: MeteringSnapshot,
}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:5194. Registration: akasha-daemon/src/main.rs:5164.
GET /v1/inference/jobs/:job_id
Inference job status
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<Json<JobStatus>, DaemonError>
enum JobStatus {
Pending {
queued_at: DateTime<Utc>,
},
Running {
started_at: DateTime<Utc>,
},
Completed {
finished_at: DateTime<Utc>,
result: Box<InferenceResultEnvelope>,
},
Failed {
finished_at: DateTime<Utc>,
error: String,
},
Cancelled {
finished_at: DateTime<Utc>,
},
}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:5208. Registration: akasha-daemon/src/main.rs:5165.
GET /v1/inference/models
Inference list models
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Query — InferenceModelQuery
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
tenant | Option<String> | No; optional or defaulted | |
backend | Option<String> | No; optional or defaulted | |
family | Option<String> | No; optional or defaulted | |
status | Option<String> | No; optional or defaulted | |
search | Option<String> | No; optional or defaulted |
struct InferenceModelQuery {
tenant: Option<String>,
backend: Option<String>,
family: Option<String>,
status: Option<String>,
search: Option<String>,
}Response
Declared return: Result<Json<InferenceModelListResponse>, 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.
InferenceModelListResponse {
models: service.list_models(&filter),
}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:5335. Registration: akasha-daemon/src/main.rs:5166.
POST /v1/inference/models
Inference register model
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — RegisterModelRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
model_id | String | Yes | |
tenant_id | String | Yes | |
owner | String | Yes | |
family | ModelFamily | Yes | |
backend | BackendKind | Yes | |
version | String | Yes | |
adapter_id | Option<String> | No; optional or defaulted | Serde: default |
hrm_entrypoint | Option<String> | No; optional or defaulted | Serde: default |
tags | Vec<String> | No; optional or defaulted | Serde: default |
capabilities | Vec<String> | No; optional or defaulted | Serde: default |
extra | Value | No; optional or defaulted | Serde: default |
status | Option<ModelStatus> | No; optional or defaulted | Serde: default |
struct RegisterModelRequest {
model_id: String,
tenant_id: String,
owner: String,
family: ModelFamily,
backend: BackendKind,
version: String,
#[serde(default)]
adapter_id: Option<String>,
#[serde(default)]
hrm_entrypoint: Option<String>,
#[serde(default)]
tags: Vec<String>,
#[serde(default)]
capabilities: Vec<String>,
#[serde(default)]
extra: Value,
#[serde(default)]
status: Option<ModelStatus>,
}Response
Declared return: Result<StatusCode, 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.
Explicit status constants: CREATED.
Source: akasha-daemon/src/main.rs:5295. Registration: akasha-daemon/src/main.rs:5166.
GET /v1/inference/models/:model_id
Inference get model
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<Json<ModelMetadata>, 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.
metadataErrors 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:5323. Registration: akasha-daemon/src/main.rs:5170.
DELETE /v1/inference/models/:model_id
Inference delete model
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<StatusCode, 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.
Explicit status constants: NO_CONTENT.
Source: akasha-daemon/src/main.rs:5358. Registration: akasha-daemon/src/main.rs:5170.
PATCH /v1/inference/models/:model_id/status
Inference update model status
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Json — InferenceUpdateStatusRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
status | ModelStatus | Yes |
struct InferenceUpdateStatusRequest {
status: ModelStatus,
}Response
Declared return: Result<Json<ModelMetadata>, 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.
updatedErrors 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:5346. Registration: akasha-daemon/src/main.rs:5174.
GET /v1/inference/backends/summary
Inference backend summary
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See 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<Json<Vec<BackendRuntimeReport>>, 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.
service.backend_reports()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:5369. Registration: akasha-daemon/src/main.rs:5178.
GET /v1/inference/jobs
Inference jobs snapshot
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Query — InferenceJobQuery
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
limit | Option<usize> | No; optional or defaulted |
struct InferenceJobQuery {
limit: Option<usize>,
}Response
Declared return: Result<Json<QueueSnapshot>, 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.
service.queue_snapshot(resolve_job_limit(query.limit))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:5376. Registration: akasha-daemon/src/main.rs:5182.
GET /v1/inference/health
Inference health
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See 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:10313. Registration: akasha-daemon/src/main.rs:5183.
POST /v1/inference/jobs/:job_id/retry
Inference retry job
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<Json<UnifiedInferenceApiResponse>, DaemonError>
struct UnifiedInferenceApiResponse {
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<Uuid>,
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<InferenceResultEnvelope>,
pub backend: BackendKind,
pub telemetry: BackendTelemetrySnapshot,
pub metering: MeteringSnapshot,
}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:5384. Registration: akasha-daemon/src/main.rs:5184.
POST /v1/inference/jobs/:job_id/cancel
Inference cancel job
| Availability | Source contract |
|---|---|
| Registration | config.enable_inference |
| Runtime service | inference |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<Json<JobStatus>, DaemonError>
enum JobStatus {
Pending {
queued_at: DateTime<Utc>,
},
Running {
started_at: DateTime<Utc>,
},
Completed {
finished_at: DateTime<Utc>,
result: Box<InferenceResultEnvelope>,
},
Failed {
finished_at: DateTime<Utc>,
error: String,
},
Cancelled {
finished_at: DateTime<Utc>,
},
}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:5398. Registration: akasha-daemon/src/main.rs:5188.