# Connect to OpenAI

Connect your OpenAI organization to Finora to track usage and spend across GPT-4o, o1, o3, and every other OpenAI model.

> **Before you start**
>
> * You need to be an **Owner** or **Admin** of your OpenAI organization to create the right kind of API key.
> * This integration covers the **OpenAI API platform only**. ChatGPT consumer plans (ChatGPT Plus, Team, Enterprise) aren't part of this — to track flat-rate ChatGPT seats, use the [AI Subscriptions tracker](/core-features/ai-subscriptions.md).

## Overview

You'll create a special **Admin API key** in OpenAI, then paste it into Finora. The key only gives Finora the ability to read your billing data — it can't be used to make API calls or change anything in your OpenAI account.

## Step 1: Create an OpenAI Admin API key

1. Sign in to the [OpenAI platform](https://platform.openai.com) as the organization Owner or Admin.
2. Open **Settings → Organization → Admin keys** (or go directly to [platform.openai.com/settings/organization/admin-keys](https://platform.openai.com/settings/organization/admin-keys)).
3. Click **+ Create admin key**.
4. Give it a clear name like `Finora Integration` and click **Create**.
5. **Copy the key immediately** — OpenAI only shows it once. Store it somewhere safe.

> The key starts with **`sk-admin-`**. If yours starts with just `sk-` (no `admin`), you accidentally created a project key. Project keys can't read billing data — go back to the **Admin keys** page and create the right kind.

## Step 2: Connect OpenAI to Finora

1. In Finora, click **Settings** in the sidebar, then open the **API Keys** tab.
2. From the **Provider** dropdown, choose **OpenAI**.
3. Paste the Admin API key into the **Admin API Key** field.
4. Click **Save**.

Finora checks that the key works. On success, OpenAI appears in your connected providers list. Your data starts flowing in at the next refresh:

* **Trial / Growth:** within 24 hours
* **Scale:** within 1 hour
* **Enterprise:** within 15 minutes

## What Finora tracks for OpenAI

* Total cost in USD
* Date of each charge
* Which model was used (e.g. `gpt-4o-2024-08-06`)
* Project or workspace if you use multiple
* Tokens used (input and output, where OpenAI provides them)

Token data is what powers the **Cost per 1k tokens** metric on your dashboard.

## FAQs

**How long until my data shows up?** Within one full refresh cycle — 24 hours on Trial and Growth, 1 hour on Scale, 15 minutes on Enterprise. The sample-data banner on the Overview page disappears once your real data arrives.

**Why does Finora need an Admin key instead of a regular key?** Billing data in OpenAI is only readable with an Admin key. Regular keys (the ones your apps use to call models) can't see costs at all.

**Can the Admin key be used to call models or change my account?** No. Admin keys are scoped to organization administration and billing only — they can't make model calls or modify settings.

**Can I track multiple OpenAI organizations?** For now, Finora supports one OpenAI organization per user. Multi-org support is coming. If this is blocking you, contact support.

**Saving the key failed with "validation failed". What's wrong?** Common reasons:

* You used a project key instead of an Admin key (check the prefix — it should be `sk-admin-`).
* The key was deleted in OpenAI.
* The user who created the key lost the Admin role.

Create a fresh Admin key and try again.

**How do I rotate the key?** Create a new Admin key in OpenAI, come back to Finora **Settings → API Keys**, click **Update** on the OpenAI row, and paste the new key. Your old key keeps working until you click Save.

## Removing the integration

Open **Settings → API Keys**, find the OpenAI row, click the trash icon, and confirm. Your stored credential is deleted. Past cost data stays in Finora — your historical charts continue to show it. To also clear the historical data, contact support.


---

# Agent Instructions: 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:

```
GET https://docs.finora.services/billing-integrations/ai-providers/connect-to-openai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
