Use this information in this section to configure a custom method for
connecting to the endpoint, either Rest API or
Streaming or
WebSocket.
About Rest API and Streaming
Connection Methods
AI Red Teaming supports REST and streaming APIs as targets. If you are using a model
hosted on Hugging Face or a model served by OpenAI there are pre-configured
connection methods also available which will make it easier for you to configure
your target.
If you are adding a REST or streaming API endpoint, you need to select if it is a
public endpoint that can be accessed over the internet or a
private
endpoint. If you are using a private endpoint, you can select either:
- IP Allowlist—A static IP address is shown that will be used by AI Red
Teaming to access your target. Make a note of this IP address as it will
have to be allowed by your infrastructure or IT team to be able to access
the Target.
- Network Channels—Private channels for endpoint connectivity.
WebSocket Connection
Method
AI Red Teaming supports WebSocket as a connection method for
AI targets, enabling you to scan real-time, streaming, and full-duplex AI
applications with the same automated AI Red Teaming capabilities available for REST
API targets. The WebSocket connection method provides AI Red Teaming connectivity to
AI applications that communicate exclusively over WebSocket protocols. This native
integration eliminates the need to create custom wrapper APIs or proxy services to
translate between REST API and WebSocket communications.
WebSocket connection method is available for all AI Red
Teaming target types: Models, Applications, and Agents.
WebSocket does not support:
- Support Sessions
- Multi-Turn Configuration
Supported
Authentication Methods
AI Red Teaming supports multiple authentication methods to securely connect to target
APIs during red teaming scans. You can
configure authentication using one of three methods:
- Using Headers—Static header-based authentication for APIs
that accept long-lived credentials such as API keys or bearer tokens.
- Using Payload—Credentials included directly in the JSON
request body alongside the prompt, for APIs that expect username and password
fields in the request payload.
- OAuth 2.0—OAuth 2.0 client credentials flow for APIs that
issue short-lived access tokens, with automatic token refresh to ensure
uninterrupted scan execution.