Skip to main content
POST
/
v1
/
receipts
Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.receipts.create({
    modelPassportId: "ppt_model_7xK9mQ2v",
    computePassportId: "ppt_compute_Xn5vR2kJ",
    policyHash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    runtime: "vllm",
    tokensIn: 42,
    tokensOut: 128,
    ttftMs: 85,
    totalLatencyMs: 1200,
  });

  console.log(result);
}

run();
{
  "success": true,
  "receipt": {
    "run_id": "run_abc123def456",
    "model_passport_id": "ppt_model_7xK9mQ2v",
    "compute_passport_id": "ppt_compute_Xn5vR2kJ",
    "policy_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "runtime": "vllm",
    "timestamp": 1710288000,
    "receipt_hash": "a3f2b8c1d4e5f6789012345678901234567890abcdef1234567890abcdef1234",
    "receipt_signature": "3045022100...",
    "signer_pubkey": "7xK9mQ2vNbPfYkRd3JhEzV1LnWqA8tUcGp4SyDfH5Bo",
    "signer_type": "orchestrator",
    "metrics": {
      "ttft_ms": 85,
      "tokens_in": 42,
      "tokens_out": 128,
      "total_latency_ms": 1200
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Lucid API key (lk_live_... or lk_test_...)

Body

application/json

Input fields for creating a receipt. The backend computes the hash, signature, and wraps metrics.

model_passport_id
string
required
compute_passport_id
string
required
policy_hash
string
required
runtime
string
required
tokens_in
integer
required
tokens_out
integer
required
ttft_ms
integer
required
total_latency_ms
integer
timestamp
integer
trace_id
string
run_id
string
image_hash
string
model_hash
string
attestation
object
execution_mode
string
node_id
string
runtime_hash
string
gpu_fingerprint
string

Response

OK

success
boolean
required
receipt
object
required