Deploy a Prompt

Deploying a prompt makes it available via the API and is a way of pinning a prompt version to the one that will be used in production. Deployments are assigned to specific environments, for example, Development or Production. 

Deployed prompts can not be deleted and only accounts with admin permissions can delete deployments.

To deploy a prompt, navigate to the prompt and click the "Deploy" button:

Deploy a prompt


Enter a name for the deployment and choose if you want to create a new deployment or update an existing deployment.

Choose the environment for the deployment and then click the "Create Prompt Deployment" button.

Create or Update a Deployment


You then be redirected to the deployment page. Here you can copy the ID of the deployment for use in the API. By default, the deployment in the API will always use the latest prompt shown on the deployment page.

Deployment page


Editing the prompt will create a new version of the prompt, however, the deployment will continue to use the pinned version in the Latest Prompt field. To update the deployment to use the new version of the prompt, you will need to deploy the new version and choose the "update existing" option.

Select the deployment to update and then click the "Create Prompt Deployment" button.

Update Existing Deployment


The deployment will then use the new version of the prompt as the Latest Prompt.

Subscribe to our newsletter

The latest prompt engineering best practices and resources, sent to your inbox weekly.