Record a local-inference receipt in the audit chain
POST /api/v1/local-mode/receipt
Called by the desktop gateway-lite after a local model inference. No prompt or response content is sent or stored: prompt, response, tool and RAG material arrive as SHA-256 hashes. Metadata such as the model name, runtime, session id and tool names is stored as sent. ECDSA signature verified against the device public key. Nonce replay window: 60 seconds.
Authenticate with an API key.
Request body
application/json LocalReceiptRequest
gateway_lite_versionstring or nullLength: at most 20 charactersissued_atstring (date-time) requiredExample:"2026-04-23T10:00:00Z"local_ai_binary_hashstring requiredPattern:^[a-f0-9]{64}$local_ai_modelstring requiredLength: at most 200 characterslocal_ai_runtimestring requiredLength: at most 100 characterslocal_ai_runtime_hashstring or nullrag_chunk_hashesarray of string or nullrag_indexstring or nullreceipt_idstring (uuid) requiredrequest_hashstring requiredPattern:^[a-f0-9]{64}$response_hashstring requiredPattern:^[a-f0-9]{64}$routestring requiredOne of:"local"scanner_verdictstring or nullOne of:"pass","medium","high",nullsession_idstring requiredLength: at most 64 characterssignaturestring requiredLength: at most 200 characterstool_callsarray of object or nullItems: at most 20 itemsEach item:
argument_hashstring requiredexit_codeinteger requiredresult_hashstring requiredtool_namestring required
web_search_enabledboolean required
Generated sample
{
"gateway_lite_version": "string",
"issued_at": "2026-04-23T10:00:00Z",
"local_ai_binary_hash": "string",
"local_ai_model": "string",
"local_ai_runtime": "string",
"local_ai_runtime_hash": "string",
"rag_chunk_hashes": [
"string"
],
"rag_index": "string",
"receipt_id": "00000000-0000-4000-8000-000000000000",
"request_hash": "string",
"response_hash": "string",
"route": "local",
"scanner_verdict": "pass",
"session_id": "string",
"signature": "string",
"tool_calls": [
{
"argument_hash": "string",
"exit_code": 0,
"result_hash": "string",
"tool_name": "string"
}
],
"web_search_enabled": true
}Responses
201 Receipt recorded
application/json LocalReceiptResponse
chain_indexintegerreceipt_idstringrecordedboolean
Generated sample
{
"chain_index": 0,
"receipt_id": "string",
"recorded": true
}401 Authentication is required or the supplied credentials are not accepted.
application/json any
One of
- ApiKeyUnauthorized
- object
messagestring required
403 The API key is restricted to a different source IP.
application/json object
errorobject requiredcodestring requiredValue:"ip_not_allowed"messagestring required
409 The receipt cannot be recorded because no device is paired or the receipt already exists.
application/json any
One of
- object
errorstring requiredValue:"device_not_paired"messagestring required
- object
errorstring requiredValue:"duplicate_receipt"messagestring required
422 Validation error
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
429 The route throttle limit was exceeded.
application/json object
messagestring required
text/html string