OpenAI Setup Guide
Follow our setup guide to connect OpenAI to Fivetran.
Prerequisites
To connect OpenAI Platform to Fivetran, you need the following:
- An OpenAI Platform account with the Owner role in the organization
- Access to the ChatGPT Admin console for your ChatGPT Enterprise workspace, if you want to sync Codex Enterprise Analytics API data
Setup instructions
Create Admin API key
Fivetran uses an Admin API key to access and sync organization-level data, such as audit logs, usage, and users, from the Administration API. Admin API keys are used only for Administration API endpoints and cannot be used for non-administration endpoints.
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.
The Admin API key appears only once after you create it. Make sure you save the key before you close the dialog.
(Optional) Create project-specific 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 access and sync project-scoped data from that project, such as files, skills, batches, and evaluations. The key authorizes access to project-scoped resources and does not provide access to organization-level resources that require an Admin API key.
In the OpenAI Platform dashboard, go to the project whose data you want to sync.
Go to your organization settings.
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.
The API key appears only once after you create it. Make sure you save the key before you close the dialog.
(Optional) Create Codex Enterprise Analytics API key
If you want to sync Codex Enterprise Analytics API data from a specific ChatGPT workspace, create an API key scoped to codex.enterprise.analytics.read. Fivetran uses this key to access and sync workspace-level Codex analytics from that workspace, including usage, code review activity, review comment priorities, reactions, replies, and engagement metrics.
In the OpenAI Platform dashboard, select your organization.
Go to the API keys page.
Click + Create new secret key.
Enter a Name for the API key.
Verify that the correct project 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.
The API key appears only once after you create it. Make sure you save the key before you close the dialog.
Contact OpenAI Support to scope the API key to
codex.enterprise.analytics.read. Wait for OpenAI to confirm that the API key has access to the Codex Analytics API before using it in Fivetran.
(Optional) Find workspace ID
If you want to sync Codex Enterprise Analytics API data, find your ChatGPT Enterprise Workspace ID. Fivetran uses the Workspace ID to identify the ChatGPT workspace whose Codex analytics data you want to sync.
- Log in to the ChatGPT Admin console.
- Find your Workspace ID under Workspace details.
- Make a note of the Workspace ID. You will need it to configure Fivetran.
Finish Fivetran configuration
In the connection setup form, enter your Destination schema name.
Enter the Admin API key you created.
(Optional) To sync project-level data from a specific OpenAI Platform project, enter the Project-specific API key you created.
(Optional) To sync Codex Enterprise Analytics API data, do the following:
i. Enter the Codex Enterprise Analytics API key you created.
ii. Enter the Workspace ID you found. You can enter multiple workspace IDs as comma-separated values.
You cannot change the Workspace IDs after you set up the connection.
(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 Platform data.