POST https://api.zatomic.ai/v1/prompts
Zatomic API
- Overview
- Versioning
- Authentication
- Workspaces
- Status Codes and Errors
- Token Usage
- Expanding Objects
- OpenAPI Spec
- Prompts
- The Prompt Object
- Create Prompt
- Update Prompt
- Delete Prompt
- Retrieve Prompt
- Retrieve All Prompts
- Generate Prompt
- Versions
- The Version Object
- Create Version
- Update Version
- Delete Version
- Retrieve Version
- Retrieve All Versions
- Calculate Version Score
- Retrieve Version Score
- Analyze Version Risk
- Retrieve Version Risk
- Analyze Version Balance
- Retrieve Version Balance
- Generate Version Heatmap
- Retrieve Version Heatmap
- Improve Version
- Scoring Criteria
- The Scoring Criteria Object
- The Scoring Criterion Object
- Create Scoring Criteria
- Update Scoring Criteria
- Delete Scoring Sriteria
- Retrieve Scoring Criteria
- Retrieve All Scoring Criteria
- Generate Scoring Criteria
- Create Scoring Criterion
- Update Scoring Criterion
- Delete Scoring Criterion
- Retrieve Scoring Criterion
- Scoring Criteria Results
- The Scoring Criteria Results Object
- Scoring
- The Scoring Object
- Calculate Prompt Score
- Risk
- The Risk Object
- Analyze Prompt Risk
- Balance
- The Balance Object
- Analyze Prompt Balance
- Heatmaps
- The Heatmap Object
- Generate Prompt Heatmap
Create Prompt
Creating a new prompt requires only a name, everything else is optional. If only the name is given, the prompt will be created without any versions. If the content is given, the prompt will be created along with its first version, which becomes the prompt's primary version by default.
If a set of variables is given, the keys will be replaced by their values in the content before creating the prompt version.
Endpoint Request
Request Properties | |
---|---|
name
string
|
Name of the prompt. |
use_case
string, optional
|
Use case description for the prompt. |
content
string, optional
|
Content for the prompt. |
version_name
string, optional
|
Name for the prompt version. |
variables
set of key-value pairs, optional
|
Set of template variables for the prompt, in key-value pair format. Variables can use either double curly braces {{ }} or double square brackets [[ ]]. |
{
"name": "Prompt name",
"use_case": "Use case description.",
"content": "You are a knowledgeable and friendly assistant...",
"version_name": "Version name",
"variables": {
"{{variable1}}": "variable 1",
"[[variable2]]": "variable 2"
}
}
Endpoint Response
A successful call returns a 201 status code with a response that contains the prompt object.