You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: products/prisma-airs/api/airuntimesecurity/airuntimesecurityapi.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ These APIs protect your AI models, AI applications, AI datasets, and AI agents b
18
18
The APIs efficiently scan for various threats, including prompt injections, insecure outputs, AI agentic threats, and sensitive data loss.
19
19
To use these APIs, send prompts or model responses from your application and receive a threat assessment with recommended actions based on your AI security profile.
20
20
21
-
For licensing, onboarding, activation, and to obtain the API authentication key and profile name, refer to the [Prisma AIRS API](https://docs.paloaltonetworks.com/ai-runtime-security/activation-and-onboarding/ai-runtime-security-api-intercept-overview) administration documentation.
21
+
For licensing, onboarding, activation, and to obtain the API authentication key and profile name, refer to the [Prisma AIRS AI Runtime API intecept](https://docs.paloaltonetworks.com/ai-runtime-security/activation-and-onboarding/ai-runtime-security-api-intercept-overview) administration documentation.
22
22
23
23
## Scan API Endpoints
24
24
@@ -60,3 +60,8 @@ For complete details, refer to adminstration guide for the section on how to "ma
60
60
- One API key per deployment profile - Each deployment profile in the [Customer Support Portal](https://support.paloaltonetworks.com/Support/Index) allows a single API key.
61
61
- 2 MB maximum payload size per synchronous scan request - Limited to a maximum of 100 URLs per request.
62
62
- 5 MB maximum payload size per asynchronous scan request - Limited to a maximum of 100 URLs per request.
63
+
- The following size limitations apply:
64
+
65
+
- context: 100k characters limit on the contextual grounding context
This page specifies the error codes for the Prisma AIRS AI Network: API intercept scan APIs.
13
+
An error response in the API appears in the following format:
14
+
15
+
```json
16
+
{
17
+
"error": {
18
+
"message": "Successfully scanned request"
19
+
}
20
+
}
21
+
```
22
+
23
+
| HTTP Status Code | Description | Common Scenario |
24
+
|---|---|---|
25
+
|**200**| Successfully scanned request | The request was completed successfully, and the scan results were returned |
26
+
|**400**| Bad Request - Request data is invalid or malformed | - Empty request body<br>- Unreadable request body<br>- Wrong request format<br>- No scan content provided in the scan request<br>- Both prompt and response are null<br>- Empty prompt: Scan request content's prompt is empty<br>- Empty response: Scan request content's response is empty<br>- No scan IDs provided<br>- Too many scan IDs: maximum 5 scan IDs allowed<br>- Scan ID length exceeds maximum allowed characters (36 characters allowed)<br>- Invalid scan ID format<br>- Invalid scan ID<br>- No report IDs provided<br>- Too many report IDs: maximum 5 report IDs allowed<br>- Report ID length exceeds maximum length (37 characters allowed)<br>- Profile ID invalid: Missing or bad profile ID format, must follow UUID format (for example, 12345678-0000-1234-1234-123456789012)<br>- Profile name invalid: Missing profile name or length exceeds the 100 characters limit |
27
+
|**401**| Unauthenticated - Not Authenticated | - Missing API key or Oauth token |
28
+
|**403**| Forbidden - Invalid API Key | - Invalid, revoked, or expired API key |
29
+
|**404**| Not Found - Resource is not found | - Invalid API endpoint |
30
+
|**405**| Method Not Allowed | - Using the wrong HTTP method (Refer to the Scan endpoints [reference docs](https://pan.dev/prisma-airs/api/airuntimesecurity/prisma-airs-ai-runtime-api-intercept/) for the relevant methods for each endpoint)<br>- Endpoint doesn't support the requested method |
31
+
|**413**| Request Too Large - The request body is too large | - Scan content exceeds [size limits](https://pan.dev/prisma-airs/scan/api/)|
32
+
|**415**| Unsupported Media Type | - Missing Content-Type header<br>- Content-Type is not application/json |
33
+
|**429**| Too Many Requests - Request exceeds the limit | - API rate limit exceeded (Refer to the [limitations](https://pan.dev/prisma-airs/scan/api/) page for details)<br>- Too many concurrent scans<br>Limitations<br>* Synchrounous & asynchronous scans are limited based on API call quota<br>* Scan results and reports are not subject to an API call quota, but are subject to a 10 requests limit per minute|
34
+
|**500**| Internal Server Error | - Unexpected server error |
Copy file name to clipboardExpand all lines: products/prisma-airs/api/airuntimesecurity/pythonsdk.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ keywords:
10
10
- API
11
11
---
12
12
13
-
Prisma AIRS API Python SDK simplifies the integration of advanced AI security scanning capabilities into Python applications.
13
+
Prisma AIRS AI Runtime API Python SDK simplifies the integration of advanced AI security scanning capabilities into Python applications.
14
14
15
-
It supports Python version 3.9 through 3.13, it offers synchronous and asynchronous scanning, robust error handling, and configurable retry strategies.
15
+
It supports Python version `3.9` through `3.13`, it offers synchronous and asynchronous scanning, robust error handling, and configurable retry strategies.
16
16
17
17
To get started:
18
18
19
19
* Get the the [API key token and API security profile name](https://docs.paloaltonetworks.com/ai-runtime-security/administration/prevent-network-security-threats/api-intercept-create-configure-security-profile) (or API security profile ID).
20
20
21
-
* Install `aisecurity` package using pip, set environment variables, and initialize the Python SDK. (Refer to the Python SDK [installation guide](https://docs.paloaltonetworks.com/ai-runtime-security/activation-and-onboarding/ai-runtime-security-api-intercept-overview/airs-apis-python-sdk) for detailed steps.)
21
+
* Install `pan-aisecurity` package using pip, set environment variables, and initialize the Python SDK. (Refer to the Python SDK [installation guide](https://docs.paloaltonetworks.com/ai-runtime-security/activation-and-onboarding/ai-runtime-security-api-intercept-overview/airs-apis-python-sdk) for detailed steps.)
22
22
23
23
* Create a Scanner instance referring to the Python SDK usage examples.
24
24
A scanner instance performs security scans on your AI-generated content.
@@ -35,9 +35,9 @@ Each usage can use two functions:
35
35
36
36
## Error Handling & Exceptions
37
37
38
-
When the client is unable to fetch the expected response from the API server, a subclass of aisecurity.exceptions.AISecSDKException is raised.
38
+
When the client is unable to fetch the expected response from the API server, a subclass of `aisecurity.exceptions.AISecSDKException` is raised.
39
39
40
-
There are five types of Exceptions defined in aisecurity/exceptions.py:
40
+
There are five types of Exceptions defined in `aisecurity/exceptions.py`:
41
41
42
42
* AISEC_SERVER_SIDE_ERROR: Errors returned by the API server. For example, an invalid API key.
43
43
* AISEC_CLIENT_SIDE_ERROR: Errors that occur on the client side. For example, a network connection issue.
Copy file name to clipboardExpand all lines: products/prisma-airs/api/airuntimesecurity/pythonsdkasynciousage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ keywords:
10
10
- API
11
11
---
12
12
13
-
This page covers the key use cases of the AI Runtime Security Python SDK asyncio scan types with synchronous and asynchronous methods.
13
+
This page covers the key use cases of the Prisma AIRS AI Runtime API Python SDK asyncio scan types with synchronous and asynchronous methods.
14
14
It scans AI applications and agents, AI models, and AI data to detect and mitigate threats such as prompt injection, URL filtering, and sensitive data.
15
15
Enable the relevant threat detection services in the [API Security Profile](https://docs.paloaltonetworks.com/prisma-airs/administration/prevent-network-security-threats/api-intercept-create-configure-security-profile).
Copy file name to clipboardExpand all lines: products/prisma-airs/api/airuntimesecurity/pythonsdkusage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ keywords:
10
10
- API
11
11
---
12
12
13
-
This page covers the key use cases of the AI Runtime Security Python SDK inline scan types with synchronous and asynchronous methods.
13
+
This page covers the key use cases of the Prisma AIRS AI Runtime API Python SDK inline scan types with synchronous and asynchronous methods.
14
14
It scans AI applications and agents, AI models, and AI data to detect and mitigate threats such as prompt injection, URL filtering, and sensitive data.
15
15
Enable the relevant threat detection services in the [API Security Profile](https://docs.paloaltonetworks.com/prisma-airs/administration/prevent-network-security-threats/api-intercept-create-configure-security-profile).
0 commit comments