With our Prompts management feature, you could easily iterate and version your prompts as a team, deploy them to your codebase with 1 line of code, and share them with your team, test them in the Playground, and more.

Check out the Prompts page to see the prompts you have created and deployed.

How to create a prompt

playground
  1. Create a new prompt: Click the + New prompt button to create a new prompt. Give it a name and a description.
  1. Write your template: First choose a model you want to test, then write the system prompt and user prompt.
  2. Check output in the Playground: Click the Playground button to view the output of your prompt across different models.
  1. Input variables: Insert dynamic input variables into your prompt template using curly brackets {{your variables}}.
  2. Deploy your version to the team: Click the Deploy version button to deploy your prompt to the team. You can check the deployed version on the left sidebar.
  3. Copy the code into your codebase Click the View code button to copy the prompt code into your codebase or copy the prompt ID and paste it into your codebase.
    After you have added your prompt ID to your codebase, you can now iterate your prompts and versions in the Prompts page without changing your codebase.

Example

{
  "prompt"{
     "prompt_id": "prompt_id", //paste this from the prompt management page
     "variables": {
       "variable_name": "variable_value"
     },
     "version": 1 //specify which version of the prompt you want to use
     // "echo": true //optional parameter
  }
}

Optional parameter

echo
boolean
default: true

with echo on, the response body will have an extra field

  "prompt_message" [an array of messages]