Get Run Spend
What each node of the run paid, priced from the ledger at read time.
GET
/api/v1/runs/{run_id}/spendAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
run_idstringrequiredResponses
200Successful Response
successbooleandefault: true
dataRunSpend | anyShow propertiesHide properties
Any of:
RunSpend
nodesobjectrequiredany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X GET "/api/v1/runs/string/spend" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/api/v1/runs/string/spend", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/api/v1/runs/string/spend",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"data": {
"nodes": {
"property1": {
"usd": 0,
"credits": 0,
"calls": 0,
"unpriced_calls": 0
},
"property2": {
"usd": 0,
"credits": 0,
"calls": 0,
"unpriced_calls": 0
}
}
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}