LangChain fleet usage API
The fleet usage API from LangChain — 4 operation(s) for fleet usage.
The fleet usage API from LangChain — 4 operation(s) for fleet usage.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/langchain:langchain-fleet-usage-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: LangSmith fleet usage API
description: 'The LangSmith API is used to programmatically create and manage LangSmith resources.
## Host
https://api.smith.langchain.com
## Authentication
To authenticate with the LangSmith API, set the `X-Api-Key` header
to a valid LangSmith API key.'
version: 0.1.0
servers:
- url: /
tags:
- name: fleet usage
paths:
/v1/platform/fleet/usage/agents:
get:
security:
- API Key: []
- Tenant ID: []
- Bearer Auth: []
description: Returns the top agents in the workspace with cost data for the given time window. Defaults to sorting by cost descending; pass sort_by and sort_order to change. Data is sourced entirely from ClickHouse run metadata.
tags:
- fleet usage
summary: List fleet agents with usage
parameters:
- description: Max results (max 100)
name: limit
in: query
schema:
type: integer
default: 20
title: Limit
- description: Start of cost window (ISO8601)
name: start_time
in: query
required: true
schema:
type: string
title: Start Time
- description: End of cost window (ISO8601)
name: end_time
in: query
required: true
schema:
type: string
title: End Time
- description: Sort field (cost, runs, last_used, first_used)
name: sort_by
in: query
schema:
type: string
default: cost
title: Sort By
- description: Sort direction (asc, desc)
name: sort_order
in: query
schema:
type: string
default: desc
title: Sort Order
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/usage.AgentUsageResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.UserError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.InternalError'
operationId: getV1PlatformFleetUsageAgents
x-operation-id-source: derived
/v1/platform/fleet/usage/models:
get:
security:
- API Key: []
- Tenant ID: []
- Bearer Auth: []
description: Returns the top models used in the workspace with aggregated cost and distinct run counts for the given time window. Defaults to sorting by cost descending; pass sort_by and sort_order to change.
tags:
- fleet usage
summary: List fleet models with usage
parameters:
- description: Max results (max 100)
name: limit
in: query
schema:
type: integer
default: 20
title: Limit
- description: Start of window (ISO8601)
name: start_time
in: query
required: true
schema:
type: string
title: Start Time
- description: End of window (ISO8601)
name: end_time
in: query
required: true
schema:
type: string
title: End Time
- description: Sort field (cost, runs, last_used)
name: sort_by
in: query
schema:
type: string
default: cost
title: Sort By
- description: Sort direction (asc, desc)
name: sort_order
in: query
schema:
type: string
default: desc
title: Sort Order
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/usage.ModelUsageResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.UserError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.InternalError'
operationId: getV1PlatformFleetUsageModels
x-operation-id-source: derived
/v1/platform/fleet/usage/tools:
get:
security:
- API Key: []
- Tenant ID: []
- Bearer Auth: []
description: Returns the top tools in the workspace with run counts, latency, and agent counts for the given time window. Defaults to sorting by runs descending; pass sort_by and sort_order to change.
tags:
- fleet usage
summary: List fleet tools with usage
parameters:
- description: Max results (max 100)
name: limit
in: query
schema:
type: integer
default: 20
title: Limit
- description: Start of window (ISO8601)
name: start_time
in: query
required: true
schema:
type: string
title: Start Time
- description: End of window (ISO8601)
name: end_time
in: query
required: true
schema:
type: string
title: End Time
- description: Sort field (runs, avg_latency_ms, agent_count, last_used)
name: sort_by
in: query
schema:
type: string
default: runs
title: Sort By
- description: Sort direction (asc, desc)
name: sort_order
in: query
schema:
type: string
default: desc
title: Sort Order
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/usage.ToolUsageResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.UserError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.InternalError'
operationId: getV1PlatformFleetUsageTools
x-operation-id-source: derived
/v1/platform/fleet/usage/users:
get:
security:
- API Key: []
- Tenant ID: []
- Bearer Auth: []
description: Returns the top users with aggregated cost data for the given time window. Defaults to sorting by cost descending; pass sort_by and sort_order to change.
tags:
- fleet usage
summary: List fleet users with usage
parameters:
- description: Max results (max 100)
name: limit
in: query
schema:
type: integer
default: 20
title: Limit
- description: Start of cost window (ISO8601)
name: start_time
in: query
required: true
schema:
type: string
title: Start Time
- description: End of cost window (ISO8601)
name: end_time
in: query
required: true
schema:
type: string
title: End Time
- description: Sort field (cost, runs, agent_count, last_used, first_used)
name: sort_by
in: query
schema:
type: string
default: cost
title: Sort By
- description: Sort direction (asc, desc)
name: sort_order
in: query
schema:
type: string
default: desc
title: Sort Order
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/usage.UserUsageResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.UserError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/errutil.InternalError'
operationId: getV1PlatformFleetUsageUsers
x-operation-id-source: derived
components:
schemas:
usage.UserUsageResponse:
type: object
properties:
users:
type: array
items:
$ref: '#/components/schemas/usage.UserUsage'
errutil.UserError:
type: object
usage.ModelUsage:
type: object
properties:
last_used:
type: string
model_name:
type: string
run_count:
type: integer
total_cost:
type: number
usage.ModelUsageResponse:
type: object
properties:
models:
type: array
items:
$ref: '#/components/schemas/usage.ModelUsage'
usage.AgentUsage:
type: object
properties:
agent_name:
type: string
assistant_id:
type: string
first_used:
type: string
last_used:
type: string
model_name:
type: string
owner_email:
type: string
run_count:
type: integer
total_cost:
type: number
usage.ToolUsageResponse:
type: object
properties:
tools:
type: array
items:
$ref: '#/components/schemas/usage.ToolUsage'
errutil.InternalError:
type: object
usage.ToolUsage:
type: object
properties:
agent_count:
type: integer
avg_latency_ms:
type: number
last_used:
type: string
run_count:
type: integer
tool_name:
type: string
usage.UserUsage:
type: object
properties:
agent_count:
type: integer
first_used:
type: string
last_used:
type: string
ls_user_id:
type: string
owner_email:
type: string
run_count:
type: integer
total_cost:
type: number
usage.AgentUsageResponse:
type: object
properties:
agents:
type: array
items:
$ref: '#/components/schemas/usage.AgentUsage'
securitySchemes:
API_Key:
type: apiKey
in: header
name: X-API-Key
Tenant_ID:
type: apiKey
in: header
name: X-Tenant-Id
Bearer_Auth:
type: http
description: Bearer tokens are used to authenticate from the UI. Must also specify x-tenant-id or x-organization-id (for org scoped apis).
scheme: bearer
Organization_ID:
type: apiKey
in: header
name: X-Organization-Id