Skip to main content
Connector guides

Connect OpenAI Admin

OpenAI Admin lets your AI assistant read the administration side of your OpenAI API organization: who is in it, which projects, service accounts and API keys exist, what it uses and spends, and what…

Written By Christopher Scaminaci

Last updated 21 days ago

OpenAI Admin lets your AI assistant read the administration side of your OpenAI API organization: who is in it, which projects, service accounts and API keys exist, what it uses and spends, and what its administrators did. StackJack's tools only read. AI Governance can make changes in this account when you turn that on for the connection. You turn it on under AI Governance, then AI tools, then Vendor changes, with Turn changes on. Making changes in your AI vendor accounts lists what can be changed and the permission each key needs. StackJack connects to the OpenAI organization administration API at one fixed address, so there is no address to enter.

Connecting OpenAI Admin to StackJack gives your AI assistant a family of openai_admin_ MCP tools. MCP (Model Context Protocol) tools are the standardized commands an AI assistant can call through StackJack. With them, your AI can:

  • Review people and access - the users and invites of the organization, its projects and their members, its service accounts, and its groups and roles
  • Check the API key inventory - which organization and project keys exist, by hint and id. A key value is never shown
  • Read rate limits - the limits set on each project
  • Read usage and cost (on Pro plans) - usage and cost reports and spend limits
  • Read the audit log (on Pro plans) - who did what in the organization, once audit logging is on

Every tool only reads. Nothing in your OpenAI organization is created, changed or deleted by these tools, so no tool is marked destructive. No tool returns chat or conversation text.

Which key to create

OpenAI has two kinds of key that never stand in for each other.

  • An API Platform organization (platform.openai.com) uses an organization Admin key. It starts with sk-admin, and only an organization owner can create it. Every OpenAI Admin tool reads through this key.
  • A ChatGPT Enterprise, Edu or Healthcare workspace uses a workspace Admin key (also called the Compliance API key). No OpenAI Admin tool reads through it. AI Governance reads through it, see below.

An organization with both products adds one connection for each, because one connection holds one key.

Create an API Platform organization Admin key

  1. Sign in to the API Platform as an organization owner.
  2. Go to Settings, then Organization, then Admin keys.
  3. Create a key with read access to Usage, Audit Logs and Organization Administration. Add read access to Groups and Roles if you want your AI to read groups and roles.
  4. Copy the key. OpenAI shows it once.

Turn on audit logging

To read the organization audit log, enable audit logging first.

  1. In the API Platform, go to Settings, then Organization, then Data controls, then Data retention.
  2. Enable audit logging.

Audit logging cannot be turned off again once it is on. Only OpenAI Support can turn it off. Turn it on only if you want the organization audit log that StackJack reads. Skip this step if you only use ChatGPT.

Create a ChatGPT workspace Admin key

  1. In the ChatGPT Admin Console, go to Credentials, then Admin keys, and create a new admin key.
  2. The workspace owner creates the key for the conversation categories. A workspace owner or admin can create one for the activity categories.
  3. Copy the key and the workspace id or the organization id (it starts with org-).

Skip this step if you only use the API Platform.

Connect it in StackJack

  1. Open Connectors, then OpenAI Admin.
  2. Choose the key type: API Platform organization Admin key or ChatGPT workspace key.
  3. Paste the key. For a ChatGPT key, also enter the workspace id or the organization id.
  4. Click Test connection.

There is nothing else to enter. When you edit the connection later, the key box starts empty: leaving it empty keeps the stored key.

What is worth knowing before you start

What Test connection checks

For an API Platform key, StackJack tries the user list, a usage report and the audit log in turn, because an Admin key carries only the permissions its owner chose and any one of the three may be the one it has. For a ChatGPT key it tries the sign-in log of the workspace or organization you entered.

If the key is valid but carries none of the permissions StackJack reads, the test says so and does not count it against the connection. A key that OpenAI rejects does count against the connection: after three failed checks in a row it is switched off until you fix the key.

AI Governance uses the same connection

AI Governance reads OpenAI through this same connection, so there is no second key to paste. In AI Governance, add a source of the kind you want and choose this connection:

  • OpenAI usage and cost, and the OpenAI audit log, need an API Platform organization Admin key
  • ChatGPT Enterprise activity logs and ChatGPT Enterprise conversations need a ChatGPT workspace key

The ChatGPT logs reach StackJack only through AI Governance, behind its notice gate and the capture level you choose. They never come back through an openai_admin_ tool. The ChatGPT logs include the messages of locked chats, and an account PIN does not keep them out. They are scanned only when your organization turns that capture level on. The member lists of the API Platform connection also help AI Governance match people by email address.

Included with an AI Governance plan

If your organization has a paid AI Governance plan (Pro, Business or Enterprise) or is in the AI Governance beta, OpenAI Admin is included at no extra charge. It runs at the Business level: the same openai_admin_ tools, with the Business monthly call quota, and no OpenAI Admin subscription to buy. On the Connectors page the connector shows Included with AI Governance in place of the upgrade buttons, and the Billing page offers no upgrade for it.

Your connection and your key stay as they are. The plan decides only the tool level and the call quota. Nothing is written to your OpenAI Admin subscription, so when the AI Governance plan ends the connector returns to whatever your own subscription says, with nothing to clean up.

If you already pay for OpenAI Admin when a paid plan starts, StackJack emails the account owner once. Under AI Governance, then Billing, Admin connectors included lists each connector you still pay for, with Stop paying for it. That button opens the normal removal on the Billing page, which shows what changes before anything is removed, including any change to the discount on your other connectors. StackJack never removes a subscription for you.

Keys expire

An Admin key can expire. A ChatGPT workspace key also stops working if it is revoked or its creator loses the workspace access it needed. Test connection then reports the key as rejected: create a new key and paste it in.

Rate limits

OpenAI publishes no rate limit for the organization administration API, so StackJack paces its calls itself and backs off when OpenAI asks it to.

Paging through results

Lists page with after and limit cursors, and a tool answers one page at a time with the cursor for the next.

Plans and limits

Reads of users, projects, service accounts, keys and rate limits are available on the Free tier. Reads of usage, costs, spend limits and the audit log are Pro. Business reaches the same tools as Pro and differs by monthly call quota.

See the generated OpenAI Admin tool reference for the current inventory, plan assignment, input schemas, and destructive-action labels.

OpenAI Admin tools

openai_admin_ · 42 tools · Free 26 · Pro 16

Organization

ToolWhat it does
openai_admin_get_admin_api_key
Free · Read-only
Gets one Admin API key by id: name, when it was created, expires and was last used, its owner and OpenAI's redacted_value.
openai_admin_get_data_retention
Free · Read-only
Gets the data retention setting of the API organization: its type (zero_data_retention, modified_abuse_monitoring, enhanced_zero_data_retention or enhanced_modified_abuse_monitoring).
openai_admin_get_group
Free · Read-only
Gets one group of the API organization by id: name, when it was created, whether SCIM manages it and its group type (group or tenant_group).
openai_admin_get_invite
Free · Read-only
Gets one invitation by id: email address, role (owner or reader), status (accepted, expired or pending), when it was created, expires and was accepted, and the projects it grants.
openai_admin_get_project
Free · Read-only
Gets one project by id: name, status (active or archived), when it was created and archived, its external key id and its data residency.
openai_admin_get_project_api_key
Free · Read-only
Gets one API key of one project by id: name, when it was created, expires and was last used, its owner and OpenAI's redacted_value.
openai_admin_get_project_data_retention
Free · Read-only
Gets the data retention setting of one project: its type (the organization types, plus organization_default when the project follows the organization, or none).
openai_admin_get_project_hosted_tool_permissions
Free · Read-only
Gets the hosted tool permissions of one project: whether file search, web search, image generation, MCP and code interpreter are each enabled.
openai_admin_get_project_model_permissions
Free · Read-only
Gets the model permissions of one project: the mode (allow_list or deny_list) and the model ids it applies to.
openai_admin_get_project_service_account
Free · Read-only
Gets one service account of one project: name, role (owner, member or none) and when it was created.
openai_admin_get_project_user
Free · Read-only
Gets one user of one project: name, email address, project role (owner or member) and when they were added.
openai_admin_get_user
Free · Read-only
Gets one user of the API organization by id: name, email address, role (owner or reader), when they were added and when one of their API keys was last used.
openai_admin_list_admin_api_keys
Free · Read-only
Lists the organization's Admin API keys, a page at a time: each key's id, name, when it was created, expires and was last used, its owner and OpenAI's redacted_value.
openai_admin_list_external_storage
Free · Read-only
Lists the organization's customer-managed external storage configurations, a page at a time: each one's id, project, provider, geography and status (pending, validated, degraded or unhealthy).
openai_admin_list_group_roles
Free · Read-only
Lists the organization roles assigned to one group, a page at a time.
openai_admin_list_group_users
Free · Read-only
Lists the users in one group of the API organization, a page at a time.
openai_admin_list_groups
Free · Read-only
Lists the groups of the API organization, a page at a time: each group's id, name, when it was created, whether SCIM manages it and its group type (group or tenant_group).
openai_admin_list_invites
Free · Read-only
Lists the invitations sent for the API organization, a page at a time: each invite's id, email address, role (owner or reader), status (accepted, expired or pending), when it was created, expires and was accepted, and the projects it grants.
openai_admin_list_project_api_keys
Free · Read-only
Lists the API keys of one project, a page at a time: each key's id, name, when it was created, expires and was last used, its owner and OpenAI's redacted_value.
openai_admin_list_project_rate_limits
Free · Read-only
Lists the rate limits per model of one project, a page at a time: for each model the maximum requests, tokens, images or audio megabytes per minute and the daily limits that apply to it.
openai_admin_list_project_service_accounts
Free · Read-only
Lists the service accounts of one project, a page at a time: each service account's id, name, role (owner, member or none) and when it was created.
openai_admin_list_project_users
Free · Read-only
Lists the users of one project, a page at a time: each user's id, name, email address, project role (owner or member) and when they were added.
openai_admin_list_projects
Free · Read-only
Lists the projects of the API organization, a page at a time: each project's id, name, status (active or archived), when it was created and archived, its external key id and its data residency.
openai_admin_list_roles
Free · Read-only
Lists the roles configured for the API organization, a page at a time: each role's id, name, description, permissions and resource type, and whether it is a predefined role.
openai_admin_list_user_roles
Free · Read-only
Lists the organization role assignments of one user, a page at a time.
openai_admin_list_users
Free · Read-only
Lists the users of the API organization, a page at a time: each user's id, name, email address, role (owner or reader), when they were added and when one of their API keys was last used.

Usage and costs

ToolWhat it does
openai_admin_get_audio_speeches_usage
Pro · Read-only
Gets the audio speeches usage of the API organization over time, in time buckets: each result carries the number of characters and of model requests.
openai_admin_get_audio_transcriptions_usage
Pro · Read-only
Gets the audio transcriptions usage of the API organization over time, in time buckets: each result carries the number of seconds and of model requests.
openai_admin_get_code_interpreter_sessions_usage
Pro · Read-only
Gets the code interpreter sessions usage of the API organization over time, in time buckets: each result carries the number of sessions.
openai_admin_get_completions_usage
Pro · Read-only
Gets the completions usage of the API organization over time, in time buckets: each result carries the input, output and cached input token counts (with text, audio and image splits) and the number of model requests.
openai_admin_get_costs
Pro · Read-only
Gets the cost of the API organization over time, in daily buckets (the cost report has no other width): each result's amount (a value in the associated currency, for example usd) and, when you group by them, the line item, project, user, API key and API source.
openai_admin_get_embeddings_usage
Pro · Read-only
Gets the embeddings usage of the API organization over time, in time buckets: each result carries the input tokens and the number of model requests.
openai_admin_get_file_search_calls_usage
Pro · Read-only
Gets the file search calls usage of the API organization over time, in time buckets: each result carries the number of requests, per vector store when you group by vector_store_id.
openai_admin_get_images_usage
Pro · Read-only
Gets the images usage of the API organization over time, in time buckets: each result carries the number of images and of model requests, with the source (image.generation, image.edit or image.variation) and the size when you group by them.
openai_admin_get_moderations_usage
Pro · Read-only
Gets the moderations usage of the API organization over time, in time buckets: each result carries the input tokens and the number of model requests.
openai_admin_get_project_spend_limit
Pro · Read-only
Gets one project's hard spend limit: the threshold amount (in cents), currency, interval and the current enforcement state.
openai_admin_get_spend_limit
Pro · Read-only
Gets the organization's hard spend limit: the threshold amount (in cents), currency, interval and the current enforcement state.
openai_admin_get_vector_stores_usage
Pro · Read-only
Gets the vector stores usage of the API organization over time, in time buckets: each result carries the usage in bytes.
openai_admin_get_web_search_calls_usage
Pro · Read-only
Gets the web search calls usage of the API organization over time, in time buckets: each result carries the number of model requests and of web search requests, with the context level (low, medium or high) and the API source when you group by them.
openai_admin_list_project_spend_alerts
Pro · Read-only
Lists the spend alerts of one project, a page at a time: each alert's id, threshold amount (in cents), currency, interval and email notification settings.
openai_admin_list_spend_alerts
Pro · Read-only
Lists the organization's spend alerts, a page at a time: each alert's id, threshold amount (in cents), currency, interval and email notification settings.

Audit logs

ToolWhat it does
openai_admin_list_audit_logs
Pro · Read-only
Lists the audit log of the API organization, a page at a time: each entry's id, type (for example project.created or api_key.created), effective_at (Unix seconds), the project when the action belongs to one, the actor and the details of that event type.