> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/ox-integrations/ai-appsec-advisor/chatgpt.md).

# ChatGPT

## Introduction

Integrate ChatGPT with OX to analyze security issues at scale, prioritize remediation, and generate fix guidance directly within the OX platform.

OX uses ChatGPT to summarize issues by risk and type, rank findings by business impact, and create code-level remediation instructions. You can analyze many issues at once and obtain prioritized actions without leaving OX.

After you connect, you can use ChatGPT capabilities when working with security findings in the Active Issues page.

## What OX adds

* **Issue summarization:** ChatGPT summarizes security issues by risk level and type across your entire portfolio (for example, 10 critical SQL injection vulnerabilities and 20 high-risk exposed secrets).
* **Prioritized remediation:** ChatGPT ranks issues by business impact and provides a recommended fix order to maximize security improvements.
* **Code-level fix guidance:** ChatGPT generates specific remediation instructions and code suggestions for each finding, accelerating resolution.

## Connection methods

For general information about connection methods, see[ Connection methods](/get-started/onboarding-to-ox/source-control/connection-methods.md).

Connect to OX with an OpenAI API key.

## Prerequisites

**OX**

* Permission to configure connectors

**ChatGPT/OpenAI**

* OpenAI user account with permissions to create and manage API keys

## Connect with a token

### Step 1: Create API key \[OpenAI]

For OpenAI documentation, see the article [API Overview](https://platform.openai.com/docs/api-reference/authentication).

1. Verify that the [prerequisites ](#prerequisites)are in place.
2. Log in to your OpenAI account.
3. From the header, select **API Platform**.
4. From the left menu, select **API keys**.
5. Select **+ Create new secret key**.
6. In **Create new secret key**, enter the details:
   * **Owned by:** You or Service Account.
   * **Name:** A name for the key.
   * **Project:** Select a project or accept the default.
   * **Permissions:** All, Restricted, or Read only. If restricted, apply the relevant permissions.\ <br>

     <div align="left"><figure><img src="/files/sfrMmSC7BVTNjzElZXih" alt="" width="241"><figcaption></figcaption></figure></div>
7. Select **Create secret key**.
8. Copy and store the API key in a secure location. You cannot view it again after this step.\
   **Best practice:** Store credentials in a secrets manager and set a reminder to rotate the API key according to your policy.

### Step 2: Connect to OX \[OX]

1. Verify that the [prerequisites ](#prerequisites)are in place.
2. In OX, go to **Connectors > AI AppSec Advisor** and select **ChatGPT**.<br>

   <div align="left"><figure><img src="/files/qP3W2Kavm2MCB2U52mTG" alt=""><figcaption></figcaption></figure></div>
3. In **Configure your ChatGPT credentials**, enter the API key i(token).
4. Select **VERIFY CONNECTIVITY**.
5. A green success message at the bottom of the screen indicates a successful connection. If verification fails, check your API key and permissions.
6. Select **CONNECT**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ox.security/ox-integrations/ai-appsec-advisor/chatgpt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
