For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList records
      • POSTCreate record
      • POSTBulk delete records
      • POSTBulk edit records
      • GETExport records as CSV
      • GETGet field values
      • POSTPreview record filter
      • GETDiscover record schema
      • POSTUpload CSV records
      • GETGet record details
      • PUTUpdate record
      • DELDelete record
      • GETGet record costs
      • GETGet record results
      • DELDelete record result
      • GETGet record step results
Dashboard
LogoLogo
Runtype APIRecords

Get record costs

GET
/v1/records/:id/costs
GET
/v1/records/:id/costs
$curl https://api.runtype.com/v1/records/id/costs \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "completionTokens": 450,
3 "executionCount": 3,
4 "modelBreakdown": [
5 {
6 "cost": 0.75,
7 "count": 2,
8 "model": "gpt-4o-mini",
9 "tokens": 1200
10 },
11 {
12 "cost": 0.35,
13 "count": 1,
14 "model": "gpt-3.5-turbo",
15 "tokens": 600
16 }
17 ],
18 "promptTokens": 1800,
19 "totalCost": 1.1,
20 "totalTokens": 2400
21}
Get aggregated cost breakdown for a specific record.
Was this page helpful?
Previous

Get record results

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Response

Cost aggregation
completionTokensinteger
executionCountinteger
modelBreakdownlist of objects
promptTokensinteger
totalCostdouble
totalTokensinteger

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error