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.
Get a single simulation run by its ID
Get a single simulation run by its ID
Try this endpoint
app.langwatch.ai
API key · X-Auth-Token
Kept in this tab. Cleared when you reload.
The response appears below.
Request and response examples
request.py
import osimport requestsorigin = "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())const url = "https://app.langwatch.ai/api/v1/simulation-runs/<scenarioRunId>";const response = await fetch(url, { method: "GET", headers: { "X-Auth-Token": process.env.LANGWATCH_API_KEY!, },});const data = await response.json();curl --request GET \ --url 'https://app.langwatch.ai/api/v1/simulation-runs/<scenarioRunId>' \ --header "X-Auth-Token: $LANGWATCH_API_KEY"Call the LangWatch API from this project.Request: GET https://app.langwatch.ai/api/v1/simulation-runs/<scenarioRunId>Reference: https://langwatch.ai/docs/api-reference/simulation-runs/get-simulation-runs.mdAuthentication: send the X-Auth-Token header, read from the LANGWATCH_API_KEY environment variable. Never hard-code the key.Use the HTTP client this project already uses, handle non-2xx responses, and show me the parsed result.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"}Not found
application/json · Generated from schema
{ "error": "string"}Path parameters
scenarioRunIdstringrequiredAt least 1 character
Responses
200Success
application/json
scenarioIdstringrequiredbatchRunIdstringrequiredscenarioRunIdstringrequiredscenarioSetIdstringnamestring | nullrequireddescriptionstring | nullrequiredstatusstringrequiredresultsobject | nullrequiredmessagesobject[]requiredmessagesTruncatedbooleanTrue when messages holds only the first few messages of a longer conversation. Pass include=messages to read them all.
timestampnumberrequiredupdatedAtnumberrequireddurationInMsnumberrequiredtotalCostnumberroleCostsobjectroleLatenciesobjectnotestring | nullOne short line saying why the run was started, as given when it was queued. Null on a run started without one.
scenarioVersioninteger | nullThe version of the scenario at the moment the run was queued. Null on runs recorded before versions existed.
platformUrlstring (uri)required404Not found
application/json
errorstringrequired