# OpenAI

## Selecting the Connection Type

Once you have [selected your connection type](https://docs.probe.splx.ai/ai-red-teaming/probe/add-target/integration-setup#selecting-a-connection-type), a configuration tab will appear on the next step, prompting you to input the required connection details.

## Integration Setup

The integration supports two API types:

1. ​**Chat Completions API** - The traditional industry-standard protocol (`/v1/chat/completions`). It operates on a message-based array system and requires manual context management. While robust and widely used, it is now considered a legacy path and may not receive the latest agentic features or reasoning optimizations.
2. **Responses API** - The modern, unified protocol designed to supersede Chat Completions. It offers better performance with reasoning models (like GPT-5), native **agentic loops** for multi-tool calling, lower costs through **improved cache utilization**, and built-in **stateful context** management.

The setup process and requirements for both API Types are defined below.

<figure><img src="https://1029475228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi12bk7lo75SODuwcRCQp%2Fuploads%2FiJKG6Z5m9kCfqtYLGJ5W%2Fprobe.dev.splx.ai_w_339_target_create_2.png?alt=media&#x26;token=76f0f14a-98a2-4f8d-9e19-8b73d43f2597" alt=""><figcaption><p>Figure 1: OpenAI Integration Example - Chat Completions API</p></figcaption></figure>

<figure><img src="https://1029475228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi12bk7lo75SODuwcRCQp%2Fuploads%2FW2JR79b59X5GculnD94F%2Fprobe.dev.splx.ai_w_339_target_create_2%20(1).png?alt=media&#x26;token=18cffebd-a196-48b9-bbdb-8208e322909e" alt=""><figcaption><p>Figure 2: OpenAI Integration Example - Responses API</p></figcaption></figure>

* **System Prompt** - Your application’s system prompt. It sets the initial instructions or context for the AI model, defines the behavior, tone, and specific guidelines the AI should follow while interacting. For best practices, refer to the [OpenAI documentation on prompt engineering](https://platform.openai.com/docs/guides/prompt-engineering).
* **API Key** - Your OpenAI API key, find the secret API key on the OpenAI Platform's [API key page](https://platform.openai.com/api-keys).
* **Model** - The OpenAI model of your choice, you can get the overview of the models on the [Models page](https://platform.openai.com/docs/models) of OpenAI Platform documentation.

For more information, you can explore the official [OpenAI Platform](https://platform.openai.com/docs/overview) documentation.
