Skip to navigation

Get detailed detection results

The results endpoint screens submitted content according to the policy assigned to the specified project. It then returns the confidence level results of the detectors. It doesn’t make a flagging decision or create a request log in Guard. It can be used to analyze data and calibrate detector threshold levels for policies.

You can use the results endpoint to analyze historic LLM prompt and response data without worrying about triggering alerts or affecting monitoring, as they are not logged as screening requests by AI Guardrails.

If no project ID is passed in the request, then the default AI Guardrails policy is used, which runs all Guard defenses and detectors at the highest sensitivity level.

A request must contain messages, tools, or both.

results requests are not logged as screening requests in AI Guardrails and do not appear in the platform or exported logs. It should not be used in runtime GenAI application security decisions as it removes the ability to control your defenses using policies.

Authentication

AuthorizationBearer

Bearer authentication using API key. Generate an API key from the AI Guardrails Dashboard. Example: Bearer sk_123…

Request

This endpoint expects an object.
messageslist of objectsOptional

List of messages comprising the interaction history with the LLM in OpenAI API Chat Completions format. Can be multiple messages of any role: user, assistant, system, tool or developer. Required unless tools is provided.

toolslist of objectsOptional

List of tool definitions exposed to the model, in OpenAI function-calling format. Each definition is screened on every request if your policy applies Prompt Defense to the Tool Definition role (screening location tool_definition::content). Can be sent without messages. See Tool definitions.

project_idstringOptional
ID of the relevant project. The request will be screened according to the policy assigned to the project. If no project ID is passed then the AI Guardrails Default Policy will be used for screening.
metadatamap from strings to anyOptional

Metadata tags can be attached to screening requests as an object that can contain any arbitrary key-value pairs. Common use cases include specifying the user or session ID.

dev_infobooleanOptional
When true the response will return an object with developer information about the build of AI Guardrails.

Response

Successful retrieval
resultslist of objectsOptional
List of detector results
toolsobjectOptional

Detector results for the tool definitions in the request’s tools array. Only returned if the request contains tools and the policy applies a detector to the Tool Definition role.