Connect an OpenAI Organization

In this guide, you will connect an OpenAI organization to Turbot Guardrails using the Create Connection wizard. The wizard authenticates an Admin API key and organization id, places the connection in a folder, and creates it in a single flow.

Once connected, Guardrails uses the OpenAI Admin API to discover the organization's projects, members, users, API keys, service accounts, and invites, and evaluates them against your configured policies.

This guide covers both the OpenAI-side setup (minting an Admin API key) and the Guardrails-side wizard flow.

Prerequisites

Step 1: Mint an Admin API Key

Guardrails authenticates against the OpenAI Admin API with an organization-scoped admin key. Project-scoped keys (sk-proj-...) and service-account keys are rejected by the /v1/organization/... endpoints.

In the OpenAI Platform Console, navigate to Organization > Admin keys (the org-level page, not the per-project API keys page). Confirm your role is Owner, select Create new admin key, name it (for example, turbot-guardrails), and copy the value.

[!IMPORTANT] Admin keys are shown only once and cannot be recovered after the dialog closes. Copy the key immediately. OpenAI admin keys carry the prefix sk-admin-....

Step 2: Find Your Organization Id

OpenAI does not expose a /v1/organization/me-style endpoint, so the wizard cannot auto-derive the organization id. You supply it.

Find your organization id (the org-... value) in the OpenAI dashboard under Organization > Settings.

Step 3: Open the Create Connection Wizard

From the Dashboard (the Guardrails home page), select the CONNECT button in the top right. You can also start from the Accounts page (Workspace > Accounts) by selecting Import. Both open the same Create Connection wizard.

Guardrails Dashboard with the CONNECT button in the top right

Step 4: Select OpenAI as the Provider

The wizard displays a grid of available providers. Each provider shows an Installed or Not Installed badge indicating whether the corresponding mod is available in your workspace.

Select OpenAI from the provider grid.

Provider selection grid showing OpenAI and Anthropic alongside the cloud providers

Step 5: Authenticate

The wizard presents a 3-step process. Step 1 authenticates your Admin API key and organization id against OpenAI.

Wizard authentication step with Admin API Key, Organization ID, and optional Base URL fields

FieldDefaultDescription
Admin API KeyNoneThe sk-admin-... key minted in Step 1. Stored as a secret.
Organization IDNoneThe org-... id from Step 2. Required.
Base URLhttps://api.openai.comOptional. Override only for a proxy or non-default endpoint.

Select Test Connectivity. On success, Guardrails displays Connectivity verified. Both the Admin API key and the organization id must be present and the test must pass before you can continue.

[!TIP] If the test fails with a scopes error, the key is a project-scoped (sk-proj-...) or service-account key. Mint an organization-scoped admin key (sk-admin-...) as an Owner. If it fails on the organization id, re-check the org-... value under Organization > Settings.

Select Continue to proceed.

Step 6: Choose Destination Folder

Choose where to place this connection in your Guardrails resource hierarchy. The imported organization and all its discovered resources are placed in this folder.

Wizard destination folder selection step

Select a folder, then select Continue to proceed to the final step.

Step 7: Review and Create Connection

The final step summarizes your configuration in numbered sections:

  1. Authentication: Organization id, Admin API Key (Verified), and base URL (if set).
  2. Destination Folder: Where the connection will be placed.

A What happens next note explains that Guardrails connects to your OpenAI organization, discovers projects and usage data automatically, and lets you manage discovery settings after import.

Wizard review step showing the authentication summary and destination folder

Select Create Connection.

Step 8: Review

You can verify the organization from the Guardrails CLI:

turbot resource get tmod:@turbot/openai#/resource/types/organization

Next Steps

Troubleshooting

IssueSolution
OpenAI shows Not Installed in the gridInstall the OpenAI mod in your workspace, then reopen the wizard.
403 Missing scopes on Test ConnectivityThe key is a project-scoped (sk-proj-...) or service-account key. Mint an organization-scoped admin key (sk-admin-...) as an Owner.
Test Connectivity rejects the organization idThe org-... value is wrong for this admin key. Confirm it under Organization > Settings in the OpenAI dashboard.
Create Connection button disabledYour role lacks connection-create permission. You need Turbot/Owner or Turbot/Admin at the Turbot resource level.
Further assistanceOpen a support ticket with error details, or join the #guardrails channel in the Turbot Community Slack.