Read an experiment's setup
import requests
url = "https://app.langwatch.ai/api/experiments/{slug}/workbench-state"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/{slug}/workbench-state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/{slug}/workbench-state \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"state": {},
"version": 123,
"updatedAt": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}Experiments
Read an experiment's setup
The experiment’s datasets, targets and evaluators, with the version to send back when you save. Ask for fields=version to check for changes without transferring the setup.
GET
/
api
/
experiments
/
{slug}
/
workbench-state
Read an experiment's setup
import requests
url = "https://app.langwatch.ai/api/experiments/{slug}/workbench-state"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/{slug}/workbench-state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/{slug}/workbench-state \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"state": {},
"version": 123,
"updatedAt": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<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
Query Parameters
Set to version to answer with the version and timestamp only
Available options:
version Response
The experiment's setup, or its version alone
- Option 1
- Option 2
The experiment setup: datasets, targets and evaluators. Read it, change it, send it back whole.
Show child attributes
Show child attributes
Send this back as expectedVersion to save safely
ISO 8601 timestamp of the last save
Last modified on August 24, 2026
Was this page helpful?
⌘I