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
      • POSTBulk delete records
      • GETList records
      • POSTCreate record
      • GETDiscover record schema
      • GETGet field values
      • POSTPreview record filter
      • GETGet record details
      • PUTUpdate record
      • DELDelete record
      • GETGet record step results
      • GETGet record costs
      • GETGet record results
      • DELDelete record result
      • POSTBulk edit records
      • POSTUpload CSV records
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: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "totalCost": 12.75,
3 "totalTokens": 4500,
4 "promptTokens": 1800,
5 "completionTokens": 2700,
6 "executionCount": 15,
7 "modelBreakdown": [
8 {
9 "model": "gpt-4-turbo",
10 "cost": 9,
11 "tokens": 3200,
12 "count": 10
13 },
14 {
15 "model": "gpt-3.5-turbo",
16 "cost": 3.75,
17 "tokens": 1300,
18 "count": 5
19 }
20 ]
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
totalCostdouble
totalTokensinteger
promptTokensinteger
completionTokensinteger
executionCountinteger
modelBreakdownlist of objects

Errors

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