LLM Inference with Receipt
curl --request POST \
--url https://api.truthlocks.com/v1/orchestrate/llm/inference \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_id": "<string>",
"prompt_hash": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
model_id: '<string>',
prompt_hash: '<string>',
provider: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/orchestrate/llm/inference', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/orchestrate/llm/inference"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_id": "<string>",
"prompt_hash": "<string>",
"provider": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/orchestrate/llm/inference"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_id\": \"<string>\",\n \"prompt_hash\": \"<string>\",\n \"provider\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"response": "<string>",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokens_used": 123,
"cost": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Orchestrations & Workflows
Record LLM Inference
Record an LLM inference call within an orchestration for cost tracking and provenance auditing.
POST
/
v1
/
orchestrate
/
llm
/
inference
LLM Inference with Receipt
curl --request POST \
--url https://api.truthlocks.com/v1/orchestrate/llm/inference \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_id": "<string>",
"prompt_hash": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
model_id: '<string>',
prompt_hash: '<string>',
provider: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/orchestrate/llm/inference', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/orchestrate/llm/inference"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_id": "<string>",
"prompt_hash": "<string>",
"provider": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/orchestrate/llm/inference"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"model_id\": \"<string>\",\n \"prompt_hash\": \"<string>\",\n \"provider\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"response": "<string>",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokens_used": 123,
"cost": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Records an individual LLM inference call that occurred within a running orchestration. Each inference record captures the model, provider, token counts, latency, cost, and content hashes — enabling fine-grained cost attribution and provenance auditing of every AI decision.
This endpoint is called by agent runtimes after each LLM API call completes. The inference record is linked to the parent orchestration and included in the final transparency-log receipt.
Response
Body
application/json

