Send an Asynchronous Scan Request
POST/v1/scan/async/request
Post a scan request that returns asynchronous scan response
Request
Header Parameters
API key token
- application/json
Body
arrayrequired
A list of scan request objects
- Array [
- Array [
- ]
- ]
items object
Unique identifier of an individual element sent in the batch scan request
scan_req objectrequired
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
Asynchronous scan received timestamp
Unique identifier for the asynchronous scan request
Unique identifier for the asynchronous scan report
{
"received": "2024-07-29T15:51:28.071Z",
"scan_id": "82f1e879-0000-49af-9345-da907431c08f",
"report_id": "R82f1e879-0000-49af-9345-da907431c08f"
}
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
The HTTP status code for the error
The error message
{
"status_code": 0,
"message": "string"
}