Prompt injection detection API
Prompt injection is an attack in which instructions concealed in ordinary text hijack a large language model, causing it to disregard its own instructions, disclose its system prompt, or act on the attacker's behalf. Text arriving from outside an organization, such as a customer message, an extracted document, or a web page, cannot be assumed to be safe to pass to a model.
The Glasswall Prompt injection detection API gives security teams the capability to check text for prompt injection before it reaches a large language model. Text is submitted in a single request and a verdict is returned in the response, allowing the text to be blocked, escalated, or released according to the organization's risk appetite.
Detection runs entirely within your Glasswall Halo deployment. Submitted text is not logged, written to disk, or sent to a third-party model.
Prompt injection detection is licensed separately and is an optional component of a Glasswall Halo deployment. To enable it, please contact us.
Accessing Prompt injection detection API
The Glasswall Prompt injection detection API can be accessed via: https://api.glasswall.com/
Endpoint
The Prompt injection detection API consists of a single endpoint, Detect prompt injection, which analyses a submitted text string to determine whether it contains a prompt injection attack, and returns a verdict indicating either that no threat was detected or that the text is malicious.
Supported input
Detection is scoped to English prose of between 10 and 512 tokens. Text outside that scope is rejected rather than scored, and the reason is returned in the response. This covers text in another language, and text that is runnable code such as a script, a shell command, or a tagged code block.
For more information please refer to our API Documentation.