Sandboxes

Deploy Prompt

Beta
POST

Path parameters

idstringRequired
A UUID string identifying this sandbox.
prompt_idstringRequired
An ID identifying the Prompt you'd like to deploy.

Request

This endpoint expects an object.
prompt_deployment_id
stringOptional

The Vellum-generated ID of the Prompt Deployment you’d like to update. Cannot specify both this and prompt_deployment_name. Leave null to create a new Prompt Deployment.

prompt_deployment_name
stringOptional

The unique name of the Prompt Deployment you’d like to either create or update. Cannot specify both this and prompt_deployment_id. If provided and matches an existing Prompt Deployment, that Prompt Deployment will be updated. Otherwise, a new Prompt Deployment will be created.

label
stringOptional
In the event that a new Prompt Deployment is created, this will be the label it's given.
release_tags
list of stringsOptional
Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.

Response

This endpoint returns an object
id
string
created
datetime
label
string
A human-readable label for the deployment
name
string
A name that uniquely identifies this deployment within its workspace
last_deployed_on
datetime
input_variables
list of objects
active_model_version_ids
list of strings

Deprecated. The Prompt execution endpoints return a prompt_version_id that could be used instead.

last_deployed_history_item_id
string
The ID of the history item associated with this Deployment's LATEST Release Tag
status
enumOptional

The current status of the deployment

  • ACTIVE - Active
  • ARCHIVED - Archived
Allowed values: ACTIVEARCHIVED
environment
enumOptional

The environment this deployment is used in

  • DEVELOPMENT - Development
  • STAGING - Staging
  • PRODUCTION - Production
Allowed values: DEVELOPMENTSTAGINGPRODUCTION
POST
1curl -X POST https://api.vellum.ai/v1/sandboxes/id/prompts/prompt_id/deploy \
2 -H "X_API_KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200Successful
1{
2 "id": "id",
3 "created": "2024-01-15T09:30:00Z",
4 "label": "label",
5 "name": "name",
6 "last_deployed_on": "2024-01-15T09:30:00Z",
7 "input_variables": [
8 {
9 "id": "id",
10 "key": "key",
11 "type": "STRING"
12 }
13 ],
14 "active_model_version_ids": [
15 "active_model_version_ids"
16 ],
17 "last_deployed_history_item_id": "last_deployed_history_item_id",
18 "status": "ACTIVE",
19 "environment": "DEVELOPMENT"
20}