Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentReceipts({
adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
}, {
passportId: "<id>",
});
for await (const page of result) {
console.log(page);
}
}
run();curl --request GET \
--url http://localhost:3001/v1/agents/{passportId}/receipts \
--header 'X-Admin-Key: <api-key>'import requests
url = "http://localhost:3001/v1/agents/{passportId}/receipts"
headers = {"X-Admin-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Admin-Key': '<api-key>'}};
fetch('http://localhost:3001/v1/agents/{passportId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/v1/agents/{passportId}/receipts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Admin-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/v1/agents/{passportId}/receipts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Admin-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/v1/agents/{passportId}/receipts")
.header("X-Admin-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/v1/agents/{passportId}/receipts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Admin-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"receipts": [
{
"run_id": "run_abc123def456",
"receipt_hash": "a3f2b8c1d4e5f6789012345678901234567890abcdef1234567890abcdef1234",
"model_passport_id": "ppt_model_7xK9mQ2v",
"compute_passport_id": "ppt_compute_Xn5vR2kJ",
"timestamp": 1710288000,
"metrics": {
"tokens_in": 42,
"tokens_out": 128,
"ttft_ms": 85
}
},
{
"run_id": "run_xyz789ghi012",
"receipt_hash": "b4c3d9e2f5a6b7890123456789012345678901abcdef5678901234567890bcde",
"model_passport_id": "ppt_model_7xK9mQ2v",
"compute_passport_id": "ppt_compute_Xn5vR2kJ",
"timestamp": 1710291600,
"metrics": {
"tokens_in": 100,
"tokens_out": 256,
"ttft_ms": 92
}
}
],
"total": 47,
"page": 1,
"per_page": 20,
"total_pages": 3
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}AgentMirror
Get agent receipts
Paginated receipts filtered by agent passport ID. Admin auth required.
GET
/
v1
/
agents
/
{passportId}
/
receipts
Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentReceipts({
adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
}, {
passportId: "<id>",
});
for await (const page of result) {
console.log(page);
}
}
run();curl --request GET \
--url http://localhost:3001/v1/agents/{passportId}/receipts \
--header 'X-Admin-Key: <api-key>'import requests
url = "http://localhost:3001/v1/agents/{passportId}/receipts"
headers = {"X-Admin-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Admin-Key': '<api-key>'}};
fetch('http://localhost:3001/v1/agents/{passportId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/v1/agents/{passportId}/receipts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Admin-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/v1/agents/{passportId}/receipts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Admin-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/v1/agents/{passportId}/receipts")
.header("X-Admin-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/v1/agents/{passportId}/receipts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Admin-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"receipts": [
{
"run_id": "run_abc123def456",
"receipt_hash": "a3f2b8c1d4e5f6789012345678901234567890abcdef1234567890abcdef1234",
"model_passport_id": "ppt_model_7xK9mQ2v",
"compute_passport_id": "ppt_compute_Xn5vR2kJ",
"timestamp": 1710288000,
"metrics": {
"tokens_in": 42,
"tokens_out": 128,
"ttft_ms": 85
}
},
{
"run_id": "run_xyz789ghi012",
"receipt_hash": "b4c3d9e2f5a6b7890123456789012345678901abcdef5678901234567890bcde",
"model_passport_id": "ppt_model_7xK9mQ2v",
"compute_passport_id": "ppt_compute_Xn5vR2kJ",
"timestamp": 1710291600,
"metrics": {
"tokens_in": 100,
"tokens_out": 256,
"ttft_ms": 92
}
}
],
"total": 47,
"page": 1,
"per_page": 20,
"total_pages": 3
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}Authorizations
Admin API key for internal/operator endpoints
Path Parameters
Agent passport identifier to get receipts for
Query Parameters
Page number for pagination (starts at 1)
Required range:
x >= 1Number of results per page (1-100)
Required range:
1 <= x <= 100⌘I
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)