Skip to main content

AI Runtime Security API Python SDK

AI Runtime Security API Python SDK simplifies the integration of advanced AI security scanning capabilities into Python applications.

It supports Python version 3.9 through 3.13, it offers synchronous and asynchronous scanning, robust error handling, and configurable retry strategies.

To get started:

  • Get the the API key token and API security profile name (or API security profile ID).

  • Install aisecurity package using pip, set environment variables, and initialize the Python SDK.

  • Create a Scanner instance to perform security scans on your AI-generated content.

Python SDK can be used in the following ways:

  • inline
  • asyncio

Each usage can use two functions:

  • sync_scan()
  • async_scan()