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

# OpenAI

Track your organization's OpenAI API spend by day and catch departed employees still on the console. One admin key, read-only.

API spend is invisible until the invoice, and console membership outlives offboarding. With one Admin API key, LicenseMeter backfills up to 180 days of daily cost data and cross-checks every console member against Entra ID.

Open **Connectors > OpenAI** in your workspace.

<figure><img src="https://1639979424-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLWIsqiRHwXSWQ10QGIRo%2Fuploads%2FFN7HNMw7rDlX2mzgTF3k%2Fconnector-openai.webp?alt=media" alt="OpenAI connector in the LicenseMeter sample workspace"><figcaption><p>LicenseMeter sample workspace. All names, costs and findings shown are demonstration data.</p></figcaption></figure>

{% hint style="info" %}
The screenshot shows sample data, not a live connection or provider consent screen. In your own workspace, the page presents the appropriate connection or import controls.
{% endhint %}

## Setup

{% stepper %}
{% step %}

### Create an Admin API key

An Organization Owner opens platform.openai.com under Settings > Organization > Admin keys and creates a key. Only Owners can create admin keys; regular project API keys do not work here.

[OpenAI Admin APIs guide](https://developers.openai.com/api/docs/guides/admin-apis)
{% endstep %}

{% step %}

### Connect

Paste the key into the single field on the OpenAI connector page. It is validated read-only before storage and encrypted at rest (AES-256-GCM).
{% endstep %}

{% step %}

### Let the first sync backfill

Up to 180 days of daily cost data and the current console member list arrive with the first sync. Spend appears on the AI costs page in USD, exactly as billed, never converted.
{% endstep %}
{% endstepper %}

## Data used

* Console organization members: email and name
* Daily cost totals by line item

## Outside this connector's scope

* Prompts, completions or any request content
* Your project API keys' secrets or project data

## Findings and limitations

* Console members whose Entra ID account is disabled: departed people who may still hold live API keys.
* Console members with no matching directory account at all.
* Daily API spend by line item, backfilled on first sync and tracked on the AI costs page.

This connector is for the OpenAI API organization. It does not import ChatGPT subscription seats. Use the separate ChatGPT CSV connector for those.

After setup, check the refresh timestamp and [set contract prices](/licenses-and-prices.md) for any seat-based products. If validation or sync fails, start with [Troubleshooting](/troubleshooting.md).


---

# 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.licensemeter.com/connectors/openai.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.
