# OpenAI

Track your organization-level OpenAI API costs inside Pump View. See exactly how much each project, model, and token category (input, output, cached) costs per day, alongside your cloud spend.

**Setup time:** \~3 minutes

**Access level:** Read-only

***

### Prerequisites

* **An Admin API Key.** This key starts with `sk-admin-...` and is different from a standard project key. Only Admin keys have access to billing data.
* **Organization Owner role.** Only Organization Owners can create Admin API keys in OpenAI.
* **A paid OpenAI plan.** Billing data is only available on paid accounts.

> **Important:** Standard project keys (starting with `sk-proj-...`) do **not** have billing access. You must use an Admin key.

***

### Setup Instructions

#### 1. Create an Admin API Key

1. Log in to [platform.openai.com](https://platform.openai.com/) as an Organization Owner.
2. Navigate to **Organization → API Keys → Admin keys**.
3. Click **Create** to generate a new Admin API key.

#### 2. Copy the Key

Copy the key immediately. **It is only displayed once.** The key will start with `sk-admin-...`. Store it somewhere safe before closing the dialog.

#### 3. Connect in Pump

1. In Pump, go to **Settings → Integrations**.
2. Find **OpenAI** and click **Connect**.
3. Paste your Admin API key.
4. Pump auto-detects your organization's name.
5. Click **Connect**.

#### 4. Verify

Pump validates your key via the costs API and fetches your organization name, then backfills up to **365 days** of historical cost data. Your per-project, per-model token costs should appear within a few minutes.

***

### What Data Does Pump Pull?

| Data                  | Description                                                   |
| --------------------- | ------------------------------------------------------------- |
| **Input tokens**      | Token counts and costs for prompt/input tokens per model      |
| **Output tokens**     | Token counts and costs for completion/output tokens per model |
| **Cached tokens**     | Costs for cached prompt tokens (where applicable)             |
| **Embeddings**        | Usage and costs for embedding model calls                     |
| **Project breakdown** | Spend attributed to individual OpenAI projects                |
| **Model breakdown**   | Costs split by model (e.g., GPT-4o, GPT-4, o1)                |
| **Audio**             | Whisper (speech-to-text) and TTS (text-to-speech) costs       |
| **Images**            | DALL-E image generation costs                                 |

### Frequently Asked Questions

#### I don't see the "Admin keys" option in my Organization settings.

You likely don't have the Organization Owner role. Only Owners can view and create Admin keys. Ask an existing Owner to either grant you Owner permissions or create the key on your behalf.

#### Can I use a standard project key (sk-proj-...)?

No. Project keys are scoped to a single project and don't have access to organization-level billing data. You need an Admin key starting with `sk-admin-...`.

#### How far back does Pump pull data?

Pump backfills up to 365 days of historical cost data from the date you connect.

#### Does Pump make inference calls with my key?

No. Pump only uses your Admin key to read billing and usage data. It never makes model inference calls or modifies your OpenAI account.

#### Can I revoke the key later?

Yes. You can delete the Admin API key from the OpenAI platform at any time under **Organization → API Keys → Admin keys**. This will stop data syncing in Pump.

#### My data isn't showing up after connecting.

* Confirm the key starts with `sk-admin-...` (not `sk-proj-...`).
* Verify you have a paid OpenAI account with billing history.
* Wait a few minutes. The initial backfill may take a moment for high-usage accounts.
* If the issue persists, reach out to <support@pump.co>
