OpenAI OpenAI API
The OpenAI API API from OpenAI — 0 operation(s) for openai api.
The OpenAI API API from OpenAI — 0 operation(s) for openai api.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/openai-openai-api-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: OpenAI API
description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
version: 2.3.0
termsOfService: https://openai.com/policies/terms-of-use
contact:
name: OpenAI Support
url: https://help.openai.com/
license:
name: MIT
url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
- url: https://api.openai.com/v1
security:
- ApiKeyAuth: []
tags:
- name: OpenAI API
paths: {}
webhooks:
batch_cancelled:
post:
description: 'Sent when a batch has been cancelled.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookBatchCancelled'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
batch_completed:
post:
description: 'Sent when a batch has completed processing.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookBatchCompleted'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
batch_expired:
post:
description: 'Sent when a batch has expired before completion.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookBatchExpired'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
batch_failed:
post:
description: 'Sent when a batch has failed.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookBatchFailed'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
eval_run_canceled:
post:
description: 'Sent when an eval run has been canceled.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEvalRunCanceled'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
eval_run_failed:
post:
description: 'Sent when an eval run has failed.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEvalRunFailed'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
eval_run_succeeded:
post:
description: 'Sent when an eval run has succeeded.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEvalRunSucceeded'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
fine_tuning_job_cancelled:
post:
description: 'Sent when a fine-tuning job has been cancelled.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookFineTuningJobCancelled'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
fine_tuning_job_failed:
post:
description: 'Sent when a fine-tuning job has failed.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookFineTuningJobFailed'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
fine_tuning_job_succeeded:
post:
description: 'Sent when a fine-tuning job has succeeded.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookFineTuningJobSucceeded'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
realtime_call_incoming:
post:
description: 'Sent when Realtime API Receives a incoming SIP call.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookRealtimeCallIncoming'
responses:
'200':
description: 'Return a 200 status code to acknowledge receipt of the event. Non-200
status codes will be retried.
'
tags:
- OpenAI API
response_cancelled:
post:
description: 'Sent when a background response has been cancelled.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponseCancelled'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
response_completed:
post:
description: 'Sent when a background response has completed successfully.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponseCompleted'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried. \n"
tags:
- OpenAI API
response_failed:
post:
description: 'Sent when a background response has failed.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponseFailed'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
response_incomplete:
post:
description: 'Sent when a background response is incomplete.
'
requestBody:
description: The event payload sent by the API.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponseIncomplete'
responses:
'200':
description: "Return a 200 status code to acknowledge receipt of the event. Non-200 \nstatus codes will be retried.\n"
tags:
- OpenAI API
components:
schemas:
WebhookRealtimeCallIncoming:
type: object
title: realtime.call.incoming
description: 'Sent when Realtime API Receives a incoming SIP call.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the model response was completed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- call_id
- sip_headers
properties:
call_id:
type: string
description: 'The unique ID of this call.
'
sip_headers:
type: array
description: 'Headers from the SIP Invite.
'
items:
type: object
description: 'A header from the SIP Invite.
'
required:
- name
- value
properties:
name:
type: string
description: 'Name of the SIP Header.
'
value:
type: string
description: 'Value of the SIP Header.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `realtime.call.incoming`.
'
enum:
- realtime.call.incoming
x-stainless-const: true
x-oaiMeta:
name: realtime.call.incoming
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"realtime.call.incoming\",\n \"created_at\": 1719168000,\n \"data\": {\n \"call_id\": \"rtc_479a275623b54bdb9b6fbae2f7cbd408\",\n \"sip_headers\": [\n {\"name\": \"Max-Forwards\", \"value\": \"63\"},\n {\"name\": \"CSeq\", \"value\": \"851287 INVITE\"},\n {\"name\": \"Content-Type\", \"value\": \"application/sdp\"},\n ]\n }\n}\n"
WebhookFineTuningJobFailed:
type: object
title: fine_tuning.job.failed
description: 'Sent when a fine-tuning job has failed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the fine-tuning job failed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the fine-tuning job.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `fine_tuning.job.failed`.
'
enum:
- fine_tuning.job.failed
x-stainless-const: true
x-oaiMeta:
name: fine_tuning.job.failed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"fine_tuning.job.failed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"ftjob_abc123\"\n }\n} \n"
WebhookBatchExpired:
type: object
title: batch.expired
description: 'Sent when a batch API request has expired.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the batch API request expired.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the batch API request.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `batch.expired`.
'
enum:
- batch.expired
x-stainless-const: true
x-oaiMeta:
name: batch.expired
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"batch.expired\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"batch_abc123\"\n }\n}\n"
WebhookEvalRunFailed:
type: object
title: eval.run.failed
description: 'Sent when an eval run has failed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the eval run failed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the eval run.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `eval.run.failed`.
'
enum:
- eval.run.failed
x-stainless-const: true
x-oaiMeta:
name: eval.run.failed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"eval.run.failed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"evalrun_abc123\"\n }\n} \n"
WebhookResponseIncomplete:
type: object
title: response.incomplete
description: 'Sent when a background response has been interrupted.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the model response was interrupted.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the model response.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `response.incomplete`.
'
enum:
- response.incomplete
x-stainless-const: true
x-oaiMeta:
name: response.incomplete
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"response.incomplete\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"resp_abc123\"\n }\n}\n"
WebhookEvalRunCanceled:
type: object
title: eval.run.canceled
description: 'Sent when an eval run has been canceled.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the eval run was canceled.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the eval run.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `eval.run.canceled`.
'
enum:
- eval.run.canceled
x-stainless-const: true
x-oaiMeta:
name: eval.run.canceled
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"eval.run.canceled\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"evalrun_abc123\"\n }\n} \n"
WebhookBatchCompleted:
type: object
title: batch.completed
description: 'Sent when a batch API request has been completed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the batch API request was completed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the batch API request.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `batch.completed`.
'
enum:
- batch.completed
x-stainless-const: true
x-oaiMeta:
name: batch.completed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"batch.completed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"batch_abc123\"\n }\n}\n"
WebhookBatchCancelled:
type: object
title: batch.cancelled
description: 'Sent when a batch API request has been cancelled.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the batch API request was cancelled.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the batch API request.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `batch.cancelled`.
'
enum:
- batch.cancelled
x-stainless-const: true
x-oaiMeta:
name: batch.cancelled
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"batch.cancelled\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"batch_abc123\"\n }\n}\n"
WebhookResponseFailed:
type: object
title: response.failed
description: 'Sent when a background response has failed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the model response failed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the model response.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `response.failed`.
'
enum:
- response.failed
x-stainless-const: true
x-oaiMeta:
name: response.failed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"response.failed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"resp_abc123\"\n }\n}\n"
WebhookResponseCancelled:
type: object
title: response.cancelled
description: 'Sent when a background response has been cancelled.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the model response was cancelled.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the model response.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `response.cancelled`.
'
enum:
- response.cancelled
x-stainless-const: true
x-oaiMeta:
name: response.cancelled
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"response.cancelled\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"resp_abc123\"\n }\n}\n"
WebhookEvalRunSucceeded:
type: object
title: eval.run.succeeded
description: 'Sent when an eval run has succeeded.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the eval run succeeded.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the eval run.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `eval.run.succeeded`.
'
enum:
- eval.run.succeeded
x-stainless-const: true
x-oaiMeta:
name: eval.run.succeeded
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"eval.run.succeeded\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"evalrun_abc123\"\n }\n} \n"
WebhookResponseCompleted:
type: object
title: response.completed
description: 'Sent when a background response has been completed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the model response was completed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the model response.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `response.completed`.
'
enum:
- response.completed
x-stainless-const: true
x-oaiMeta:
name: response.completed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"response.completed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"resp_abc123\"\n }\n}\n"
WebhookBatchFailed:
type: object
title: batch.failed
description: 'Sent when a batch API request has failed.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the batch API request failed.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the batch API request.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `batch.failed`.
'
enum:
- batch.failed
x-stainless-const: true
x-oaiMeta:
name: batch.failed
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"batch.failed\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"batch_abc123\"\n }\n}\n"
WebhookFineTuningJobCancelled:
type: object
title: fine_tuning.job.cancelled
description: 'Sent when a fine-tuning job has been cancelled.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the fine-tuning job was cancelled.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the fine-tuning job.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `fine_tuning.job.cancelled`.
'
enum:
- fine_tuning.job.cancelled
x-stainless-const: true
x-oaiMeta:
name: fine_tuning.job.cancelled
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"fine_tuning.job.cancelled\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"ftjob_abc123\"\n }\n} \n"
WebhookFineTuningJobSucceeded:
type: object
title: fine_tuning.job.succeeded
description: 'Sent when a fine-tuning job has succeeded.
'
required:
- created_at
- id
- data
- type
properties:
created_at:
type: integer
format: unixtime
description: 'The Unix timestamp (in seconds) of when the fine-tuning job succeeded.
'
id:
type: string
description: 'The unique ID of the event.
'
data:
type: object
description: 'Event data payload.
'
required:
- id
properties:
id:
type: string
description: 'The unique ID of the fine-tuning job.
'
object:
type: string
description: 'The object of the event. Always `event`.
'
enum:
- event
x-stainless-const: true
type:
type: string
description: 'The type of the event. Always `fine_tuning.job.succeeded`.
'
enum:
- fine_tuning.job.succeeded
x-stainless-const: true
x-oaiMeta:
name: fine_tuning.job.succeeded
group: webhook-events
example: "{\n \"id\": \"evt_abc123\",\n \"type\": \"fine_tuning.job.succeeded\",\n \"created_at\": 1719168000,\n \"data\": {\n \"id\": \"ftjob_abc123\"\n }\n} \n"
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
AdminApiKeyAuth:
type: http
scheme: bearer
x-oaiMeta:
navigationGroups:
- id: responses
title: Responses API
- id: webhooks
title: Webhooks
- id: endpoints
title: Platform APIs
- id: vector_stores
title: Vector stores
- id: chatkit
title: ChatKit
beta: true
- id: containers
title: Containers
- id: realtime
title: Realtime
- id: chat
title: Chat Completions
- id: assistants
title: Assistants
deprecated: true
- id: administration
title: Administration
- id: legacy
title: Legacy
groups:
- id: responses-streaming
title: Streaming events
description: 'When you [create a Response](/docs/api-reference/responses/create) with
`stream` set to `true`, the server will emit server-sent events to the
client as the Response is generated. This section contains the events that
are emitted by the server.
[Learn more about streaming responses](/docs/guides/streaming-responses?api-mode=responses).
'
navigationGroup: responses
sections:
- type: object
key: ResponseCreatedEvent
path: <auto>
- type: object
key: ResponseInProgressEvent
path: <auto>
- type: object
key: ResponseCompletedEvent
path: <auto>
- type: object
key: ResponseFailedEvent
path: <auto>
- type: object
key: ResponseIncompleteEvent
path: <auto>
- type: object
key: ResponseOutputItemAddedEvent
path: <auto>
- type: object
key: ResponseOutputItemDoneEvent
path: <auto>
- type: object
key: ResponseContentPartAddedEvent
path: <auto>
- type: object
key: ResponseContentPartDoneEvent
path: <auto>
- type: object
key:
# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openai/refs/heads/main/openapi/openai-openai-api-api-openapi.yml