WitnessAI Documentation
List
Start Here
Start Here
Analytics
Analytics
Conversations
Conversations
Users
Users
Alerts
Alerts
Policy
Policy
Administration
Administration
Apps & Resources
Apps & Resources
Release Notes
Release Notes
Administrator Guide
Administrator Guide
WitnessAI API Overview
WitnessAI provides four APIs, giving your Custom Applications the ability to apply your Policy and Guardrail protections as a single API request, or in a step-by-step manner, with granular control over the process.
These three APIs provide granular control:
The “Input” API submits an Unprocessed Prompt to WitnessAI.
- The Unprocessed Prompt is not forwarded from WitnessAI to the Destination App or LLM. (collectively “Apps”).
- WitnessAI processes the Risky Prompt in the same way it does for any of the AI Apps we support.
- WitnessAI responds to the input API request with a Safe Prompt, plus an array of “Scorecards” providing detailed information on intention classification, risk scores, redaction tokens, and output of all Policies and Guardrails that match the sources, prompt data, and destinations of the input request.
The “Text-Completion” API instructs WitnessAI to submit the Safe Prompt to the Destination App.
- The Safe Prompt is processed by WitnessAI, and forwarded to the Destination App.
The “Complete”API is used to process the response of the Destination App to the Safe Prompt WitnessAI submitted to the Destination App.
- The Destination App responds to the Safe Prompt, and WitnessAI processes the response through your Response Policies and Guardrails, for example the “Harmful Response” Guardrail.
- WitnessAI returns the Safe Response back to your Custom App that submitted the input API request.
“Prompt-Protect” is the forth API.
- “Prompt-Protect” completes the three steps above with a single API request, without interruption.
API reference in these docs
Each API has its own page in this documentation, with its endpoint, authentication, request fields and an example response. Use the links below to open them.