Skip to main content

Cotool + OpenAI

Ingest OpenAI API Platform audit logs and ChatGPT Enterprise compliance logs into Cotool to search key, user, sign-in, and app activity and run detections on it.

Productivity
Updated

The short answer

OpenAI keeps two separate security records: API Platform audit logs for keys, users, projects, and organization settings, and ChatGPT Enterprise and Edu compliance logs for workspace audit, sign-in, app, and optional conversation events. Cotool Log Ingest collects both into Cotool Logs for search and detections.[1][2][6][8][9]

How it connects: Cotool polls OpenAI with Admin keys. An API Platform organization Admin key with audit log read access covers one organization's Audit Logs API, and a workspace-scoped Admin key from the ChatGPT Admin Console covers one workspace's compliance logs.[2][6][8]

What Cotool uses from OpenAI

API key lifecycle
Audit log events such as api_key.created, api_key.updated, and api_key.deleted record who issued or changed project and admin keys.[6][7]
Users, invites, and service accounts
Events such as invite.sent, user.added, user.updated, user.deleted, and service_account.created track membership and role changes in an organization.[6][7]
Logins and logouts
The audit log records login.succeeded, login.failed, logout.succeeded, and logout.failed for the organization.[6][7]
Projects and organization settings
Project creation, updates, and archival, plus organization.updated for changes to organization settings.[6][7]
ChatGPT compliance logs
The Compliance Logs Platform serves immutable, append-only events from ChatGPT Enterprise and Edu workspaces in categories such as audit, authentication, and app logs. Workspace audit logs also record changes to Codex policies and configuration.[8][9]
Conversation messages
Conversation message logs, including messages from locked chats, are available when a workspace owner grants the Conversation messages permission.[8][9]

Detections, hunts, and triage

Flag new admin and API keysDetection
A detection on api_key.created events alerts when someone issues a key outside a change window or from an actor who doesn't normally manage keys.[4][7]
Count failed OpenAI loginsDetection
Counting login.failed events per actor over a short window surfaces password guessing against API Platform accounts, alongside the identity provider's own sign-in logs.[4][7]
Review a departing user's OpenAI accessTriage
During offboarding, an agent searches the logs for the user's user.removed event and any keys or service accounts they created, so responders know which credentials still work.[2][6][7]
Hunt for sensitive data in ChatGPTHunt
With conversation and app logs collected, a hunt searches for regulated data or secrets pasted into ChatGPT, the DLP use case OpenAI describes for the Compliance Platform.[5][9]

Setup and permissions

For the API Platform, an organization owner enables audit logging under Settings, Data controls, Data retention, then creates an Admin key with audit log read access. For ChatGPT, a workspace Owner or Admin creates a key under Credentials, Admin keys in the Admin Console and copies the secret, which can't be viewed again.[6][8]

PermissionAccess
Audit Logs scope: ReadAPI Platform Admin key permission for reading the organization's audit logs.[6]Read
Audit logs: ReadChatGPT workspace Admin key permission for workspace audit log events.[8][9]Read
Authentication logs: ReadChatGPT workspace Admin key permission for sign-in events.[8][9]Read
App logs: ReadChatGPT workspace Admin key permission for app activity events.[8][9]Read
Conversation messagesOptional, owner-only permission that exposes ChatGPT conversation messages.[8][9]Read
  • Once audit logging is enabled for an API Platform organization it can't be turned off in settings; an organization owner has to contact OpenAI Support to change it.[6]
  • The Compliance Logs Platform keeps data for 30 days, so logs need to be downloaded continuously to keep them longer. API Platform audit logs have no fixed retention period.[6][9]
  • A workspace Admin key applies to one ChatGPT workspace and grants no access to API Platform organizations or model inference. API Platform Admin keys are managed separately.[8]

How Cotool works with OpenAI

  • OpenAI is listed in Cotool's integrations catalog, so its logs can sit next to identity, endpoint, and SaaS sources in the same platform.[1]
  • Cotool Log Ingest brings logs from supported integrations into Cotool Logs, where they can be searched and evaluated on a schedule by the Detections Platform. Some sources are polled through an API with the credentials you configure.[2]
  • Log ingestion in Cotool is opt-in per stream, so the API Platform and ChatGPT log families can be turned on independently.[3]
  • Cotool detections are Python code that run against logs stored in Cotool or call connected tools directly, which lets an OpenAI key-creation alert be checked against identity data.[4]

FAQ

Do OpenAI API Platform audit logs include API request content?
No. OpenAI API Platform audit logs record administrative and organization-configuration events, such as changes to users, projects, API keys, and settings. They are separate from API request and response content, and Zero Data Retention doesn't change them.[6]
How long does OpenAI keep ChatGPT compliance logs?
The OpenAI Compliance Logs Platform retains ChatGPT compliance data for 30 days. Teams that need longer retention should download the logs continuously and store them under their own policies.[9]

Sources

  1. Integrations (Cotool) · accessed November 22, 2026
  2. Cotool Log Ingest (Cotool docs) · accessed November 22, 2026
  3. Connect Log Sources (Cotool docs) · accessed November 22, 2026
  4. Detections are code (Cotool Detect) · accessed November 22, 2026
  5. Threat hunting (Cotool Hunt) · accessed November 22, 2026
  6. Admin and Audit Logs API for the API Platform (OpenAI Help Center) · accessed November 22, 2026
  7. Audit Logs (OpenAI API Reference) · accessed November 22, 2026
  8. Managing Admin keys in Admin Console (OpenAI Help Center) · accessed November 22, 2026
  9. OpenAI Compliance Platform for Enterprise and Edu customers (OpenAI Help Center) · accessed November 22, 2026

Related integrations

All integrations

Use cases with OpenAI

Related reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo