POST https://api.zatomic.ai/v1/prompts/scoring/criteria/{criteriaId}/criterionset
// Example
POST https://api.zatomic.ai/v1/prompts/scoring/criteria/sca_2rjp9HFpIsiYQrAiSbZlz85r3GC/criterionset
Zatomic API
- Overview
- Versioning
- Authentication
- Workspaces
- Status Codes and Errors
- Token Usage
- Expanding Objects
- OpenAPI Spec
- Changelog
- Projects
- The Project Object
- Create Project
- Update Project
- Delete Project
- Retrieve Project
- Retrieve All Projects
- 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
- Generate Version Heatmap
- Retrieve Version Heatmap
- Analyze Version Balance
- Retrieve Version Balance
- Analyze Version Risk
- Retrieve Version Risk
- Improve Version
- Scoring Criteria
- The Scoring Criteria Object
- The Scoring Criterion Object
- Create Scoring Criteria
- Update Scoring Criteria
- Delete Scoring Criteria
- 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
- Heatmaps
- The Heatmap Object
- Generate Prompt Heatmap
- Balance
- The Balance Object
- Analyze Prompt Balance
- Risk
- The Risk Object
- Analyze Prompt Risk
Create Scoring Criterion
This endpoint is for adding a new criterion to an existing scoring criteria. All fields in the request are required.
Endpoint
Endpoint Request
slug
string
|
The slug for the criterion. Can only contain lowercase letters and underscores. |
label
string
|
The criterion label. |
description
string
|
The criterion description. |
questions
string
|
The question or questions the criterion is trying to answer. |
weight
integer
|
The weight assigned to the criterion. Must be a whole number between 1 and 999. |
Request Body
{
"slug": "criterion_slug",
"label": "The label of the criterion.",
"description": "The criterion description.",
"questions": "The question or questions the criterion is trying to answer.",
"weight": 0
}
Endpoint Response
A successful call returns a 201 status code with a response that contains the scoring criterion object.
HTTP Status Codes | ||
---|---|---|
201 | Created | The scoring criterion was created. |
400 | Bad Request | The criterion slug was not provided in the request. |
400 | Bad Request | The criterion slug contained characters other than lowercase letters and underscores. |
400 | Bad Request | The criterion label was not provided in the request. |
400 | Bad Request | The criterion description was not provided in the request. |
400 | Bad Request | The criterion questions were not provided in the request. |
400 | Bad Request | The criterion weight did not have a value. |
400 | Bad Request | The criterion weight was not a whole number between 1 and 999. |
404 | Not Found | The scoring criteria didn't exist. |
500 | Internal Server Error | Something went wrong on Zatomic's end. |