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

# OpenAI

> Connect OpenAI to Iru Compliance with a Platform API key to collect project settings, API key inventory, usage metrics, and organization metadata.

### About OpenAI

Iru reads **project** configuration, **usage** metrics, **model access** settings, and **org membership** from **platform.openai.com**. Authentication uses **`Authorization: Bearer`** with an API key. Modern **`sk-proj-`** keys are **project-scoped**; broader **`sk-`** or org keys expose more surface area - choose the narrowest key that satisfies your controls.

### How It Works

```http theme={null}
Authorization: Bearer sk-proj-xxxx
```

| Detail             | Value            |
| ------------------ | ---------------- |
| **Category**       | AI / platform    |
| **Authentication** | Bearer (API key) |

Official references: [Authentication](https://platform.openai.com/docs/api-reference/authentication), [API keys](https://platform.openai.com/api-keys), [Projects](https://help.openai.com/en/articles/9186755-managing-your-work-in-the-api-platform-with-projects).

### Prerequisites

* Access to **platform.openai.com** and the **project** you want evidence for.

### Connect OpenAI to Iru

<Tabs>
  <Tab title="OpenAI">
    <Note>
      Complete this tab before you connect the source in Compliance.
    </Note>

    <Steps>
      <Step title="Sign in to OpenAI Platform">
        Open **[platform.openai.com](https://platform.openai.com)** and sign in with a user who can manage **API keys** for the target **project**.
      </Step>

      <Step title="Select the project">
        Use the **project** picker (or **Default project**) to select the OpenAI **project** whose usage and configuration Iru should read for compliance evidence.
      </Step>

      <Step title="Open API keys">
        In the left navigation, open **API keys** for that project.
      </Step>

      <Step title="Create a new secret key">
        Select **Create new secret key** (or **+ Create key**). Enter a label such as **Iru Compliance** so you can revoke the correct key later.
      </Step>

      <Step title="Create the key">
        Confirm creation. OpenAI may ask you to re-authenticate or confirm org policy depending on your tenant settings.
      </Step>

      <Step title="Copy the key immediately">
        Copy the key value when OpenAI shows it. OpenAI does **not** show it again. Store it in a vault until you paste it into Iru.
      </Step>
    </Steps>

    <Note>
      Continue on the [**Iru Compliance**](#iru-compliance) tab.
    </Note>
  </Tab>

  <Tab title="Iru Compliance">
    <Note>
      Finish the [**OpenAI**](#openai) tab first.
    </Note>

    <Steps>
      <Step title="Open Sources">
        In Iru Compliance, on the left navigation bar, expand **Compliance** and select **Sources**.

        <Frame>
          <img src="https://mintcdn.com/iru/7HsGH7lnQ8GpVmI0/assets/media/images/iru-navigation-compliance-sources.png?fit=max&auto=format&n=7HsGH7lnQ8GpVmI0&q=85&s=595982441fd777b333b3ecfea24adc24" alt="Left navigation: Compliance expanded, Sources selected" width="424" height="1056" data-path="assets/media/images/iru-navigation-compliance-sources.png" />
        </Frame>
      </Step>

      <Step title="Turn on OpenAI">
        Find **OpenAI** (use **Category** or **Search by name or description**). On that card, turn on the **toggle**. A browser tab or window may open for the connector wizard.
      </Step>

      <Step title="Paste the API key">
        Paste the key into the **Bearer** field.
      </Step>

      <Step title="Finish the connection">
        Click **Submit Bearer Token**. When the connection succeeds, the wizard shows **Connection Configured**.
      </Step>

      <Step title="Confirm the source is Active">
        Close the **Iru is requesting access to external services** browser tab, then return to **Compliance** → **Sources** and confirm the **OpenAI** card is **Active**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### Troubleshooting

<AccordionGroup>
  <Accordion title="Nothing opens when you turn the source on">
    Check **pop-up blocker** settings for the Iru site and try again.
  </Accordion>

  <Accordion title="401 Unauthorized">
    Full key string; key not deleted in Platform UI.
  </Accordion>

  <Accordion title="Incomplete org view">
    **`sk-proj-`** keys only see **their project** - add keys per project or use org-level guidance from your program.
  </Accordion>

  <Accordion title="Quota errors">
    Billing / limits on the OpenAI side - not an auth fix.
  </Accordion>
</AccordionGroup>

### Considerations

<CardGroup cols={2}>
  <Card title="Iru does not run inference on your behalf: it reads…" icon="circle-info">
    Iru does **not** run inference on your behalf. It reads administrative and usage metadata only.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={2}>
  <Card title="Sources Management" icon="plug" href="/en/compliance/sources-management">
    Browse and manage every Compliance source.
  </Card>

  <Card title="Getting Started With Compliance" icon="rocket" href="/en/compliance/getting-started-with-compliance">
    Frameworks, actions, and **Artifacts**.
  </Card>

  <Card title="Iru Overview" icon="layer-group" href="/en/iru/platform-overview/iru-overview">
    How Endpoint, Compliance, and Identity fit together.
  </Card>

  <Card title="Artifacts Management" icon="folder-open" href="/en/compliance/artifacts-management">
    Upload, review, and organize evidence from sources and actions.
  </Card>
</CardGroup>
