Get started with LangWatch Skills in seconds: Set up evals, scenario tests, and tracing just by asking your AI coding assistant.
import requests
url = "https://app.langwatch.ai/api/scenario-events"
payload = {
"type": "<string>",
"timestamp": 123,
"batchRunId": "<string>",
"scenarioId": "<string>",
"scenarioRunId": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>",
"langwatch": {
"targetReferenceId": "<string>",
"targetType": "prompt",
"simulationSuiteId": "<string>"
}
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"url": "<string>"
}Create a new scenario event
import requests
url = "https://app.langwatch.ai/api/scenario-events"
payload = {
"type": "<string>",
"timestamp": 123,
"batchRunId": "<string>",
"scenarioId": "<string>",
"scenarioRunId": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>",
"langwatch": {
"targetReferenceId": "<string>",
"targetType": "prompt",
"simulationSuiteId": "<string>"
}
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"url": "<string>"
}Was this page helpful?