Skip to content

Deploy your recipe

Deploying your recipe makes it available through the Prompt Studio API so that you can integrate it with your internal systems or with a customer-facing application. What this means is that if you call the API endpoint that you expose by deploying the recipe, you can pass inputs to the endpoints, and you will get the output of the request through the API.

Example use case

We will be using the example recipe that we built earlier here. The recipe has two instructions. the first instruction extracts concerns expressed by interviewees from a file containing interview scripts. The second instruction suggests solutions to the concerns returned by the first instruction. Let's say that I want to get the output of both the two instructions when I call the endpoint that I deploy.

Step 1: Locate the API Button

To begin the preview, look for the API button situated on the top right side of the recipe page.

Click on API

Step 2: Open the API Page

Click the API button. This action will open a side bar where you can deploy your recipe.

API sidebar

Step 3: Define request fields

The request fields are the values that you want to pass to the endpoint from an external source (an external web page input for example). For this usecase, I want to pass the file containing the interviews to the request. See below how you can do that:

Step 4: Define response fields

The response fields are the values that you want the endpoint to return to you after the recipe runs via API. As mentioned above regarding this usecase, we want the endpoint to return the two outputs concerns and solutions from the two instructions in the recipe. See below how you can do that:

Step 5: Deploy your recipe

Now all you need to do is click on the "Deploy current version" button. Click deploy

Your recipe is now available via our API: API available

Step 6: Your recipe is now available via our API

Since we are passing the interviews to the request (as we set above), this is how the API call would look like:

curl --location --request POST '{deployment_number}/run' \
    --header 'Authorization: {Bearer_token}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
"input": {
    "interviews": "Interview content"

Prompt Injections

Be aware that inserting user generated text in your prompts might throw off the results, either intentionally: the user tries to override the original instructions you created, or unintentionally due to text passages that are reminiscent of instructions.