---
title: How to connect OpenAI
canonical: "https://cloudmonitor.ai/docs/how-to/how-connect-openai/"
description: "Generate an OpenAI Admin API key, then paste it into CloudMonitor to track token usage and dollar cost across models, projects, users, and API keys."
---

This guide creates an OpenAI **Admin API key** so CloudMonitor can read token usage and cost data from your OpenAI organization. Allow about 5 minutes. You need to be an OpenAI organization **owner** to complete it.

:::tip
**Admin keys are not project API keys**

The Admin key used here is distinct from the project API keys your code uses to call OpenAI models. Admin keys are read-only against `/v1/organization/usage/*` and `/v1/organization/costs`; they cannot call models, change settings, or move billing.
:::

### Step 1 — Generate an Admin API key

Open [platform.openai.com → Settings → Admin keys](https://platform.openai.com/settings/organization/admin-keys).

Click **Create new key**. Name it `CloudMonitor`. The key starts with `sk-admin-` and is shown only once — copy it now.

### Step 2 — Add the key in CloudMonitor

In the CloudMonitor Admin App, go to **Settings** → **AI providers** → **OpenAI** → **Add connector**.

Paste the Admin key. Click **Verify**.

### Step 3 — Confirm the 14-day backfill

CloudMonitor pulls the most recent 14 days as proof the connector works. You should see:

- Daily input, output, and cached input token counts
- Token use broken down by model, project, user, and API key
- Dollar cost from the `/v1/organization/costs` endpoint, in USD
- Batch vs standard tier split

If the totals match what you see in [platform.openai.com → Usage](https://platform.openai.com/usage), click **Save**.

### Step 4 — Polling cadence

CloudMonitor polls hourly for the current day and backfills T-2 daily to pick up settled cost entries. Reports refresh as new data lands.

:::tip
**What gets tracked**

Chat completions, embeddings, image generation, audio (Whisper plus text-to-speech), moderations, vector stores, and Code Interpreter sessions are all ingested. Reasoning tokens from the o-series surface as a derived **Thinking tokens** KPI on the Model Mix report.
:::

:::tip
**Troubleshooting**

- **"Unauthorized" on Verify** — you pasted a project API key instead of an Admin key. Re-create the key from **Settings → Admin keys**, not from **Settings → API keys**.
- **Costs missing for the current day** — cost settlements lag token usage by about an hour. Wait for the next refresh.
- **A project is missing from the breakdown** — only projects this Admin key's organization owns are exposed. Cross-organization workflows need a connector per organization.
:::

## What's next

- [How to read CloudMonitor's AI cost reports](/docs/how-to/how-interpret-ai-token-cost-reports/)
- [Does CloudMonitor see my AI prompts or responses?](/cloudmonitor-data-security-statement/)
