Zatomic API

Analyzing prompt balance

NOTE: This is the endpoint for analyzing the balance of a prompt stored outside of Zatomic. For the endpoint to analyze the balance a prompt stored within Zatomic, see this endoint.

Analyzes the balance of a prompt. A successful call returns a response that contains the balance object.

The request requires the prompt content and an include_examples flag, which determines if the prompt's examples should be included in the balance analysis. Including examples can add significant time when analyzing the balance of a prompt.

You can also add a settings object to the request that specifies which AI model and provider you want to use for the balance 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
POST https://api.zatomic.ai/v1/prompts/balance

Request Properties
content
string
The prompt content.
include_examples
boolean
Flag to include the prompt version's examples in the balance analysis.
settings
object, optional

Properties for the object:

model_source
string
The source of the model.
model_id
string
The ID of the AI model to use for the balance analysis.
provider_id
string, optional
The ID of the AI provider that contains the model to use for the balance analysis.
aws_region
string, optional
The AWS region where the model resides. Required if the given provider is Amazon Bedrock.
Request Body
{
   "content": "The prompt content.",
   "include_examples": false,
   "settings": {
      "model_source": "zatomic|provider",
      "model_id": "aim_2y2eRWI32fN0CB7a5wE7RuvhVMv"
      "provider_id": "aap_2zFxUYe3RINnOr37VQwHDFF3gK3",
      "aws_region": "us-east-1"
   }
}