Skip to contentSkip to page list

Docs

Get all scenarios for a project

Get all scenarios for a project

GET/api/v1/scenarios
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/scenarios"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": [          null        ],        "required": false      }    ],    "simulatorModel": "string",    "judgeModel": "string",    "traceQuietPeriodMs": -9007199254740991,    "traceWaitTimeoutMs": -9007199254740991,    "maxTurns": -9007199254740991,    "minTurns": -9007199254740991,    "testSuiteId": "string",    "fields": {},    "platformUrl": "string"  }]
api-reference/scenarios/list-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.

Responses

200

Success

application/json

object[]
idstringrequired
namestringrequired
situationstringrequired
criteriastring[]required
labelsstring[]required
parametersobject[]required
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.

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.

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.

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.

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

Documentation