Skip to contentSkip to page list

Docs

Get a specific scenario by ID

Get a specific scenario by ID

GET/api/v1/scenarios/{id}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/scenarios/<id>"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

{  "id": "string",  "name": "string",  "situation": "string",  "criteria": [    "string"  ],  "labels": [    "string"  ],  "parameters": [    {      "name": "string",      "description": "string",      "defaultValue": "string",      "secret": false,      "type": "string",      "options": [        "string"      ],      "required": false    }  ],  "simulatorModel": "string",  "judgeModel": "string",  "traceQuietPeriodMs": -9007199254740991,  "traceWaitTimeoutMs": -9007199254740991,  "maxTurns": -9007199254740991,  "minTurns": -9007199254740991,  "testSuiteId": "string",  "fields": {},  "platformUrl": "string"}
api-reference/scenarios/get-scenarios

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

idstringrequired
At least 1 character

Responses

200

Success

application/json

idstringrequired
namestringrequired
situationstringrequired
criteriastring[]required
labelsstring[]required
parametersobject[]required
namestringrequired
At least 1 characterUp to 64 charactersPattern ^[A-Za-z_][A-Za-z0-9_]*$
descriptionstring
Up to 500 characters
defaultValuestring | number | boolean
secretboolean
typestring
One of"string""number""boolean"
optionsstring | number | boolean[]
requiredboolean
simulatorModelstring | null

The model that plays the user, or null for the project default. Absent on servers that predate model overrides on this family.

judgeModelstring | null

The model that judges the run, or null for the project default. Absent on servers that predate model overrides on this family.

traceQuietPeriodMsinteger | null

Milliseconds the agent's trace must stay unchanged before the judge reads it, or null for the project's recommendation. Absent on servers that predate judge trace settings.

Option 1integer
Option 2null
traceWaitTimeoutMsinteger | null

Milliseconds the judge waits for the agent's trace before a verdict, or null for the project's recommendation. Absent on servers that predate judge trace settings.

Option 1integer
Option 2null
maxTurnsinteger | null

The most conversation turns a run of this scenario takes, or null for the default. Absent on servers that predate turn limits on this family.

Option 1integer
Option 2null
minTurnsinteger | null

The fewest conversation turns before the judge may end a run, or null for the default. Absent on servers that predate turn limits on this family.

Option 1integer
Option 2null
testSuiteIdstring | null

The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites.

fieldsobject

The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields.

platformUrlstring (uri)required
404

Scenario not found

application/json

errorstringrequired

Documentation