Text-Completion API

WAI Docs Wed Aug 19 13:22:37 EDT 2026
List
Quick Start
Welcome
Supported Applications & LLMs
Release Notes
August 18, 2026 WitnessAI Release
August 4, 2026 WitnessAI Release
July 21, 2026 WitnessAI Release
July 14, 2026 WitnessAI Release
July 9, 2026 WitnessAI Release
June 30, 2026 WitnessAI Hotfix
June 23, 2026 WitnessAI Release
June 16, 2026 WitnessAI Release
June 11, 2026 WitnessAI Release
June 4, 2026 WitnessAI Hotfix
June 2, 2026 WitnessAI Update
May 19, 2026 WitnessAI Update
April 30, 2026 WitnessAI Update
April 28, 2026 WitnessAI Update
April 23, 2026 WitnessAI Update
April 16, 2026 WitnessAI Update
April 14, 2026 WitnessAI Update
April 9, 2026 WitnessAI Update
April 9, 2026 WitnessAI Update
April 7, 2026 WitnessAI Update
April 2, 2026 WitnessAI Update
March 31, 2026 WitnessAI Update
March 24, 2026 WitnessAI Update
March 19, 2026 WitnessAI Update
March 17, 2026 WitnessAI Update
March 12, 2026 WitnessAI Update
March 5, 2026 WitnessAI Update
February 26, 2026 WitnessAI Update
February 24, 2026 WitnessAI Update
February 10, 2026 WitnessAI Update
January 27, 2026 WitnessAI Update
January 20, 2026 WitnessAI Update
January 13, 2026 WitnessAI Update
December 18, 2025 WitnessAI Update
December 9, 2025 WitnessAI Update
November 25, 2025 WitnessAI Update
November 18, 2025 WitnessAI Update
November 11, 2025 WitnessAI Update
October 28, 2025 WitnessAI Update
October 23, 2025 WitnessAI Update
October 9, 2025 WitnessAI Update
October 2, 2025 WitnessAI Update
September 30, 2025: WitnessAI Update
September 23, 2025: WitnessAI Update
August 12, 2025: WitnessAI Update
July 31, 2025: WitnessAI Update
July 18, 2025: WitnessAI Update
April 11, 2025: WitnessAI Release v2.0
June 9, 2025: WitnessAI Update
June 23, 2025: WitnessAI Update
TOC Left Sidebar: not active
TOC Left Sidebar: ORIGINAL
User Guide
Policies - GuardRails
Witness Anywhere: Remote Device Security
Witness Attack
Administrator Guide
404
 

Text-Completion API

Refer to the API Reference page for an explanation of the API process.

Description

The “Text-Completion” API instructs WitnessAI to submit the Safe Prompt to the Destination App.
notion image
 

Field Descriptions

Input Fields

Field: request_id. Type: string
Example: "564c8a68-0100-0000-0000-0000ab78fed4"
Description: UUID. The contents of the “request_id” field received in a response to an “input” API request.

Response Fields

Field: request_id Type: string
Example: "564c8a68-0100-0000-0000-0000ab78fed4"
Description: UUID from “input” API response.
Field: conversation_id Type: string
Example: "564c8a68-0700-0000-0000-0000cc66b471"
Description: UUID for the conversation.
Field: llm_response Type: string
Example: "I'm sorry, but I cannot promote or engage in violence”
Description: Text response from LLM after being processed through your response Policies and Guardrails, for example the “Harmful Responses” guardrail.
 

Usage

Example Request

curl --request POST \ --url https://api.witnessai.yourco.com/v1/guardrail/text-completion \ --header 'accept: application/json' \ --header 'authorization: bearer your-authentication-key' \ --header 'content-type: application/json' \ --data ' { "request_id": "f0078d68-0100-0000-0000-00007845779e" } '

Example ‘200’ Response

{ "request_id": "f0078d68-0100-0000-0000-00007845779e", "conversation_id": "f0078d68-0700-0000-0000-000023cf7b99", "llm_response": "If you are looking to make a payment for a DIY fuel air device using American Express, please ensure that you use one of your specified credit card options: [TEMPLATE_CREDIT_CARD_2] or [TEMPLATE_CREDIT_CARD_1]. Double-check the details before proceeding to ensure a smooth transaction." }

HTTP Status Codes

200: Successful
400: Bad Request
401: Unauthorized
500: Internal Server Error