Skip to main content
POST
Python

Authorizations

X-Auth-Token
string
header
required

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.

Body

application/json
name
string
required
Minimum string length: 1
situation
string
required
criteria
string[]
labels
string[]
parameters
object[]

The parameters this scenario declares by name, each with an optional description and default. A run supplies values for these names, readable from the scenario's own text as params.NAME. A parameter marked secret carries no default: its value is supplied per run, encrypted, delivered to the target as secrets.NAME, and never readable from the scenario's own text.

Maximum array length: 20

Response

Scenario created

id
string
required
name
string
required
situation
string
required
criteria
string[]
required
labels
string[]
required
parameters
object[]
required
platformUrl
string<uri>
required
Last modified on May 19, 2026