Authorization: Bearer YOUR_API_KEY
YOUR_API_KEY
with your actual API key.Header | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | multipart/form-data |
Content-Type
header; your HTTP client library will handle it when using multipart/form-data
.
Parameter | Type | Required | Description |
---|---|---|---|
file | file | Yes | The document file to be analyzed for potential indirect prompt injection. Accepted formats: PDF, DOCX, TXT, etc. |
multipart/form-data
form submission.
zero_latency
, strictness
, tag
, etc., are set within the server code and are not exposed as request parameters for this endpoint.
200 OK
application/json
boolean
): Indicates whether any potential indirect prompt injection attacks were detected in the document.number
): The proportion of chunks identified as containing potential attacks, ranging from 0
to 1
.string
): Concatenated text of all chunks identified as containing attacks.integer
): Total number of tokens in the extracted text from the document.number
): Estimated cost of processing the document, based on the total number of tokens (assumed rate of €10 per million tokens).https://api.glaider.it/v1/detect-indirect-attack
."YOUR_API_KEY"
with your actual API key.Authorization
header is set. Do not manually set the Content-Type
header when uploading files.files
parameter using multipart/form-data
.estimated_price
is calculated based on the total number of tokens processed, assuming a rate of €10 per million tokens.Authorization
header.multipart/form-data
to upload the file.contains_attack
, attack_percentage
, and attack_content
in the response to understand the analysis outcome.error
field with the error message.estimated_price
when processing large documents.contains_attack
value of true
indicates that at least one chunk of the document was identified as containing a potential indirect prompt injection attack.attack_percentage
helps gauge how much of the document is affected.
attack_percentage
of 0.2
means that 20% of the chunks are potentially unsafe.attack_content
provides the concatenated text of all unsafe chunks, which can be reviewed for further analysis.total_tokens
and estimated_price
provide insights into the size of the document and the associated processing cost.POST
request to the /v1/detect-indirect-attack
endpoint.multipart/form-data
.contains_attack
field.contains_attack
is true
, review the attack_content
to understand the potential threats.attack_percentage
to assess the severity.total_tokens
and estimated_price
to manage costs for large-scale analysis.estimated_price
calculated?
strictness
are set within the server code and are not exposed as request parameters.