OpenAI Spend alerts API

The Spend alerts API from OpenAI — 4 operation(s) for spend alerts.

Operations 10

GET /organization/projects/{project_id}/spend_alerts List project spend alerts #
POST /organization/projects/{project_id}/spend_alerts Create project spend alert #
GET /organization/projects/{project_id}/spend_alerts/{alert_id} Retrieve project spend alert #
POST /organization/projects/{project_id}/spend_alerts/{alert_id} Update project spend alert #
DELETE /organization/projects/{project_id}/spend_alerts/{alert_id} Delete project spend alert #
GET /organization/spend_alerts List organization spend alerts #
POST /organization/spend_alerts Create organization spend alert #
GET /organization/spend_alerts/{alert_id} Retrieve organization spend alert #
POST /organization/spend_alerts/{alert_id} Update organization spend alert #
DELETE /organization/spend_alerts/{alert_id} Delete organization spend alert #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openai:openai-spend-alerts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openai-spend-alerts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Openai Spend alerts API
  version: 2.3.0
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    identifier: MIT
  termsOfService: https://openai.com/policies/terms-of-use
  description: 'Operations tagged Spend alerts across 2 of this provider''s published API definitions: openai-openapi-master-2026-09-23.yml, openai-openapi-master-2026-10-12.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.openai.com/v1
security:
- ApiKeyAuth: []
tags:
- name: Spend alerts
paths:
  /organization/projects/{project_id}/spend_alerts:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: List project spend alerts
      description: Lists project spend alerts.
      operationId: list-project-spend-alerts
      tags:
      - Spend alerts
      parameters:
      - name: project_id
        in: path
        description: The ID of the project to inspect.
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: A limit on the number of spend alerts to return. Defaults to 20.
        required: false
        schema:
          type: integer
          minimum: 0
          maximum: 100
      - name: order
        in: query
        description: Sort order for the returned spend alerts.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: after
        in: query
        description: Cursor for pagination. Provide the ID of the last spend alert from the previous response to fetch the next page.
        required: false
        schema:
          type: string
      - name: before
        in: query
        description: Cursor for pagination. Provide the ID of the first spend alert from the previous response to fetch the previous page.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Project spend alerts listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSpendAlertListResource'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts?limit=20&order=asc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"id\": \"alert_abc123\",\n            \"object\": \"project.spend_alert\",\n            \"threshold_amount\": 100000,\n            \"currency\": \"USD\",\n            \"interval\": \"month\",\n            \"notification_channel\": {\n                \"type\": \"email\",\n                \"recipients\": [\"finance@example.com\"],\n                \"subject_prefix\": \"OpenAI spend alert\"\n            }\n        }\n    ],\n    \"first_id\": \"alert_abc123\",\n    \"last_id\": \"alert_abc123\",\n    \"has_more\": false\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: Create project spend alert
      description: Creates a project spend alert.
      operationId: create-project-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: project_id
        in: path
        description: The ID of the project to update.
        required: true
        schema:
          type: string
      requestBody:
        description: Parameters for the project spend alert you want to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpendAlertBody'
      responses:
        '200':
          description: Project spend alert created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"threshold_amount\": 100000,\n      \"currency\": \"USD\",\n      \"interval\": \"month\",\n      \"notification_channel\": {\n          \"type\": \"email\",\n          \"recipients\": [\"finance@example.com\"],\n          \"subject_prefix\": \"OpenAI spend alert\"\n      }\n  }'\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"project.spend_alert\",\n    \"threshold_amount\": 100000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    servers:
    - url: https://api.openai.com/v1
  /organization/projects/{project_id}/spend_alerts/{alert_id}:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: Retrieve project spend alert
      description: Retrieves a project spend alert.
      operationId: retrieve-project-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: project_id
        in: path
        description: The ID of the project.
        required: true
        schema:
          type: string
      - name: alert_id
        in: path
        description: The ID of the spend alert to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Project spend alert retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"project.spend_alert\",\n    \"threshold_amount\": 150000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: Update project spend alert
      description: Updates a project spend alert.
      operationId: update-project-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: project_id
        in: path
        description: The ID of the project to update.
        required: true
        schema:
          type: string
      - name: alert_id
        in: path
        description: The ID of the spend alert to update.
        required: true
        schema:
          type: string
      requestBody:
        description: Fields to update on the project spend alert.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpendAlertBody'
      responses:
        '200':
          description: Project spend alert updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"threshold_amount\": 150000,\n      \"currency\": \"USD\",\n      \"interval\": \"month\",\n      \"notification_channel\": {\n          \"type\": \"email\",\n          \"recipients\": [\"finance@example.com\"],\n          \"subject_prefix\": \"OpenAI spend alert\"\n      }\n  }'\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"project.spend_alert\",\n    \"threshold_amount\": 150000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    delete:
      security:
      - AdminApiKeyAuth: []
      summary: Delete project spend alert
      description: Deletes a project spend alert.
      operationId: delete-project-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: project_id
        in: path
        description: The ID of the project to update.
        required: true
        schema:
          type: string
      - name: alert_id
        in: path
        description: The ID of the spend alert to delete.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Project spend alert deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSpendAlertDeletedResource'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"project.spend_alert.deleted\",\n    \"deleted\": true\n}\n"
    servers:
    - url: https://api.openai.com/v1
  /organization/spend_alerts:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: List organization spend alerts
      description: Lists organization spend alerts.
      operationId: list-organization-spend-alerts
      tags:
      - Spend alerts
      parameters:
      - name: limit
        in: query
        description: A limit on the number of spend alerts to return. Defaults to 20.
        required: false
        schema:
          type: integer
          minimum: 0
          maximum: 100
      - name: order
        in: query
        description: Sort order for the returned spend alerts.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: after
        in: query
        description: Cursor for pagination. Provide the ID of the last spend alert from the previous response to fetch the next page.
        required: false
        schema:
          type: string
      - name: before
        in: query
        description: Cursor for pagination. Provide the ID of the first spend alert from the previous response to fetch the previous page.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Organization spend alerts listed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSpendAlertListResource'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/spend_alerts?limit=20&order=asc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"id\": \"alert_abc123\",\n            \"object\": \"organization.spend_alert\",\n            \"threshold_amount\": 100000,\n            \"currency\": \"USD\",\n            \"interval\": \"month\",\n            \"notification_channel\": {\n                \"type\": \"email\",\n                \"recipients\": [\"finance@example.com\"],\n                \"subject_prefix\": \"OpenAI spend alert\"\n            }\n        }\n    ],\n    \"first_id\": \"alert_abc123\",\n    \"last_id\": \"alert_abc123\",\n    \"has_more\": false\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: Create organization spend alert
      description: Creates an organization spend alert.
      operationId: create-organization-spend-alert
      tags:
      - Spend alerts
      requestBody:
        description: Parameters for the organization spend alert you want to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpendAlertBody'
      responses:
        '200':
          description: Organization spend alert created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/spend_alerts \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"threshold_amount\": 100000,\n      \"currency\": \"USD\",\n      \"interval\": \"month\",\n      \"notification_channel\": {\n          \"type\": \"email\",\n          \"recipients\": [\"finance@example.com\"],\n          \"subject_prefix\": \"OpenAI spend alert\"\n      }\n  }'\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"organization.spend_alert\",\n    \"threshold_amount\": 100000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    servers:
    - url: https://api.openai.com/v1
  /organization/spend_alerts/{alert_id}:
    get:
      security:
      - AdminApiKeyAuth: []
      summary: Retrieve organization spend alert
      description: Retrieves an organization spend alert.
      operationId: retrieve-organization-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: alert_id
        in: path
        description: The ID of the spend alert to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Organization spend alert retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"organization.spend_alert\",\n    \"threshold_amount\": 150000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    post:
      security:
      - AdminApiKeyAuth: []
      summary: Update organization spend alert
      description: Updates an organization spend alert.
      operationId: update-organization-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: alert_id
        in: path
        description: The ID of the spend alert to update.
        required: true
        schema:
          type: string
      requestBody:
        description: Fields to update on the organization spend alert.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpendAlertBody'
      responses:
        '200':
          description: Organization spend alert updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSpendAlert'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X POST https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"threshold_amount\": 150000,\n      \"currency\": \"USD\",\n      \"interval\": \"month\",\n      \"notification_channel\": {\n          \"type\": \"email\",\n          \"recipients\": [\"finance@example.com\"],\n          \"subject_prefix\": \"OpenAI spend alert\"\n      }\n  }'\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"organization.spend_alert\",\n    \"threshold_amount\": 150000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    delete:
      security:
      - AdminApiKeyAuth: []
      summary: Delete organization spend alert
      description: Deletes an organization spend alert.
      operationId: delete-organization-spend-alert
      tags:
      - Spend alerts
      parameters:
      - name: alert_id
        in: path
        description: The ID of the spend alert to delete.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Organization spend alert deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSpendAlertDeletedResource'
      x-oaiMeta:
        group: administration
        examples:
          request:
            curl: "curl -X DELETE https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"\n"
          response: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"organization.spend_alert.deleted\",\n    \"deleted\": true\n}\n"
    servers:
    - url: https://api.openai.com/v1
components:
  schemas:
    OrganizationSpendAlert:
      type: object
      description: Represents a spend alert configured at the organization level.
      properties:
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints.
        object:
          type: string
          enum:
          - organization.spend_alert
          description: The object type, which is always `organization.spend_alert`.
          x-stainless-const: true
        threshold_amount:
          type: integer
          description: The alert threshold amount, in cents.
        currency:
          type: string
          enum:
          - USD
          description: The currency for the threshold amount.
        interval:
          type: string
          enum:
          - month
          description: The time interval for evaluating spend against the threshold.
        notification_channel:
          $ref: '#/components/schemas/SpendAlertNotificationChannel'
      required:
      - id
      - object
      - threshold_amount
      - currency
      - interval
      - notification_channel
      x-oaiMeta:
        name: The organization spend alert object
        example: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"organization.spend_alert\",\n    \"threshold_amount\": 100000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    ProjectSpendAlertDeletedResource:
      type: object
      description: Confirmation payload returned after deleting a project spend alert.
      properties:
        id:
          type: string
          description: The deleted spend alert ID.
        object:
          type: string
          enum:
          - project.spend_alert.deleted
          description: Always `project.spend_alert.deleted`.
          x-stainless-const: true
        deleted:
          type: boolean
          description: Whether the spend alert was deleted.
      required:
      - id
      - object
      - deleted
    OrganizationSpendAlertListResource:
      type: object
      description: Paginated list of organization spend alerts.
      properties:
        object:
          type: string
          enum:
          - list
          description: Always `list`.
          x-stainless-const: true
        data:
          type: array
          description: Spend alerts returned in the current page.
          items:
            $ref: '#/components/schemas/OrganizationSpendAlert'
        first_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The ID of the first spend alert in this page.
        last_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The ID of the last spend alert in this page.
        has_more:
          type: boolean
          description: Whether more spend alerts are available when paginating.
      required:
      - object
      - data
      - first_id
      - last_id
      - has_more
    SpendAlertNotificationChannel:
      type: object
      description: Email notification settings for a spend alert.
      properties:
        type:
          type: string
          enum:
          - email
          description: The notification channel type. Currently only `email` is supported.
          x-stainless-const: true
        recipients:
          type: array
          description: Email addresses that receive the spend alert notification.
          items:
            type: string
        subject_prefix:
          anyOf:
          - type: string
          - type: 'null'
          description: Optional subject prefix for alert emails.
      required:
      - type
      - recipients
    CreateSpendAlertBody:
      type: object
      description: Parameters for creating or updating a spend alert.
      properties:
        threshold_amount:
          type: integer
          minimum: 0
          description: The alert threshold amount, in cents.
        currency:
          type: string
          enum:
          - USD
          description: The currency for the threshold amount.
        interval:
          type: string
          enum:
          - month
          description: The time interval for evaluating spend against the threshold.
        notification_channel:
          $ref: '#/components/schemas/SpendAlertNotificationChannel'
      required:
      - threshold_amount
      - currency
      - interval
      - notification_channel
    ProjectSpendAlertListResource:
      type: object
      description: Paginated list of project spend alerts.
      properties:
        object:
          type: string
          enum:
          - list
          description: Always `list`.
          x-stainless-const: true
        data:
          type: array
          description: Spend alerts returned in the current page.
          items:
            $ref: '#/components/schemas/ProjectSpendAlert'
        first_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The ID of the first spend alert in this page.
        last_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The ID of the last spend alert in this page.
        has_more:
          type: boolean
          description: Whether more spend alerts are available when paginating.
      required:
      - object
      - data
      - first_id
      - last_id
      - has_more
    OrganizationSpendAlertDeletedResource:
      type: object
      description: Confirmation payload returned after deleting an organization spend alert.
      properties:
        id:
          type: string
          description: The deleted spend alert ID.
        object:
          type: string
          enum:
          - organization.spend_alert.deleted
          description: Always `organization.spend_alert.deleted`.
          x-stainless-const: true
        deleted:
          type: boolean
          description: Whether the spend alert was deleted.
      required:
      - id
      - object
      - deleted
    ProjectSpendAlert:
      type: object
      description: Represents a spend alert configured at the project level.
      properties:
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints.
        object:
          type: string
          enum:
          - project.spend_alert
          description: The object type, which is always `project.spend_alert`.
          x-stainless-const: true
        threshold_amount:
          type: integer
          description: The alert threshold amount, in cents.
        currency:
          type: string
          enum:
          - USD
          description: The currency for the threshold amount.
        interval:
          type: string
          enum:
          - month
          description: The time interval for evaluating spend against the threshold.
        notification_channel:
          $ref: '#/components/schemas/SpendAlertNotificationChannel'
      required:
      - id
      - object
      - threshold_amount
      - currency
      - interval
      - notification_channel
      x-oaiMeta:
        name: The project spend alert object
        example: "{\n    \"id\": \"alert_abc123\",\n    \"object\": \"project.spend_alert\",\n    \"threshold_amount\": 100000,\n    \"currency\": \"USD\",\n    \"interval\": \"month\",\n    \"notification_channel\": {\n        \"type\": \"email\",\n        \"recipients\": [\"finance@example.com\"],\n        \"subject_prefix\": \"OpenAI spend alert\"\n    }\n}\n"
    _MisalignmentErrorType:
      anyOf:
      - type: string
      - type: string
        enum:
        - potentially_unintended_data_transfer
        - potentially_unintended_data_access
        - potentially_unintended_destructive_activity
        - other
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
      - error
    Error:
      type: object
      properties:
        code:
          anyOf:
          - type: string
          - type: 'null'
        message:
          type: string
        param:
          anyOf:
          - type: string
          - type: 'null'
        type:
          type: string
        misalignment:
          $ref: '#/components/schemas/MisalignmentErrorDetailsResource'
      required:
      - type
      - message
      - param
      - code
    MisalignmentErrorDetailsResource:
      properties:
        review_target:
          anyOf:
          - not:
              pattern: '[^A-Za-z0-9._~:-]'
            type: string
            maxLength: 96
            minLength: 1
            pattern: ^[A-Za-z0-9._~:-]+$
            description: An opaque target for explicitly continuing this review, or null when unavailable.
          - type: 'null'
        error_type:
          $ref: '#/components/schemas/_MisalignmentErrorType'
          description: An optional classification; clients must accept additional values.
        detailed_explanation:
          type: string
          description: The public explanation for this block.
        steer:
          $ref: '#/components/schemas/_MisalignmentSteer'
          description: An optional public continuation instruction.
      type: object
      required: []
    PermissionErrorResponse:
      type: object
      properties:
        error:
          description: Details about the permission error.
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: string
            description: An explanation of the missing API permissions.
      required:
      - error
    _MisalignmentSteer:
      properties:
        message:
          type: string
          description: The public continuation instruction.
      type: object
      required:
      - message
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
    AdminApiKeyAuth:
      type: http
      scheme: bearer
x-refined-from:
- openai-openapi-master-2026-09-23.yml
- openai-openapi-master-2026-10-12.yml
x-oaiMeta:
  groups:
  - id: audio
    title: Audio
    description: 'Learn how to turn audio into text or text into audio.


      Related guide: [Speech to text](/docs/guides/speech-to-text)

      '
    sections:
    - type: endpoint
      key: createSpeech
      path: createSpeech
    - type: endpoint
      key: createTranscription
      path: createTranscription
    - type: endpoint
      key: createTranslation
      path: createTranslation
  - id: chat
    title: Chat
    description: 'Given a list of messages comprising a conversation, the model will return a response.


      Related guide: [Chat Completions](/docs/guides/text-generation)

      '
    sections:
    - type: endpoint
      key: createChatCompletion
      path: create
    - type: object
      key: CreateChatCompletionResponse
      path: object
    - type: object
      key: CreateChatCompletionStreamResponse
      path: streaming
  - id: embeddings
    title: Embeddings
    description: 'Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.


      Related guide: [Embeddings](/docs/guides/embeddings)

      '
    sections:
    - type: endpoint
      key: createEmbedding
      path: create
    - type: object
      key: Embedding
      path: object
  - id: fine-tuning
    title: Fine-tuning
    description: 'Manage fine-tuning jobs to tailor a model to your specific training data.


      Related guide: [Fine-tune models](/docs/guides/fine-tuning)

      '
    sections:
    - type: endpoint
      key: createFineTuningJob
      path: create
    - type: endpoint
      key: listPaginatedFineTuningJobs
      path: list
    - type: endpoint
      key: listFineTuningEvents
      path: list-events
    - type: endpoint
      key: retrieveFineTuningJob
      path: retrieve
    - type: endpoint
      key: cancelFineTuningJob
      path: cancel
    - type: object
      key: FineTuningJob
      path: object
    - type: object
      key: FineTuningJobEvent
      path: event-object
  - id: files
    title: Files
    description: 'Files are used to upload documents that can be used with features like [Assistants](/docs/api-reference/assistants) and [Fine-tuning](/docs/api-reference/fine-tuning).

      '
    sections:
    - type: endpoint
      key: createFile
      path: create
    - type: endpoint
      key: listFiles
      path: list
    - type: endpoint
      key: retrieveFile
      path: retrieve
    - type: endpoint
      key: deleteFile
      path: delete
    - type: endpoint
      key: downloadFile
      path: retrieve-contents
    - type: object
      key: OpenAIFile
      path: object
  - id: images
    title: Images
    description: 'Given a prompt and/or an input image, the model will generate a new image.


      Related guide: [Image generation](/docs/guides/images)

      '
    sections:
    - type: endpoint
      key: createImage
      path: create
    - type: endpoint
      key: createImageEdit
      path: createEdit
    - type: endpoint
      key: createImageVariation
      path: createVariation
    - type: object
      key: Image
      path: object
  - id: models
    title: Models
    description: 'List and describe the various models available in the API. You can refer to the [Models](/docs/models) documentation to understand what models are available and the differences between them.

      '
    sections:
    - type: endpoint
      key: listModels
      path: list
    - type: endpoint
      key: retrieveModel
      path: retrieve
    - type: endpoint
      key: deleteModel
      path: delete
    - type: object
      key: Model
      path: object
  - id: moderations
    title: Moderations
    description: 'Given a input text, outputs if the model classifies it as violating OpenAI''s content policy.


      Related guide: [Moderations](/docs/guides/moderation)

      '
    sections:
    - type: endpoint
      key: createModeration
      path: create
    - type: object
      key: CreateModerationResponse
      path: object


# --- truncated at 32 KB (35 KB total) ---
# Full source: https://artifacts.apis.io/openai/openapi/openai-spend-alerts-api-openapi.yml