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
      • GETGet model usage statistics
      • GETGet model usage details
Dashboard
LogoLogo
Runtype APIModel Usage

Get model usage details

GET
/v1/model-usage/:modelConfigId
GET
/v1/model-usage/:modelConfigId
$curl https://api.runtype.com/v1/model-usage/modelConfigId \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "meta": {
3 "dataSource": "runtype-analytics-db"
4 },
5 "modelConfig": {
6 "displayName": "GPT-4 Turbo - Chat",
7 "id": "cfg_9a8b7c6d5e4f3g2h1i0j",
8 "modelId": "gpt-4-turbo",
9 "provider": "OpenAI"
10 },
11 "recentUsage": [
12 {
13 "id": "usage_20240601_001",
14 "timestamp": "2024-06-01T14:22:00Z",
15 "completionTokens": 350.5,
16 "estimatedCost": 0.042,
17 "executionTime": 1.25,
18 "promptTokens": 150,
19 "totalTokens": 500.5
20 },
21 {
22 "id": "usage_20240601_002",
23 "timestamp": "2024-06-01T15:10:00Z",
24 "completionTokens": 420,
25 "estimatedCost": 0.05,
26 "executionTime": 1.4,
27 "promptTokens": 180,
28 "totalTokens": 600
29 }
30 ]
31}
Get detailed usage statistics for a specific model configuration.
Was this page helpful?
Previous

List products

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

modelConfigIdstringRequired

Response

Model usage details
metaobject
modelConfigobject
recentUsagelist of objects

Errors

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