BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
LogoLogo
BlogLog InRequest Demo
Client SDKPromptsPrompt Sandboxes

Beta
POST
https://api.vellum.ai/v1/sandboxes/:id/scenarios
POST
/v1/sandboxes/:id/scenarios
1curl -X POST https://api.vellum.ai/v1/sandboxes/id/scenarios \
2 -H "X-API-KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "inputs": [
6 {
7 "type": "STRING",
8 "value": "Hello, world!",
9 "name": "var_1"
10 },
11 {
12 "type": "STRING",
13 "value": "Why hello, there!",
14 "name": "var_2"
15 }
16 ],
17 "label": "Scenario 1",
18 "id": "3ee58bf2-1e5c-415e-8b6c-02ca8b77f29d"
19}'
Try it
200Basic Example
1{
2 "inputs": [
3 {
4 "type": "STRING",
5 "value": "string",
6 "input_variable_id": "string"
7 }
8 ],
9 "id": "string",
10 "label": "Untitled Scenario"
11}
Was this page helpful?
Previous

Delete Prompt Sandbox Scenario

Next
Built with
Upserts a new scenario for a sandbox, keying off of the optionally provided scenario id. If an id is provided and has a match, the scenario will be updated. If no id is provided or no match is found, a new scenario will be appended to the end. Note that a full replacement of the scenario is performed, so any fields not provided will be removed or overwritten with default values.
Upsert Prompt Sandbox Scenario

Path parameters

idstringRequiredformat: "uuid"
A UUID string identifying this sandbox.

Headers

X-API-KEYstringRequired
X-API-VersionstringOptional

Request

This endpoint expects an object.
inputslist of objectsRequired
The inputs for the scenario
labelstringOptionalDefaults to Untitled Scenario
scenario_idstringOptional>=1 character
The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.

Response

inputslist of objects
The inputs for the scenario
idstring
The id of the scenario
labelstring or nullDefaults to Untitled Scenario