Docs Integrations
OpenAI audit log
Bring your OpenAI organization's audit log, which records who changed its API keys, projects, roles and settings, into your Runback audit log, sealed and checkable offline. About ten minutes, no code.
OpenAI keeps an audit log of changes to your organization on the API Platform: who created or deleted an API key, who changed a project, who bound a role, and when. This connector copies that log into Runback, where each record is sealed in your audit log next to everything else Runback records.
Each one is marked as recorded by OpenAI, sealed on receipt by Runback. It is OpenAI's record of an administrative change. It is not a policy decision, and Runback never presents it as one.
This is the administration log, not a record of what your agents did. It does not contain the prompts your agents sent, what a model answered, or which tools an agent called. For those, use the OpenAI integration or the gateway. It is also not the ChatGPT Enterprise Compliance API, which is a different product that this connector does not read.
| OpenAI sends | Runback seals | |
|---|---|---|
| What happened | api_key.created | api_key.created |
| Who | session, user-abc123 (user@example.com) | session, user-abc123 |
| When | 1775808550 (Unix seconds) | 2026-04-10T08:09:10.000Z |
| Which record | audit_log-xxx_20260410 | audit_log-xxx_20260410 |
| The whole record | as OpenAI sent it | kept, sha256 ab06134df2c272a8… |
| How it arrived | Audit Logs API | pulled_by_runback |
| Recorded by | OpenAI | openai_audit: recorded by OpenAI, sealed on receipt by Runback |
The event above is an example in the shape OpenAI's reference describes, not anyone's data. The right-hand column is what the connector's own code produces from it.
How the records get to Runback
OpenAI offers the log only as an API you read from, so Runback reads it for you with a key you give it.
- You create an Admin key in OpenAI that can read the audit log, and nothing else.
- You paste it into Runback. Runback checks it with OpenAI, then stores it encrypted.
- Every five minutes Runback asks OpenAI for events it has not collected yet.
- Each record is stored, then sealed into your audit log within about two minutes.
Collection starts when you connect. Events from before that are not collected.
Before you begin
- An OpenAI API Platform organization where an owner has turned audit logging on, in the data controls of the organization settings in the OpenAI Platform.
- The right role to create the key: an organization owner can create an Admin key.
- An owner or admin role in Runback.
Steps
Create an Admin key that can only read the log
In the OpenAI Platform, open the Admin keys page of your organization settings and create a key. Name it
runback, and set the Audit Logs scope to Read and nothing else. Copy the key; it is shown once. A regular project API key does not work here.Expected outputYou have an Admin key. It can read the audit log and nothing else.Connect it in Runback
In Runback, open Settings › Keys and access › OpenAI audit log (organization administration), paste the key, and choose Connect.
Expected outputThe card says the key is connected and shows its last four characters. If OpenAI rejects the key, Runback says why and stores nothing.Check records arrive
Create and then delete a test API key in the OpenAI Platform. Within about ten minutes the same card shows how many records have arrived and when the latest came in.
What Runback records
One record per event, with the fields OpenAI sends:
- What happened: OpenAI's event type, for example
api_key.createdorproject.archived, exactly as OpenAI wrote it. - Who: the kind of actor (a signed-in session, or an API key) and its stable ID, for example the user's OpenAI user ID, a service account's ID, or the API key's tracking ID. The summary never uses an email address.
- When: when it happened, by OpenAI's clock.
- The whole record: every field OpenAI sent, including any email address, IP address and browser details in it, kept as canonical JSON (RFC 8785: keys sorted, no extra spaces) and sealed by the SHA-256 hash of that text. Hashing the raw bytes of OpenAI's response will not give the same hash; canonicalize the record first.
- How it arrived: fetched by Runback from OpenAI's API with your key.
OpenAI may send the same event more than once. Runback keeps one copy and counts the rest as duplicates.
Checking a record offline
Records are sealed in batches, like Runback's own decisions, and each one can be proved on its own. Get the proof for one record by its OpenAI event ID, with your Runback API key, from GET /api/ledger/activities/:id?source=openai_audit. Save the answer and check it with the verifier:
npx @runback/verify@3.4 proof.jsonThe proof needs @runback/verify 3.4 or later. It confirms the record is unchanged since Runback sealed it, that it sits under a checkpoint signed with Runback's published key, and that it was recorded by OpenAI.
Limits
- Runback seals what OpenAI's API returns. It does not check the records any other way, and it does not claim OpenAI guarantees they cannot change after they are written, because OpenAI's documentation does not say so.
- OpenAI does not document how long an event takes to appear, or the order it returns them in. Runback waits ten minutes, reads each window to its end, and re-reads the last hour each time. An event that appears more than about an hour late is missed.
- Events that OpenAI scopes to the whole tenant rather than a project, for example
role.bound_to_resource, are returned only by a separate query that this connector does not make yet. They are not collected. - OpenAI keeps audit events on a best-effort basis, with no fixed retention period. Runback's sealed copy may outlive OpenAI's.
- OpenAI does not document a rate limit. Runback reads at most five pages of 100 events per poll. If OpenAI answers that there are too many requests, the card shows the error and the next poll tries again.
- If OpenAI rejects the key (for example after it is deleted), nothing new is collected until it is fixed, and the card shows the error. Nothing already collected is lost, and Runback resumes from where it stopped once the key works again.
- A record without an ID or a usable time, or larger than 256 KB, is refused, never cut short. The same ID arriving with different content is also refused, never overwritten. The card shows how many have been refused since you connected.
- Disconnect deletes the key and stops polling. Records already received stay sealed.
For your developer
The connector is a poll, not an endpoint you call. It uses GET https://api.openai.com/v1/organization/audit_logs with an effective_at window in Unix seconds and after paging, as OpenAI documents. The key is stored with AES-256-GCM under EVIDENCE_CONNECTOR_SECRET_KEY, which a self-hosted deployment must set. The fields read and every assumption about OpenAI's records are listed in web/lib/connectors/openaiAudit.ts.
OpenAI reference: the audit log object.