POST https://api.zatomic.ai/v1/prompts/{promptId}/versions
// Example
POST https://api.zatomic.ai/v1/prompts/prm_2qRzu8geIvfudcJTwP0pur4TbMJ/versions
Zatomic API
- Introduction
- Versioning
- Authentication
- Workspaces
- Status codes and errors
- Token usage
- Expanding objects
- OpenAPI spec
- Prompts
- The Prompt object
- Creating a prompt
- Updating a prompt
- Deleting a prompt
- Retrieving a prompt
- Retrieving all prompts
- Generating a prompt
- Versions
- The Version object
- Creating a version
- Updating a version
- Deleting a version
- Retrieving a version
- Retrieving all versions
- Retrieving a version score
- Calculating a version score
- Retrieving a version risk
- Analyzing a version risk
- Retrieving a version balance
- Analyzing a version balance
- Retrieving a version heatmap
- Generating a version heatmap
- Improving a version
- Scoring Criteria
- The Scoring Criteria object
- The Scoring Criterion object
- Creating scoring criteria
- Updating a scoring criteria
- Deleting a scoring criteria
- Retrieving a scoring criteria
- Retrieving all scoring criteria
- Generating scoring criteria
- Creating a scoring criterion
- Updating a scoring criterion
- Deleting a scoring criterion
- Retrieving a scoring criterion
- Scoring Criteria Results
- The Scoring Criteria Results object
- Scoring
- The Scoring object
- Calculating a prompt score
- Risk
- The Risk object
- Analyzing prompt risk
- Balance
- The Balance object
- Analyzing prompt balance
- Heatmaps
- The Heatmap object
- Generating a prompt heatmap
Creating a version
Creating a new prompt version requires only the prompt content; the name and any variables are optional. If a set of variables is given, the keys will be replaced by their values in the content before creating the prompt version.
A successful call returns a 201 status code with a response that contains the version object.
Endpoint
Request Properties | |
---|---|
name
string, optional
|
Name of the version. |
content
string
|
Content for the version. |
variables
set of key-value pairs, optional
|
Set of template variables for the version, in key-value pair format. Variables can use either double curly braces {{ }} or double square brackets [[ ]]. |
Request Body
{
"name": "Version name",
"content": "You are a knowledgeable and friendly assistant...",
"variables": {
"{{variable1}}": "variable 1",
"[[variable2]]": "variable 2"
}
}