Skip to content

OpenAI Platform ​

The OpenAI Platform Source connects an AI System to one OpenAI API organization on platform.openai.com. Modulos reads the API usage, the spend, the audit log, and the governance settings of that organization. Modulos only reads. It does not change settings in the OpenAI organization.

Used byMetric Tests, Agent Tests, Scout, Risk Agent
ModePull
CredentialsAn Admin API key
Metric selectionType the metric name

What this is ​

The OpenAI Platform Source reads one API organization, with Codex used through the API keys of that organization. OpenAI records the use and spend of each request for the owner of the API key. A shared key counts for its owner.

The Source does not read these OpenAI products:

  • ChatGPT Enterprise and ChatGPT Business workspaces
  • Codex used with a ChatGPT sign-in
  • the Compliance Logs Platform
  • the tenant settings of the Global Admin Console

Where in Modulos ​

  • AI System → Settings → Sources → Add Source → OpenAI Platform adds the Source.

Before you start ​

  • An Organization Admin makes OpenAI Platform available. See Source & Connectors.
  • You must be an Organization Owner on platform.openai.com.

How to create the Admin API key ​

  1. Sign in to platform.openai.com.
  2. Open Settings → Organization → Admin keys.
  3. Create an admin key with an expiry date.

An Admin API key starts with sk-admin-.

How to activate audit logging ​

Do these steps only if you want the audit metrics.

Audit logging

Before you activate audit logging, make sure that your organization wants it permanently. After you activate it, only OpenAI can deactivate it. Modulos does not change this setting.

  1. Open Settings → Organization → Data controls.
  2. Activate audit logging.

How to connect OpenAI Platform ​

  1. Open AI System → Settings → Sources.
  2. Select Add Source.
  3. Select OpenAI Platform.
  4. Type a Source Name.
  5. Paste the key into Admin API Key.
  6. Select Save.
Add Source dialog with OpenAI Platform selected: the connection instructions on the left, the fields on the right.
Add an OpenAI Platform Source.
  1. 1
    Admin API Key
    An Admin API key from Settings → Organization → Admin keys.

If the key is a project key, the dialog tells you to use an Admin API key from Settings → Organization → Admin keys. When you save, Modulos reads the members of the organization with the key. If OpenAI rejects the key, the Source is not saved.

Metrics for Metric Tests ​

A Metric Test on an OpenAI Platform Source reads one of these metrics:

  1. In the test dialog, type the name as the tables show it.
  2. Select Check.

Modulos reads three kinds of metric:

  • Posture metrics give the current settings.
  • Use and cost metrics give the most recent closed UTC day that has data in the look-back period. Modulos reads no data of the current day.
  • Audit metrics count the events in the look-back period.

The look-back period is 7 to 31 days. It increases with the schedule period of the test.

Members, projects, and keys ​

MetricValue
org_user_countMembers of the organization, in all roles
org_owner_countMembers with the owner role
pending_invite_countOpen invitations
active_project_countActive projects
project_owner_membership_sharePart of the project memberships, from 0 to 1, with the project owner role
service_account_countService accounts in the active projects
custom_role_countCustom roles of the organization and its active projects
group_countGroups of the organization
user_api_key_minting_disabled1 if members cannot create their own API keys, 0 if not
scim_managed_org1 if SCIM manages the organization, 0 if not
api_key_countProject API keys in the active projects
stale_api_key_countKeys not used for 90 days, or with no use and an age of more than 90 days
service_account_owned_key_sharePart of the keys, from 0 to 1, that a service account owns
admin_api_key_countAdmin API keys of the organization
non_expiring_admin_key_countAdmin API keys without an expiry date

Data, tools, and limits ​

MetricValue
zero_data_retention_project_sharePart of the active projects, from 0 to 1, with zero or enhanced zero data retention
org_data_retention_configured1 if the organization sets a data retention policy, 0 if it uses the default
model_allowlist_project_sharePart of the projects, from 0 to 1, that let only listed models be used
web_search_enabled_project_countProjects with the hosted web search tool active
mcp_enabled_project_countProjects with hosted MCP tools active
code_interpreter_enabled_project_countProjects with the hosted code interpreter active
non_global_residency_project_sharePart of the projects, from 0 to 1, with a data residency other than global
org_spend_limit_enforcing1 if the organization has a spend limit that applies, 0 if not
spend_alert_countSpend alerts of the organization and its projects
spend_alerts_without_recipientsSpend alerts with no recipient
org_mtls_certificate_active1 if an mTLS certificate of the organization is active, 0 if not
byok_configured1 if the organization uses its own encryption key, 0 if not
min_requests_per_minute_limitThe lowest requests-per-minute limit of a model in the active projects

Audit log ​

MetricValue
audit_eventsAudit events in the look-back period
privileged_change_eventsAudit events about API keys, users, invites, roles, projects, spend limits, service accounts, or the organization

The audit metrics give no value when the audit log has no events, cannot be read, or has more than 20,000 events in the period. A Metric Test cannot show the difference between a log that is off and a period with no events.

Usage ​

MetricValue
active_api_key_ownersOwners of API keys with use
model_requests_totalRequests for completions, embeddings, and moderations
input_tokens_totalInput tokens for completions, embeddings, and moderations
output_tokens_totalOutput tokens for completions
distinct_models_usedDifferent models used
cached_input_token_sharePart of the completion input tokens, from 0 to 1, that came from the prompt cache
batch_request_sharePart of the completion requests, from 0 to 1, sent through the Batch API
codex_model_request_sharePart of the requests, from 0 to 1, made with a Codex model
image_output_tokensImage output tokens
audio_output_tokensAudio output tokens
web_search_callsCalls to the hosted web search tool
file_search_callsCalls to the hosted file search tool
transcription_secondsSeconds of transcribed audio
service_account_traffic_sharePart of the requests, from 0 to 1, made with keys that a service account owns
unresolved_principal_traffic_sharePart of the requests, from 0 to 1, made with keys of owners who left or keys that were replaced

Cost ​

MetricValue
cost_usdNet spend in USD, with negative billing adjustments
cost_by_api_key_owner_usdSpend in USD for each key owner, as a JSON object with an unattributed entry
cost_top_api_key_owner_sharePart of the charges, from 0 to 1, from the key owner with the largest spend
cost_top_key_sharePart of the charges, from 0 to 1, from the key with the largest spend. No value for days before 6 December 2025.
cost_line_itemsSpend in USD for each billing line item, as a JSON object
codex_cost_usdSpend in USD on line items with codex in their name
web_search_cost_usdSpend in USD on web search tool calls
unattributed_cost_sharePart of the charges, from 0 to 1, with no key owner

cost_by_api_key_owner_usd and cost_line_items are text metrics. All other metrics are number metrics.

Scout, Agent Tests, and the Risk Agent ​

Scout, Agent Tests, and the Risk Agent read an OpenAI Platform Source with read-only queries:

  • Usage: the use of each key owner, totaled for 1 to 14 days, with requests, tokens, models, tool calls, and transcription.
  • Cost: the spend in USD for each line item, key owner, and key, for a maximum of 31 days.
  • Organization posture: members and roles, invites, projects, service accounts, API keys, data retention, model permissions, hosted tools, spend controls, certificates, and encryption keys.
  • Audit events: the newest events first, for a maximum of 31 days and 100 events.

Important considerations ​

  • Give the Admin API key an expiry date, and replace it before it expires.
  • Daily use and cost are complete only after the UTC day closes.