Skip to content
Sign in Create account

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_version string or null
    Length: at most 20 characters
  • issued_at string (date-time) required
    Example: "2026-04-23T10:00:00Z"
  • local_ai_binary_hash string required
    Pattern: ^[a-f0-9]{64}$
  • local_ai_model string required
    Length: at most 200 characters
  • local_ai_runtime string required
    Length: at most 100 characters
  • local_ai_runtime_hash string or null
  • rag_chunk_hashes array of string or null
  • rag_index string or null
  • receipt_id string (uuid) required
  • request_hash string required
    Pattern: ^[a-f0-9]{64}$
  • response_hash string required
    Pattern: ^[a-f0-9]{64}$
  • route string required
    One of: "local"
  • scanner_verdict string or null
    One of: "pass", "medium", "high", null
  • session_id string required
    Length: at most 64 characters
  • signature string required
    Length: at most 200 characters
  • tool_calls array of object or null
    Items: at most 20 items

    Each item:

    • argument_hash string required
    • exit_code integer required
    • result_hash string required
    • tool_name string required
  • web_search_enabled boolean 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_index integer
  • receipt_id string
  • recorded boolean

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

403 The API key is restricted to a different source IP.

application/json object

  • error object required
    • code string required
      Value: "ip_not_allowed"
    • message string required
409 The receipt cannot be recorded because no device is paired or the receipt already exists.

application/json any

One of

  • object
    • error string required
      Value: "device_not_paired"
    • message string required
  • object
    • error string required
      Value: "duplicate_receipt"
    • message string required
422 Validation error

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 The route throttle limit was exceeded.

application/json object

  • message string required

text/html string