<your_api_key>
with your actual API key.
strictness
parameter controls when advanced detection is performed:
strictness = 1
): Advanced detection is performed only if the initial detection indicates a potential prompt injection.strictness = 2
): Advanced detection is always performed, regardless of the initial detection result.strictness = 3
): Advanced detection is performed only if the initial detection does not indicate a prompt injection.zero_latency = true
):
status
set to "success"
and a message
indicating that processing is occurring in the background.analysis_id
is provided to retrieve the result later using the Get Analysis Result endpoint.zero_latency = false
):
200 OK
application/json
202 Accepted
application/json
status
(string
): Indicates the status of the request ("success"
or "error"
).result
(object
): Contains the detection result (present in synchronous responses).
is_prompt_injection
(boolean
): true
if prompt injection was detected, false
otherwise.prompt
(string
or null
): The analyzed prompt, included if save_message
is true
.timestamp
(string
): The timestamp when the analysis was performed, in ISO 8601 format.tag
(string
): The tag associated with the request.analysis_id
(string
): Unique identifier for the analysis; can be used to retrieve results later.chat_id
(string
or null
): The chat session identifier, if provided.metadata
(object
or null
): The metadata provided in the request, if any.notifications
(boolean
): Indicates whether notifications were enabled.strictness
(integer
or null
): The strictness level used in the analysis.initial_detection_label
(string
): Classification label of the initial detection ("INJECTION"
or "SAFE"
).initial_detection_score
(number
or null
): Confidence score of the initial classification (between 0
and 1
).advanced_detection_result
(boolean
or null
): Result of the advanced detection (true
if injection detected, false
if not, null
if advanced detection not performed).checks_count
(integer
): Number of detection checks performed.https://api.glaider.it/v1/analysis-result
POST
analysis_id
.
Header | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
Parameter | Type | Required | Description |
---|---|---|---|
analysis_id | string | Yes | The unique identifier of the analysis to fetch. |
200 OK
application/json
https://api.glaider.it/v1/anonymize-pii
POST
Header | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
Parameter | Type | Required | Description |
---|---|---|---|
prompt | string | Yes | The text containing potential PII to be anonymized. |
cid | string | No | Client identifier for tracking purposes. |
200 OK
application/json
anonymized_text
(string
): The input text with detected PII replaced by placeholders.entities
(object
): A mapping of placeholders to the original PII detected.strictness = 1
):
strictness = 2
):
strictness = 3
):
analysis_id
get-analysis-result
endpoint.zero_latency = true
) allows the system to return a response immediately without waiting for the analysis to complete:
analysis_id
to fetch the analysis result via the Get Analysis Result endpoint."SAFE"
or "INJECTION"
with associated confidence scores.strictness
level.notifications
parameter in the request controls whether notifications are sent for a particular analysis.docker-compose.yml
and application settings for details.
save_message
, ensure compliance with data protection regulations (e.g., GDPR, HIPAA) relevant to your organization.status
field in responses. In case of an error, the message
field provides details.
429 Too Many Requests
response. Implement appropriate retry logic with exponential backoff.