> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimazehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI

> Connect an OpenAI Organisation Admin API key so Optimaze can import usage and cost data.

Connect OpenAI organisation billing to Optimaze using an **Organisation Admin API key**. Optimaze imports cost data for attribution and AI spend visibility.

## Prerequisites

* An OpenAI organisation with access to **Organisation → Admin API keys**
* Permission to create an Admin API key (keys typically start with `sk-admin-`)

## Set up the OpenAI integration

In Optimaze, open **Integrations**, then choose **OpenAI** (or **Create** and select OpenAI).

### Step 1: Create an Admin API key in OpenAI

In the [OpenAI Platform](https://platform.openai.com/), go to **Organisation → Admin API keys** and create an Admin API key. Copy it once; you will not be able to view the full secret again.

### Step 2: Enter the key in Optimaze

Paste the **OpenAI Admin API key** into the Optimaze form. Optionally set a **display name** (for example `OpenAI production`). Credentials are stored encrypted in Optimaze integration config.

![Image](https://mintcdn.com/optimaze/H22rTqPFmthmkajv/images/image-24.png?fit=max\&auto=format\&n=H22rTqPFmthmkajv\&q=85\&s=97370d7f74d2f4a6adfa992a8ca5d80f)

### Step 3: Create the integration

Submit the form to create the integration. Optimaze validates the key and starts syncing organisation cost data.

## What happens next

Cost data appears in Optimaze after the first successful sync. Check status and last sync on the Integrations list. You can rotate the key later from the integration edit screen (leave the key blank to keep the existing credential).

## Troubleshooting

* Keys must be **Admin** keys (`sk-admin-...`), not standard project API keys.
* Confirm the key belongs to the organisation whose spend you want to ingest.
* If validation fails, regenerate the Admin key and update the integration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.