guides/admin-apis.md +16 −1
3import {3import {
4 adminClientExamples,4 adminClientExamples,
5 auditLogExamples,5 auditLogExamples,
6 dataRetentionExamples,
6 inviteUserExamples,7 inviteUserExamples,
8 modelPermissionsExamples,
9 spendAlertExamples,
7} from "./admin-apis-examples";10} from "./admin-apis-examples";
8 11
912Admin APIs let you automate organization management workflows such as user invitations, audit log review, project administration, API key management, and rate limit operations. Use them for back-office automation, security workflows, and operational tooling that should run outside the dashboard.Admin APIs let you automate organization management workflows such as user invitations, audit log review, project administration, API key management, spend alerts, data retention, and rate limit operations. Use them for back-office automation, security workflows, and operational tooling that should run outside the dashboard.
10 13
11For endpoint details, see the [Administration API reference](https://developers.openai.com/api/reference/administration/overview), including [Admin API keys](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys), [Invites](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/invites), [Users](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/users), [Projects](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/projects), and [Audit logs](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs).14For endpoint details, see the [Administration API reference](https://developers.openai.com/api/reference/administration/overview), including [Admin API keys](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys), [Invites](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/invites), [Users](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/users), [Projects](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/projects), and [Audit logs](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs).
12 15
24 27
25Set `OPENAI_ADMIN_KEY`, then initialize the SDK for your language.28Set `OPENAI_ADMIN_KEY`, then initialize the SDK for your language.
26 29
30## Restrict model access for projects
31
32Use project model permissions to set an allowlist or denylist for a project. Set `mode` to `allow_list` to allow only the listed models, or set `mode` to `deny_list` to block the listed models while allowing other available models. Model IDs must be visible to the organization, including visible fine-tuned model snapshots.
33
34## Manage spend limit alerts
35
36Use project spend alerts to notify your team when project spend reaches a threshold. Threshold amounts are specified in cents.
37
38## Manage data retention
39
40Use project data retention controls to override or inherit the organization's retention policy for a project. Set `retention_type` to `organization_default` to inherit the organization setting.
41
27## Invite a user by email42## Invite a user by email
28 43
29Use the Invites endpoint to send an organization invitation to an email address.44Use the Invites endpoint to send an organization invitation to an email address.