POST https://api.zatomic.ai/v1/prompts/heatmap
API Reference
- Overview
- Versioning
- Authentication
- Workspaces
- Status Codes and Errors
- Credit Usage
- Expanding Objects
- OpenAPI Spec
- Context Items
- The Context Item Object
- Create File Context Item
- Create Text Context Item
- Update Context Item
- Delete Context Item
- Retrieve Context Item
- Retrieve All Context Items
- Context Item Versions
- The Context Item Version Object
- Create File Context Item Version
- Create Text Context Item Version
- Update File Context Item Version
- Update Text Context Item Version
- Delete Context Item Version
- Retrieve Context Item Version
- Retrieve All Context Item Versions
- Context Packs
- The Context Pack Object
- Create Context Pack
- Update Context Pack
- Delete Context Pack
- Retrieve Context Pack
- Retrieve All Context Packs
- Context Pack Versions
- The Context Pack Version Object
- Create Context Pack Version
- Update Context Pack Version
- Delete Context Pack Version
- Retrieve Context Pack Version
- Retrieve All Context Pack Versions
- 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
- Prompt Versions
- The Prompt Version Object
- Create Prompt Version
- Update Prompt Version
- Delete Prompt Version
- Retrieve Prompt Version
- Retrieve All Prompt Versions
- Calculate Prompt Version Score
- Retrieve Prompt Version Score
- Generate Prompt Version Heatmap
- Retrieve Prompt Version Heatmap
- Analyze Prompt Version Balance
- Retrieve Prompt Version Balance
- Analyze Prompt Version Risk
- Retrieve Prompt Version Risk
- Improve Prompt 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
Generate Prompt Heatmap
NOTE: This is the endpoint for generating heatmap data of a prompt stored outside of Zatomic. For the endpoint to generate heatmap data a prompt stored within Zatomic, see this endoint.
Generates the heatmap data for a prompt.
You can add a settings object to the request that specifies which AI model and provider you want to use for the risk analysis. If settings is given in the request, the model_source and model_id are required.
The model_source field specifies where the model comes from. When using models from your own AI providers, use the value provider; otherwise, use zatomic.
If provider_id is given and the provider is for Amazon Bedrock, then the aws_region is required and must be the region where the model is located.
You can find model IDs in the model catalog and provider IDs in your Zatomic account.
Endpoint Request
| Request Properties | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
content
string
|
The prompt content. | ||||||||
|
settings
object, optional
|
Properties for the object:
|
||||||||
{
"content": "The prompt content.",
"settings": {
"model_source": "zatomic|provider",
"model_id": "aim_2y2eRWI32fN0CB7a5wE7RuvhVMv"
"provider_id": "aap_2zFxUYe3RINnOr37VQwHDFF3gK3",
"aws_region": "us-east-1"
}
}
Endpoint Response
A successful call returns a response that contains the heatmap object.
| HTTP Status Codes | ||
|---|---|---|
| 200 | OK | The prompt heatmap was generated. |
| 400 | Bad Request | The content was not provided in the request. |
| 400 | Bad Request | If settings is given in the request but does not contain a model source. |
| 400 | Bad Request | If settings is given in the request but does not contain a model ID. |
| 400 | Bad Request | If a model is given in the settings but it is invalid. |
| 400 | Bad Request | If model source is "provider" in the settings but does not contain a provider ID. |
| 400 | Bad Request | If a provider is given in the settings but it is invalid. |
| 400 | Bad Request | If Amazon Bedrock provider is given in the settings but does not contain an AWS region. |
| 403 | Forbidden | The prompt action limit has been reached for the account. |
| 500 | Internal Server Error | Something went wrong on Zatomic's end. |