Send a Synchronous Scan Request
POST/v1/scan/sync/request
Post a scan request containing prompt/model-response that returns a synchronous scan response
Request
Header Parameters
API key token
- application/json
Body
required
Scan request object
- Array [
- ]
Unique identifier for the transaction correlating prompt and response
ai_profile objectrequired
AI profile to use for the scan. You can specify one of the following - profile_id or profile_name
Unique identifier for the profile. If not provided, then profile_name is required.
Name of the profile. If not provided, then profile_id is required.
metadata object
Optionally send the app_name, app_user, and ai_model in the metadata
AI application requesting the content scan
End user using the AI application
AI model serving the AI application
contents object[]required
List of prompt or response or prompt/response pairs. The last element is the one that needs to be scanned, and the previous elements are the context for the scan.
The prompt content that you want to scan
The response content that you want to scan
Responses
- 200
- 400
- 401
- 403
- 404
- 405
- 413
- 415
- 429
- default
successfully scanned request
- application/json
- Schema
- Example (from schema)
Schema
Unique identifier for the scan report
Unique identifier for the scan
Unique identifier for the transaction
Unique identifier of the AI security profile used for scanning
AI security profile name used for scanning
Category of the scanned content verdicts such as "malicious" or "benign"
The action is set to "block" or "allow" based on AI security profile used for scanning
prompt_detected object
Indicates whether prompt contains any malicious URLs
Indicates whether prompt contains any sensitive information
Indicates whether prompt contains any injection threats
response_detected object
Indicates whether response contains any malicious URLs
Indicates whether response contains any sensitive information
Scan request timestamp
Scan completion timestamp
{
"report_id": "R82f1e879-0000-49af-9345-da907431c08f",
"scan_id": "82f1e879-0000-49af-9345-da907431c08f",
"tr_id": 1234,
"profile_id": "12345678-0000-1234-1234-123456789012",
"profile_name": "ai-dummy-profile",
"category": "malicious",
"action": "block",
"prompt_detected": {
"url_cats": true,
"dlp": true,
"injection": true
},
"response_detected": {
"url_cats": true,
"dlp": true
},
"created_at": "2024-07-29T15:51:28.071Z",
"completed_at": "2024-07-29T15:51:28.071Z"
}
Bad Request - Request data is invalid or malformed
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "Request data is invalid or malformed"
}
}
Unauthenticated - Not Authenticated
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "Not Authenticated"
}
}
Forbidden - Invalid API Key
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "Invalid API Key"
}
}
Not Found - Resource is not found
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "Resource is not found"
}
}
Method Not Allowed - The method is not allowed
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "The method is not allowed"
}
}
Request Too Large - The request body is too large
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "The request body is too large"
}
}
Unsupported Media Type - The media type is not supported
- application/json
- Schema
- Example (from schema)
Schema
error object
{
"error": {
"message": "The media type is not supported"
}
}
Too Many Requests - Request exceeds limit
- application/json
- Schema
- Example (from schema)
Schema
error object
retry_after object
{
"error": {
"message": "Request exceeds limit",
"retry_after": {
"interval": 5,
"unit": "minute"
}
}
}
error
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string",
"error": "string"
}