Skip to main content
Trace usage: For LangSmith Cloud, granular billable trace data collection started on January 5, 2026. Data is not available for traces ingested before this date.For Self-hosted instances, trace 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 Deployment usage uses a separate data source. For more details, refer to the LangSmith Deployment section.
LangSmith provides granular billable usage APIs that let you retrieve detailed usage data broken down by workspace, project, user, or API key. Two billable domains are supported by the same endpoint, selected via a kind query parameter:
  • Trace usage (kind=traces, default): number of traces ingested.
  • LangSmith Deployment usage (kind=langsmith_deployments): nodes executed, agent runs, and agent uptime for LangSmith Deployment.
Both kinds share the same query parameters (time range, workspace filter, grouping dimension) and return the same time-bucketed shape. The data sources are separate, so a record returned by one kind will not appear in the other. These APIs enable you to:
  • Track usage across different teams or workspaces.
  • Identify which users or API keys are consuming the most traces or running the most agents.
  • 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. Switch between the LangSmith Traces and LangSmith Deployments sub-tabs to view each domain. The active sub-tab is reflected in the URL (?tab=traces or ?tab=deployments) so you can bookmark the page to land on the same view.
  4. Use the controls to:
    • Select a time range (Last 7 days, 30 days, 3 months, 6 months, 1 year, or custom)
    • Group by workspace, project, user, or API key
    • Filter to specific workspaces
    • On the LangSmith Traces tab, optionally filter by retention tier (All Retention / Long-lived only / Short-lived only)
  5. Click Export CSV to download the data for the active tab.
Time range and workspace filters are shared across both sub-tabs, switching tabs preserves what you’ve selected. The LangSmith Deployments tab shows three stat cards (Total Nodes Executed / Total Agent Runs / Total Agent Uptime (seconds)) and one chart per metric stacked vertically, since the three metrics use different units.

Query parameters

The granular usage endpoint accepts the following query parameters:

Day-granular contract

Usage data is aggregated at day granularity. The endpoint normalizes the window to whole days at the API layer:
  • start_time is rounded down to its day’s UTC midnight.
  • end_time is rounded up to the next UTC midnight (no-op when already at midnight).
  • Any day overlapping the requested window is included in full.
A 24-hour window from 2026-01-01T12:00:00Z to 2026-01-02T12:00:00Z therefore returns usage for the full Jan 1 and Jan 2 buckets.

Stride

The stride field in each response indicates the time bucket size used for aggregation, calculated from the requested time range. Daily is the minimum. Sub-day windows still bucket at one day.

Compatibility

kind=langsmith_deployments combined with group_by=trace_tier returns 400 Bad Request. Retention tiers only apply to traces.

API endpoint

Existing callers that omit kind continue to get trace usage with the same response shape they always did.

Trace usage (kind=traces)

Response

Example: Get trace usage by workspace

Example: Get trace usage by user, filtered to long-lived retention only

LangSmith Deployment usage (kind=langsmith_deployments)

Each record carries three metrics together so a single fetch powers the whole Deployment view.
LangSmith Deployment usage is sourced separately from trace usage and is available for the full retention window of your deployment usage.For self-hosted instances, the Deployment usage endpoint is opt-in. Enable it via:
Or upgrade to a LangSmith version that enables it by default (see self-hosted changelog).

Response

Example: Get Deployment usage by workspace

CSV export

Same query parameters as the data endpoint, including kind. Returns a CSV file with one row per (time bucket, dimension) tuple. All dimension columns are always present; only the columns matching the selected group_by are populated. For kind=traces, the value column is Traces. For kind=langsmith_deployments, the value columns are Nodes Executed, Agent Runs, and Agent Uptime (seconds). Cells whose value would start with =, +, -, @, tab, or carriage-return are tab-prefixed to neutralize spreadsheet formula evaluation in Excel / Google Sheets / LibreOffice.

Grouping options

The group_by parameter determines how usage data is aggregated: For trace usage, “project” refers to the LangSmith tracer session. For Deployment usage, “project” refers to the LangSmith Deployment project (a deployed agent).