OpenAI Setup Guide
Follow our setup guide to connect OpenAI to Fivetran.
Prerequisites
To connect OpenAI to Fivetran, you need one or more of the following, depending on the data you want to sync:
- To sync organization-level OpenAI Platform data, an OpenAI Platform account with the Owner role in the organization
- To sync project-level OpenAI Platform data:
- Access to the OpenAI Platform project whose data you want to sync
- Permission to create API keys in that project
- To sync Codex Enterprise Analytics API or workspace-level Compliance Platform data:
- A ChatGPT Enterprise or Edu workspace with access to the APIs you want to sync
- Access to the OpenAI Admin Console
- A workspace Owner or Admin role with permission to create Admin keys and grant the required read permissions
- The workspace Owner role, if you want to sync all supported Compliance Platform data, including conversation message logs
- To sync organization-level Compliance Platform data, access to the OpenAI API Platform organization whose data you want to sync
If you need help meeting these prerequisites, contact OpenAI Support.
Setup instructions
(Optional) Create OpenAI Platform Admin API key
If you want to sync organization-level data from OpenAI Platform, create an Admin API key. Fivetran uses this key to sync organization administration data, audit logs, usage data, and cost data from the OpenAI Administration API. Admin API keys cannot be used for non-administration endpoints.
For more information about the data the Admin API key provides access to, see the connector overview.
Log in to your OpenAI Platform account.
Go to your organization settings.
Go to the Admin keys page.
Click + Create new Admin key.
Enter a Name for the key.
In the Permissions field, select Read only.
Click Create Admin key.
Make a note of the Admin API key. You will need it to configure Fivetran.
You cannot recover a lost Admin API key. Save the key securely before you close the dialog.
(Optional) Create OpenAI Platform project API key
If you want to sync project-level data from a specific OpenAI Platform project, create an API key in that project. Fivetran uses this key to sync project-scoped data, such as files, skills, batches, and evaluations. The key provides access only to the selected project and its resources. It does not provide access to organization-level resources that require an Admin API key.
For more information about the data the project-specific API key provides access to, see the connector overview.
- Log in to your OpenAI Platform account.
- Go to your organization settings.
- Select the project whose data you want to sync.
- Go to the API keys page.
- Click + Create new secret key.
- Enter a Name for the API key.
- Verify that the project whose data you want to sync is selected in the Project drop-down menu.
- In the Permissions field, select Read only.
- Click Create secret key.
- Make a note of the API key. You will need it to configure Fivetran.
You cannot recover a lost API key. Save the key securely before you close the dialog.
(Optional) Create ChatGPT Admin key
If you want to sync data from the Codex Enterprise Analytics API or the Compliance Platform, find the workspace ID of your ChatGPT Enterprise or Edu workspace. Fivetran uses the workspace ID to identify the workspace whose data you want to sync.
Fivetran uses the admin key to sync the following data:
- Workspace-level Codex analytics, including usage, code review activity, review comment priorities, reactions, replies, and engagement metrics
- Compliance Platform data, including conversation message logs, audit logs, authentication logs, Codex logs, custom agent logs, app logs, GPTs, projects, skills, and workspace users
For more information about the data the ChatGPT Admin key provides access to, see the connector overview.
Each ChatGPT Admin key is scoped to one ChatGPT workspace.
Log in to the OpenAI Admin Console.
If necessary, select your tenant.
On the navigation menu, click Credentials.
Go to the Admin keys tab.
Click + Create new admin key.
Enter a Name for the key.
In the Workspace drop-down menu, select the ChatGPT workspace whose data you want to sync.
In the Expiration drop-down menu, select an expiration period for the key.
In the Permissions drop-down menu, select the permissions for the data you want to sync:
If you are a workspace Owner and want to sync all supported read-only Codex analytics and Compliance Platform data, select Read only.
To restrict the key to specific data, select Custom and do the following:
i. Expand Compliance logging platform and set the required Compliance Platform data categories to Read.
ii. Set Codex analytics API to Read to grant the
codex.enterprise.analytics.readpermission.
Only workspace Owners can grant broad compliance permissions and access to conversation messages. To sync all supported Compliance Platform data, create the Admin key while signed in as a workspace Owner.
Click Submit.
Make a note of the admin key. You will need it to configure Fivetran.
You cannot recover a lost admin key. Save the key securely before you close the dialog.
(Optional) Find ChatGPT workspace ID
If you want to sync data from the Codex Enterprise Analytics API or the Compliance Platform, find your ChatGPT Enterprise or Edu Workspace ID. Fivetran uses the Workspace ID to identify the ChatGPT workspaces whose data you want to sync.
- Log in to ChatGPT and switch to the ChatGPT Enterprise or Edu workspace that you want to connect to Fivetran.
- Click your profile icon and select Workspace settings.
- Click General.
- Under Workspace details, find the Workspace ID.
- Make a note of the workspace ID. You will need it to configure Fivetran.
(Optional) Find OpenAI Platform organization ID
If you want to sync organization-level Compliance Platform data, such as organization app logs, organization app authentication logs, and cost logs, find the ID of the OpenAI API Platform organization whose data you want to sync.
- Log in to the OpenAI API Platform.
- Switch to the organization whose data you want to sync.
- Go to Organization settings.
- Find the Organization ID and make a note of it. You will need it to configure Fivetran.
Finish Fivetran configuration
In the connection setup form, enter your Destination schema name.
To sync organization-level data from OpenAI Platform, enter the OpenAI Platform Admin API key you created.
To sync project-level data from a specific OpenAI Platform project, enter the OpenAI Platform project API key you created.
To sync Codex Enterprise Analytics API or Compliance Platform data, enter the ChatGPT Admin key you created.
To sync Codex Enterprise Analytics API or workspace-level Compliance Platform data, enter the Workspace ID you found.
You cannot modify the workspace ID after you create the connection.
To sync organization-level Compliance Platform data, enter the Organization ID you found.
(Hybrid Deployment only) If your destination is configured for Hybrid Deployment, the Hybrid Deployment Agent associated with your destination is pre-selected for the connection. To assign a different agent, click Replace agent, select the agent you want to use, and click Use Agent.
Click Save & Test. Fivetran will take it from here and sync your OpenAI data.