LangSmith Run API

The run API from LangSmith — 19 operation(s) for run.

GitHub OpenAPI

Operations 24

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/v1/runs/rules List run rules · List Rules #
Ask an LLM
“Which rules are set up to score my model runs?”
“Can I list run rules for one dataset or session?”
Tell an agent
List all run rules.
List run rules for dataset {dataset_id}.
POST /api/v1/runs/rules Create a run rule · Create Rule #
Ask an LLM
“How do I create a rule that scores every run in a dataset?”
“Can I cap how many runs a rule evaluates with a sampling rate?”
Tell an agent
Create a run rule named {display_name} sampling {sampling_rate}.
Create rule {display_name} for dataset {dataset_id} sampling {sampling_rate}.
POST /api/v1/runs/rules/validate Test a run rule on sample data · Validate Rule #
Ask an LLM
“Can I test a rule on sample inputs before saving it?”
“What does a rule return when I validate it with test outputs?”
Tell an agent
Validate rule {display_name} sampling {sampling_rate} on test inputs {test_inputs}.
Test rule {display_name} with sampling {sampling_rate} and reference outputs {test_reference_outputs}.
PATCH /api/v1/runs/rules/{rule_id} Update a run rule · Update Rule #
Ask an LLM
“How do I change the sampling rate of an existing run rule?”
“Can I rename a rule I already created?”
Tell an agent
Update run rule {rule_id} to sampling {sampling_rate}.
Rename existing rule {rule_id} to {display_name}.
DELETE /api/v1/runs/rules/{rule_id} Delete a run rule · Delete Rule #
Ask an LLM
“How do I delete a run rule?”
“Can I remove a run rule by ID?”
Tell an agent destructive · confirm first
Delete run rule {rule}.
Remove the run rule {rule} from my project.
GET /api/v1/runs/threads/{thread_id} Preview a thread · Thread Preview #
Ask an LLM
“Can I see a preview of a thread's runs before loading them?”
“What does a thread look like when I pass session variables?”
Tell an agent
Preview thread {thread_id} in session {session_id}.
Show a preview of thread {thread_id} with variables {variables}.
GET /api/v1/runs/rules/{rule_id}/logs List run rule logs (v1) · List Rule Logs #
Ask an LLM
“Where can I see the v1 logs for a run rule?”
“Can I fetch run rule logs for a time range?”
Tell an agent
List v1 logs for run rule {rule_id}.
Show v1 logs of rule {rule_id} between {start_time} and {end_time}.
GET /api/v1/runs/rules/{rule_id}/logs/v2 List run rule logs (v2) · List Rule Logs V2 #
Ask an LLM
“Which v2 endpoint returns run rule logs with cursor pagination?”
“Can I page through a rule's logs with a cursor?”
Tell an agent
List v2 logs for run rule {rule_id}.
Fetch v2 logs of rule {rule_id} using cursor {cursor}.
GET /api/v1/runs/rules/{rule_id}/last_applied Get the last applied run rule · Get Last Applied Rule #
Ask an LLM
“When did a run rule last apply to my dataset?”
“Can I check the last applied state of a rule?”
Tell an agent
Get the last applied state of run rule {rule_id}.
Show when rule {rule_id} last scored a run.
POST /api/v1/runs/rules/{rule_id}/trigger Trigger a run rule manually · Trigger Rule #
Ask an LLM
“How do I fire a run rule on demand?”
“Can I run a run rule manually?”
Tell an agent
Trigger run rule {rule} now.
Fire rule {rule} manually.
POST /api/v1/runs/rules/trigger Trigger several run rules at once · Trigger Rules #
Ask an LLM
“Can I trigger multiple scoring rules in one request?”
“How do I kick off a batch of run rules for a dataset?”
Tell an agent
Trigger run rules {rule_ids} together.
Run rules {rule_ids} on dataset {dataset_id}.
GET /api/v1/runs/{run_id} Get a run · Read Run #
Ask an LLM
“How do I fetch one run's details by its ID?”
“Can I read a single run without loading its messages?”
Tell an agent
Get run {run_id}.
Fetch run {run_id} excluding serialized attributes.
PATCH /api/v1/runs/{run_id} Update a run · Update Run #
Ask an LLM
“How do I edit the metadata of a run after it's created?”
“Can I update a run's tags or metadata?”
Tell an agent
Update run {run_id}.
Edit the metadata of run {run_id}.
GET /api/v1/runs/{run_id}/share Check a run's sharing state · Read Run Share State #
Ask an LLM
“Is a particular run shared with my team?”
“What is the current sharing state of a run?”
Tell an agent
Check the sharing state of run {run_id}.
Tell me whether run {run_id} is shared.
PUT /api/v1/runs/{run_id}/share Share a run · Share Run #
Ask an LLM
“How do I share a run with my team?”
“Can I make a run public to my organization?”
Tell an agent
Share run {run_id}.
Make run {run_id} public to my organization.
DELETE /api/v1/runs/{run_id}/share Unshare a run · Unshare Run #
Ask an LLM
“How do I stop sharing a run with my team?”
“Can I revoke a run's public access?”
Tell an agent destructive · confirm first
Unshare run {run_id}.
Revoke public access to run {run_id}.
POST /api/v1/runs/query/validate Validate a runs query · Validate Runs Query #
Ask an LLM
“Can I check a runs query for syntax errors before running it?”
“What does a broken runs query look like?”
Tell an agent
Validate the runs query {query}.
Check that runs query {query} is valid.
POST /api/v1/runs/query Query runs · Query Runs #
Ask an LLM
“How do I find all the runs that failed in a time range?”
“Can I search runs by trace, parent run or error?”
Tell an agent
Query runs matching {filter}.
Find runs with trace {trace} and error {error}.
POST /api/v1/runs/generate-query Generate a runs query from natural language · Generate Query For Runs #
Ask an LLM
“Can I turn a plain-English description into a runs query?”
“What runs match the description I typed?”
Tell an agent
Generate a runs query for {query}.
Turn the description {query} into a runs filter.
POST /api/v1/runs/stats Get stats for runs · Stats Runs #
Ask an LLM
“How do I get summary statistics for runs matching a filter?”
“Can I group runs by a field and get counts?”
Tell an agent
Get stats for runs matching {filter}.
Count runs grouped by {group_by}.
POST /api/v1/runs/group Group runs by an expression · Group Runs #
Ask an LLM
“How do I group runs in a session by a field like model or status?”
“Can I group runs and limit the number returned?”
Tell an agent
Group runs in session {session_id} by {group_by}.
Group runs in session {session_id} by {group_by} matching {filter}.
POST /api/v1/runs/group/stats Get stats for grouped runs · Stats Group Runs #
Ask an LLM
“Can I get summary stats for runs grouped by a field?”
“What stats are available for grouped runs?”
Tell an agent
Get stats for runs in session {session_id} grouped by {group_by}.
Summarize runs in session {session_id} grouped by {group_by} between {start_time} and {end_time}.
POST /api/v1/runs/delete/traces Delete runs by trace IDs (ABAC) · Delete Runs Abac #
Ask an LLM
“Can I delete specific runs by trace ID using attribute-based access control?”
“Is there an ABAC endpoint for deleting runs?”
Tell an agent destructive · confirm first
Delete runs {trace_ids} in session {session_id} using ABAC.
Remove runs {trace_ids} from session {session_id} via the ABAC delete.
POST /api/v1/runs/delete Delete runs by trace IDs · Delete Runs #
Ask an LLM
“How do I delete specific runs by trace ID?”
“Can I remove runs from a session by trace ID?”
Tell an agent destructive · confirm first
Delete runs {trace_ids} in session {session_id}.
Remove runs {trace_ids} from session {session_id} using the standard delete.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/langsmith:langsmith-run-api"
All apis
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.

Get an API 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

langsmith-run-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LangSmith Run 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:


# --- truncated at 32 KB (84 KB total) ---
# Full source: https://artifacts.apis.io/langsmith/openapi/langsmith-run-api-openapi.yml