Skip to content
Kumquat
Esc
↑↓navigate↵open⌘Jpreview

Get Runs Spend

What each listed run paid, priced from the ledger at read time. Not filtered by who may read the run: the spend dashboard already shows everyone’s, and this is the same figure per run.

GET/api/v1/runs/spend
Authorization
AuthorizationBearer token · headerrequired
or
AuthorizationOAuth2 access token · headerrequired
Query parameters
idsstring[]required
The runs a list is showing
max items 100
Responses
200Successful Response
successboolean
default: true
dataRunsSpend | any
Show properties
Any of:
RunsSpend
runsobjectrequired
any
any
messagestring | any
Show properties
Any of:
string
string
any
any
errorsstring[] | any
Show properties
Any of:
string[]
Array of string
string
any
any
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X GET "/api/v1/runs/spend?ids=string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "success": true,
  "data": {
    "runs": {
      "property1": {
        "usd": 0,
        "credits": 0,
        "calls": 0,
        "unpriced_calls": 0
      },
      "property2": {
        "usd": 0,
        "credits": 0,
        "calls": 0,
        "unpriced_calls": 0
      }
    }
  },
  "message": "string",
  "errors": [
    "string"
  ]
}