> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/o/openai-platform.md).

# OpenAI Platform

OpenAI Platform is the OpenAI developer platform. OctoXLabs reads the members of your organization, their role and the projects each member belongs to, and adds them to the user inventory. Service accounts are not collected as users.

## Use cases

* **List OpenAI Platform members.** Review everyone with access to your organization.

```
Adapters = openai-platform
```

* **Find members with no directory account.** How accounts are matched depends on your user merge settings.

```
Adapters = openai-platform AND NOT Adapters = active-directory
```

* **Review organization owners.** The adapter sets the admin status for members whose role is owner. Check the user inventory for admin accounts.

## Before you begin

### Network

| Source              | Destination                       | Port | Protocol |
| ------------------- | --------------------------------- | ---- | -------- |
| OctoXLabs connector | api.openai.com (Domain parameter) | 443  | HTTPS    |

The connector always uses HTTPS. If a proxy is set, requests go through it.

### Required permissions

| Scope or role                  | Permission | Needed for                 |
| ------------------------------ | ---------- | -------------------------- |
| Admin API key (`sk-admin-...`) | Read       | Listing organization users |

A standard key (`sk-proj-...` or `sk-...`) is rejected by the Administration API. Only an Organization Owner can create an Admin API key.

## Create credentials in OpenAI Platform

{% stepper %}
{% step %}

### Open Admin keys

In the OpenAI console, go to **Settings**, then **Organization**, then **Admin keys**.
{% endstep %}

{% step %}

### Create the key

Create a new key. It starts with `sk-admin-`. Copy it and keep it secret.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
If you do not see the Admin keys section, ask an Organization Owner to create the key for you.
{% endhint %}

## Connection parameters

| Parameter | Required | Type    | Default        | Description                                                 |
| --------- | -------- | ------- | -------------- | ----------------------------------------------------------- |
| Domain    | No       | String  | api.openai.com | Domain of the OpenAI API, without a scheme.                 |
| API Key   | Yes      | String  | None           | Admin API key.                                              |
| Proxy     | No       | String  | None           | Proxy address, used as `http://<value>` for HTTP and HTTPS. |
| Timeout   | No       | Integer | 30             | Seconds to wait for an API response.                        |

## Troubleshooting

| Error message                                                  | Cause                                                                                   | Fix                                                                |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| Max retries exceeded for {url}                                 | The API kept answering 429.                                                             | Run discovery again later.                                         |
| Status Code: `, followed by URL, Method and the response body` | The API answered with a status other than 200. This is the shared REST connector error. | Check that the key is an Admin API key and read the response body. |

## Change history

{% hint style="info" %}
Available starting from version 6.6.2.
{% endhint %}
