API referenceInstance API
GUIDE & REFERENCE

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.

MethodPathOperation
POST/v1/inference/:model_idInference invoke
GET/v1/inference/jobs/:job_idInference job status
GET/v1/inference/modelsInference list models
POST/v1/inference/modelsInference register model
GET/v1/inference/models/:model_idInference get model
DELETE/v1/inference/models/:model_idInference delete model
PATCH/v1/inference/models/:model_id/statusInference update model status
GET/v1/inference/backends/summaryInference backend summary
GET/v1/inference/jobsInference jobs snapshot
GET/v1/inference/healthInference health
POST/v1/inference/jobs/:job_id/retryInference retry job
POST/v1/inference/jobs/:job_id/cancelInference cancel job

POST /v1/inference/:model_id

Inference invoke

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "type": "string"
}

JsonUnifiedInferenceRequest

FieldRust typeRequired on inputNotes
tenant_idStringYes
payloadsVec<InferencePayload>No; optional or defaultedSerde: default
configOption<Value>No; optional or defaultedSerde: default
priorityOption<u8>No; optional or defaultedSerde: default
deadline_msOption<u64>No; optional or defaultedSerde: 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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

QueryInferenceModelQuery

FieldRust typeRequired on inputNotes
tenantOption<String>No; optional or defaulted
backendOption<String>No; optional or defaulted
familyOption<String>No; optional or defaulted
statusOption<String>No; optional or defaulted
searchOption<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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

JsonRegisterModelRequest

FieldRust typeRequired on inputNotes
model_idStringYes
tenant_idStringYes
ownerStringYes
familyModelFamilyYes
backendBackendKindYes
versionStringYes
adapter_idOption<String>No; optional or defaultedSerde: default
hrm_entrypointOption<String>No; optional or defaultedSerde: default
tagsVec<String>No; optional or defaultedSerde: default
capabilitiesVec<String>No; optional or defaultedSerde: default
extraValueNo; optional or defaultedSerde: default
statusOption<ModelStatus>No; optional or defaultedSerde: 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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "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.

metadata

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:5323. Registration: akasha-daemon/src/main.rs:5170.

DELETE /v1/inference/models/:model_id

Inference delete model

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "type": "string"
}

JsonInferenceUpdateStatusRequest

FieldRust typeRequired on inputNotes
statusModelStatusYes
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.

updated

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:5346. Registration: akasha-daemon/src/main.rs:5174.

GET /v1/inference/backends/summary

Inference backend summary

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
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<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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

QueryInferenceJobQuery

FieldRust typeRequired on inputNotes
limitOption<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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
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:10313. Registration: akasha-daemon/src/main.rs:5183.

POST /v1/inference/jobs/:job_id/retry

Inference retry job

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "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

AvailabilitySource contract
Registrationconfig.enable_inference
Runtime serviceinference
Handler dependenciesSee handler source and return expressions.

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

Request

PathString

{
  "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.

On this page