import requests
url = "https://app.langwatch.ai/api/suites/{id}/run"
payload = {}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.langwatch.ai/api/suites/{id}/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/suites/{id}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{}'{
"scheduled": true,
"batchRunId": "<string>",
"setId": "<string>",
"jobCount": 123,
"skippedArchived": {
"scenarios": [
"<string>"
],
"targets": [
"<string>"
]
},
"items": [
{
"scenarioRunId": "<string>",
"scenarioId": "<string>",
"target": {
"type": "prompt",
"referenceId": "<string>",
"runParameters": {}
},
"name": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Trigger a suite run
Deprecated: use /api/v1/run-plans and /api/v1/test-suites. Trigger a suite run. Schedules scenario executions for all active scenarios x targets x repeatCount. When the id names a test suite, the targets, the repeat count and the models are read from the body.
import requests
url = "https://app.langwatch.ai/api/suites/{id}/run"
payload = {}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.langwatch.ai/api/suites/{id}/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/suites/{id}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{}'{
"scheduled": true,
"batchRunId": "<string>",
"setId": "<string>",
"jobCount": 123,
"skippedArchived": {
"scenarios": [
"<string>"
],
"targets": [
"<string>"
]
},
"items": [
{
"scenarioRunId": "<string>",
"scenarioId": "<string>",
"target": {
"type": "prompt",
"referenceId": "<string>",
"runParameters": {}
},
"name": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
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
Body
The run plan this run joins or creates. Used only when the id names a test suite; derived from the suite name and the targets when absent.
1 - 200The prompts, agents or workflows the run goes against. Used only when the id names a test suite, which stores no target of its own.
Show child attributes
Show child attributes
How many times each scenario and target pairing runs, between 1 and 5. Used only when the id names a test suite.
1 <= x <= 5The model that plays the user for every scenario in the run. Used only when the id names a test suite.
The model that judges every scenario in the run. Used only when the id names a test suite.
Constant values applied to every scenario in the run, e.g. a fixture id or a tenant. A value supplied here overrides the scenario's own default for that name.
Show child attributes
Show child attributes
One short line describing why this batch was run, e.g. a commit hash or what you changed. It is stored on every run of the batch and shown beside the run in the platform. Up to 200 characters.
200Was this page helpful?