Skip to contentSkip to page list

Docs

Get a single simulation run by its ID

Get a single simulation run by its ID

GET/api/v1/simulation-runs/{scenarioRunId}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/simulation-runs/<scenarioRunId>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.get(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "scenarioId": "string",  "batchRunId": "string",  "scenarioRunId": "string",  "scenarioSetId": "string",  "name": "string",  "description": "string",  "status": "string",  "results": {    "verdict": "string",    "reasoning": "string",    "metCriteria": [      "string"    ],    "unmetCriteria": [      "string"    ],    "inconclusiveCriteria": [      "string"    ],    "criteria": [      {        "criterion": "string",        "requirement": "string",        "status": "passed",        "reasoning": ""      }    ],    "error": "string",    "evaluations": [      {        "evaluatorId": "string",        "name": "string",        "status": "passed",        "required": false,        "passed": false,        "score": 0,        "label": "string",        "details": "string",        "cost": {          "currency": null,          "amount": null        },        "inputs": {}      }    ]  },  "messages": [    {      "role": "string",      "content": "string"    }  ],  "messagesTruncated": false,  "timestamp": 0,  "updatedAt": 0,  "durationInMs": 0,  "totalCost": 0,  "roleCosts": {},  "roleLatencies": {},  "note": "string",  "scenarioVersion": -9007199254740991,  "platformUrl": "string"}
api-reference/simulation-runs/get-simulation-runs

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

scenarioRunIdstringrequired
At least 1 character

Responses

200

Success

application/json

scenarioIdstringrequired
batchRunIdstringrequired
scenarioRunIdstringrequired
scenarioSetIdstring
namestring | nullrequired
descriptionstring | nullrequired
statusstringrequired
resultsobject | nullrequired
Option 1object
verdictstring | null
reasoningstring | null
metCriteriastring[]
unmetCriteriastring[]
inconclusiveCriteriastring[]

Criteria the judge could not check because the evidence was missing. Each is also in unmetCriteria.

criteriaobject[]

Each criterion with its status (passed, failed or inconclusive) and the judge's reasoning for it, in the order the scenario declares them. Runs from SDKs before per-criterion verdicts carry an empty reasoning.

errorstring | null
evaluationsobject[]

One result per evaluator that ran on the scenario. Absent on a run with no evaluators, and on servers that predate evaluators.

Option 2null
messagesobject[]required
rolestringrequired
contentstringrequired
messagesTruncatedboolean

True when messages holds only the first few messages of a longer conversation. Pass include=messages to read them all.

timestampnumberrequired
updatedAtnumberrequired
durationInMsnumberrequired
totalCostnumber
roleCostsobject
roleLatenciesobject
notestring | null

One short line saying why the run was started, as given when it was queued. Null on a run started without one.

scenarioVersioninteger | null

The version of the scenario at the moment the run was queued. Null on runs recorded before versions existed.

Option 1integer
Option 2null
platformUrlstring (uri)required
404

Not found

application/json

errorstringrequired

Documentation