Environments API
Manage environments (base URLs, model selection) and environment variables.
Environments define where sessions run and what context is available (base URL, variables, model selection, version). Web and API projects use baseUrl; mobile projects can also provide Appium/mobile runtime overrides for a specific device or app target.
List environments (overview)
GET
/api/environments/overviewBearer TokenList environments (paged)
GET
/api/environmentsBearer TokenQuery uses page and pageSize.
Create environment
POST
/api/environmentsBearer TokenUpdate environment
PUT
/api/environments/{id}Bearer TokenThis is how you update fields like baseUrl, anthropicModel, and version. For API projects, baseUrl becomes the agent container's TARGET_BASE_URL.
For mobile projects, send mobileRuntimeOverrides to override the project defaults for a specific environment:
{
"name": "Android Staging",
"key": "android-staging",
"mobileRuntimeOverrides": {
"deviceName": "Pixel 8",
"udid": "emulator-5554",
"androidAppPackage": "com.example.staging",
"androidAppActivity": ".MainActivity"
}
}
Delete environment
DELETE
/api/environments/{id}Bearer TokenVariables
GET
/api/environments/{id}/variablesBearer TokenPOST
/api/environments/{id}/variablesBearer TokenPUT
/api/environments/{envId}/variables/{varId}Bearer TokenDELETE
/api/environments/{envId}/variables/{varId}Bearer Token