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

# ChatGPT

Harmony's ChatGPT integration connects directly to the OpenAI Admin API, giving your IT and finance teams a unified view of ChatGPT seat inventory, token consumption, and login activity alongside all your other SaaS tools. Harmony pulls real data from the OpenAI API so you are working with actual consumption figures rather than flat seat estimates - broken down by employee, department, and application.

#### What the ChatGPT integration enables

| Capability             | Description                                                                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| User Discovery         | Surface all ChatGPT users in Harmony's software inventory                                                                                      |
| Seat Inventory         | Track active users and pending or expired invites as seats, with clear status labels (`active`, `pending`, `expired`), refreshed every 6 hours |
| Token Usage Tracking   | Monitor per-user, per-model token consumption ingested daily to understand AI spend                                                            |
| Estimated Cost         | See per-user spend in the Est. Cost column, reflecting actual consumption figures                                                              |
| Login Activity         | Track when users last signed in to identify inactive seats                                                                                     |
| 90-Day Usage Trends    | View each user's token consumption trend over the past 90 days in the Activity column                                                          |
| Multi-Instance Support | Connect multiple OpenAI organizations for teams with separate accounts                                                                         |

#### Prerequisites

* **OpenAI Organization Admin**: Must be an admin of the OpenAI organization
* **Admin API Key**: A key starting with `sk-admin-` (see below)
* **Harmony Account**: Active Harmony workspace

{% hint style="warning" %}
Only **Admin API keys** (starting with `sk-admin-`) are supported. Regular project API keys (`sk-proj-...`) and standard API keys (`sk-...`) will not work.
{% endhint %}

#### Connect ChatGPT to Harmony

**Step 1: Generate an Admin API Key**

1. Go to [OpenAI Platform](https://platform.openai.com) and sign in as an organization admin
2. Navigate to **Organization** > **Admin API Keys**
3. Click **Create new secret key**
4. Enter a name (e.g. `Harmony Integration`) and click **Create**
5. Copy the key - it starts with `sk-admin-` and will not be shown again

**Step 2: Navigate to Integrations**

1. Log in to your Harmony dashboard
2. Go to **Settings** > **Integrations**
3. Find **ChatGPT** under **SaaS Applications** and click **Connect**

**Step 3: Enter Credentials**

1. Paste your **Admin API Key**
2. Click **Connect**

{% hint style="info" %}
For organizations with multiple OpenAI accounts, you can add multiple instances by repeating this process for each account.
{% endhint %}

#### What Harmony Syncs

**From OpenAI:**

* Users (name, email, role, account status)
* Seat status for active users and pending or expired invites, refreshed every 6 hours
* Per-user, per-model token consumption, ingested daily
* Estimated cost per user based on actual token consumption
* Login and activity data, surfaced in the Activity column and 90-day usage trend chart
* Workspace and organization membership

#### Use Cases

<details>

<summary>AI Spend Management</summary>

Track token usage per user and team to allocate costs accurately and identify high consumers. The Est. Cost column and 90-day usage trend chart give you actual consumption data rather than flat seat estimates, so you can make informed decisions about your AI budget.

</details>

<details>

<summary>License Reclamation</summary>

Identify users who haven't logged in recently and reclaim seats to reduce ChatGPT subscription costs. Seat status labels (`active`, `pending`, `expired`) make it easy to spot unused or lapsed access at a glance.

</details>

<details>

<summary>Offboarding</summary>

Confirm ChatGPT access has been removed when employees leave, as part of Harmony offboarding workflows.

</details>

<details>

<summary>AI Tool Adoption</summary>

Measure ChatGPT adoption across teams and departments to inform AI rollout decisions. Daily usage metrics show exactly how each team member is using ChatGPT, including which models they are consuming tokens from.

</details>


---

# 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.harmony.io/integrations/ai/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.
