Export Granular Usage Csv
Changed onExport granular usage data as CSV.
Same kind semantics as /granular-usage. The CSV's value columns vary by kind:
- traces: single Traces column.
- langsmith_deployments: Nodes Executed, Agent Runs, Agent Uptime (seconds) columns. Dimension columns are identical across kinds.
Request
- Base URLhttps://api.smith.langchain.com
- URLhttps://api.smith.langchain.com/api/v1/orgs/current/billing/granular-usage/export
- Auth
- API key in header X-API-Key
- or API key in header X-Organization-Id
- or HTTP bearer
Query parameters
Dimensions for grouping granular usage data.
Which billable usage domain a granular-usage query targets.
- traces: trace counts.
- langsmith_deployments: LangSmith Deployment metrics (nodes executed, agent runs, agent uptime).
Default is traces for backward compatibility — existing callers of GET /granular-usage without a kind query param get the same response shape they always did.
Response
Successful Response
Changes
- breaking
the
/response's property type changed fromobjecttostringfor status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - info
added the new optional
queryrequest parameterkind - info
added the new optional
queryrequest parametertrace_tier - info
the
queryrequest parameterworkspace_idsbecame optional - info
added the new enum value
trace_tierto thequeryrequest parametergroup_by - info
queryrequest parameterworkspace_idslist-of-types was widened by adding typesnull - info
for the
queryrequest parameterworkspace_ids, the type was generalized fromarrayto no type
- breaking