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 all scenarios for a project
Get all scenarios for a project
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
import osimport requestsorigin = "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())const url = "https://app.langwatch.ai/api/v1/scenarios";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/scenarios' \ --header "X-Auth-Token: $LANGWATCH_API_KEY"Call the LangWatch API from this project.Request: GET https://app.langwatch.ai/api/v1/scenariosReference: https://langwatch.ai/docs/api-reference/scenarios/list-scenarios.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
[ { "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" }]Responses
200Success
application/json
object[]idstringrequirednamestringrequiredsituationstringrequiredcriteriastring[]requiredlabelsstring[]requiredparametersobject[]requiredsimulatorModelstring | nullThe model that plays the user, or null for the project default. Absent on servers that predate model overrides on this family.
judgeModelstring | nullThe model that judges the run, or null for the project default. Absent on servers that predate model overrides on this family.
traceQuietPeriodMsinteger | nullMilliseconds 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 | nullMilliseconds 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 | nullThe 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 | nullThe 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 | nullThe test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites.
fieldsobjectThe 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