Native Provider Schema Support (Beta)
Focus
Focus
Prisma AIRS

Native Provider Schema Support (Beta)

Table of Contents

Native Provider Schema Support (Beta)

Prisma® AIRS™ AI Runtime Security API intercept scans OpenAI and Anthropic request and response payloads in their native format and applies the security profile detections that match the role of each element.
Where Can I Use This?What Do I Need?
  • Prisma AIRS, AI Runtime Security (API Intercept)
  • Prisma AIRS license
  • Security profile with detections configured for each content type
  • API key for the Prisma AIRS app that makes the call
Native provider schema support lets you scan OpenAI and Anthropic payloads without writing code to extract text from them. Instead of parsing nested JSON structures yourself, you forward the exact request or response body sent to or received from the model provider.
Use native provider schema support to:
  • Eliminate extraction logic: Extract and scan system prompts, user messages, assistant output, tool calls, and tool results from raw provider payloads.
  • Enforce role-aware policies: Tag each extracted element by semantic role and apply the corresponding content-type detections configured in your security profile.
  • Migrate incrementally: Run native schema scanning alongside the text-based scan API to migrate one integration at a time.

Supported providers and endpoints

SchemaEndpointScan
openai.chat.completions/v1/chat/completionsRequest and response
openai.responses/v1/responsesRequest and response
anthropic.messages/v1/messagesRequest and response
If you submit an unsupported schema name, or a payload that the declared schema cannot read or parse, the API returns an HTTP 422 (native_unscannable) error. Keep using the text-based scan API for other providers.
Prisma AIRS tags each piece of content with a role and uses your security profile's detections for the matching content type.
RoleWhat it isContent type in your security profile
userEnd-user inputPrompt
assistantModel-generated outputResponse
tool_callTool or function call from the model (name and arguments)Tool Input
tool_resultOutput returned by a tool or functionTool Output
By default, Prisma AIRS scans the most recent user, assistant, tool call, and tool result events, not the whole conversation history.
Prisma AIRS ignores unrecognized optional fields within a valid provider payload so new provider parameters don't cause rejections as long as the core payload structure can still be read by the declared schema (otherwise, it returns an HTTP 422 native_unscannable error).

Scan a provider payload

To scan a provider request or response with native provider schema support, submit the payload to the Prisma AIRS synchronous scan endpoint and act on the verdict.
  1. Capture the payload. Use the same request body you send to the provider, or the same response body you receive from it.
  2. Send it to the Prisma AIRS synchronous scan endpoint, specifying the schema, direction, and payload in the native field.
  3. Check the overall verdict in the response.
    • allow: Continue. Send the request to the provider, or return the response to your user.
    • block: Stop. Don't send the request, or return a safe fallback response to your user.
  4. For debugging or auditing, review the per-element details. They show which content was scanned, its role, and which element triggered a finding.

Example native schema scan requests and responses

  • Before sending a request: Submit the Chat Completions request. If the verdict is block, don't send it to OpenAI.
    For example:
    Request (POST /v1/scan/sync/request):
    { "ai_profile": { "profile_name": "my-profile" }, "contents": [], "native": { "schema": "openai.chat.completions", "direction": "request", "payload": { "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] } } }
  • Before returning a response: Submit the model's response. Prisma AIRS scans the text for data loss and the tool calls for malicious arguments.
    For example:
    Response (HTTP 200):
    { "action": "allow", "category": "benign", "error": false, "errors": [], "masked": false, "native_result": { "detected": { "direction": "request", "schema": "openai.chat.completions" }, "scanned": [ { "content_type": "prompt", "offset": 0, "path": "/messages/1/content", "role": "user" } ], "schema_mismatch": false }, "profile_id": "<profile_id>", "profile_name": "my-profile", "prompt_detected": { "injection": false, "source_code": false, "toxic_content": false }, "prompt_detection_details": { "prompt_injection_details": { "pi_categories": [] }, "toxic_content_details": { "toxic_categories": [] } }, "report_id": "<report_id>", "response_detected": {}, "scan_id": "<scan_id>", "session_id": "<session_id>", "source": "AI-Runtime-API", "timeout": false, "tool_detected": {}, "tr_id": "<tr_id>", "transaction_id": "<transaction_id>" }
  • Agent tool output: Submit the Anthropic Messages request that contains a tool_result block. Prisma AIRS applies the Tool Output detections to look for indirect prompt injection.

Handling schema mismatches and unscannable payloads

  • HTTP 422 (native_unscannable): Returned when native.schema is not one of the supported schema names, or when the payload structure cannot be read by the declared schema at all (including payloads that do not fit the declared schema and cannot be processed).
  • native_result.schema_mismatch (true): Returned in an HTTP 200 scan response only when a payload does not strictly match the declared schema, but Prisma AIRS was still able to read and scan it (for example, if a payload matches a different supported schema format). When schema_mismatch is false, the payload was either read cleanly as the declared schema or could not be processed (resulting in a 422 error).
Payloads that exceed the supported size are rejected with an error. The payload size limit is 4 MB. Prisma AIRS doesn't truncate them. Only scanned tokens count against your token quota. Streaming responses aren't supported. Submit the complete response.

Migrate from the text-based scan API

To migrate an integration from the text-based scan API to native provider schema support, replace your extraction code with the provider payload.
  1. Pick one integration, such as your OpenAI Responses calls.
  2. Remove your extraction code and submit the provider payload instead.
  3. Verify that the verdicts match what you expect.
  4. Repeat for your other integrations. Keep the text-based API for any provider that isn't supported.