Skip to main content
For LangSmith Cloud, granular billable usage data collection started on January 5, 2026. Data is not available for usage before this date.For self-hosted instances, data collection begins when the feature is enabled via the following environment variables, or after upgrading to a version with it enabled by default.
LangSmith provides granular billable usage APIs that allow you to retrieve detailed trace usage data broken down by workspace, project, user, or API key. This enables you to:
  • Track usage across different teams or workspaces
  • Identify which users or API keys are consuming the most traces
  • Analyze usage patterns over time
  • Export usage data for internal reporting

Prerequisites

  • You must have the organization:read permission to access granular usage data.
  • You can only view usage for workspaces you have read access to.

View in the UI

You can also view granular usage data in the LangSmith UI:
  1. Navigate to Settings > Billing and Usage
  2. Select the Granular Usage tab
  3. Use the controls to:
    • Select a time range:
      • Last 7 days, 30 days, 3 months, 6 months, 1 year, or custom
    • Choose aggregation level (daily, weekly, or monthly)
    • Group by workspace, project, user, or API key
    • Filter to specific workspaces
  4. Click Export CSV to download the data

API endpoints

Get granular usage data

Retrieve granular usage data with flexible grouping options.

Query parameters

Response

The stride field indicates the time bucket size used for aggregation, calculated based on the requested time range:

Example: Get usage by workspace

Example: Get usage by user

Export usage as CSV

Export granular usage data as a downloadable CSV file.
This endpoint accepts the same query parameters as the granular usage endpoint and returns a CSV file. The CSV always includes all columns, but only the columns relevant to the selected group_by option are populated:

Example: Export to CSV

Grouping options

The group_by parameter determines how usage data is aggregated: