Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: OpenAI Uploads 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: Uploads
description: Use Uploads to upload large files in multiple parts.
paths:
/uploads:
post:
operationId: createUpload
tags:
- Uploads
summary: "Creates an intermediate [Upload](/docs/api-reference/uploads/object) object\nthat you can add [Parts](/docs/api-reference/uploads/part-object) to.\nCurrently, an Upload can accept at most 8 GB in total and expires after an\nhour after you create it.\n\nOnce you complete the Upload, we will create a\n[File](/docs/api-reference/files/object) object that contains all the parts\nyou uploaded. This File is usable in the rest of our platform as a regular\nFile object.\n\nFor certain `purpose` values, the correct `mime_type` must be specified. \nPlease refer to documentation for the \n[supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files).\n\nFor guidance on the proper filename extensions for each purpose, please\nfollow the documentation on [creating a\nFile](/docs/api-reference/files/create).\n\nReturns the Upload object with status `pending`.\n"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUploadRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Upload'
x-oaiMeta:
name: Create upload
group: uploads
examples:
request:
curl: "curl https://api.openai.com/v1/uploads \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"purpose\": \"fine-tune\",\n \"filename\": \"training_examples.jsonl\",\n \"bytes\": 2147483648,\n \"mime_type\": \"text/jsonl\",\n \"expires_after\": {\n \"anchor\": \"created_at\",\n \"seconds\": 3600\n }\n }'\n"
node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst upload = await client.uploads.create({\n bytes: 0,\n filename: 'filename',\n mime_type: 'mime_type',\n purpose: 'assistants',\n});\n\nconsole.log(upload.id);"
python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nupload = client.uploads.create(\n bytes=0,\n filename=\"filename\",\n mime_type=\"mime_type\",\n purpose=\"assistants\",\n)\nprint(upload.id)"
go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tupload, err := client.Uploads.New(context.TODO(), openai.UploadNewParams{\n\t\tBytes: 0,\n\t\tFilename: \"filename\",\n\t\tMimeType: \"mime_type\",\n\t\tPurpose: openai.FilePurposeAssistants,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", upload.ID)\n}\n"
java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FilePurpose;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UploadCreateParams params = UploadCreateParams.builder()\n .bytes(0L)\n .filename(\"filename\")\n .mimeType(\"mime_type\")\n .purpose(FilePurpose.ASSISTANTS)\n .build();\n Upload upload = client.uploads().create(params);\n }\n}"
ruby: 'require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
upload = openai.uploads.create(bytes: 0, filename: "filename", mime_type: "mime_type", purpose: :assistants)
puts(upload)'
response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"pending\",\n \"expires_at\": 1719127296\n}\n"
/uploads/{upload_id}/cancel:
post:
operationId: cancelUpload
tags:
- Uploads
summary: 'Cancels the Upload. No Parts may be added after an Upload is cancelled.
Returns the Upload object with status `cancelled`.
'
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: 'The ID of the Upload.
'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Upload'
x-oaiMeta:
name: Cancel upload
group: uploads
examples:
request:
curl: 'curl https://api.openai.com/v1/uploads/upload_abc123/cancel
'
node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst upload = await client.uploads.cancel('upload_abc123');\n\nconsole.log(upload.id);"
python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nupload = client.uploads.cancel(\n \"upload_abc123\",\n)\nprint(upload.id)"
go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tupload, err := client.Uploads.Cancel(context.TODO(), \"upload_abc123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", upload.ID)\n}\n"
java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Upload upload = client.uploads().cancel(\"upload_abc123\");\n }\n}"
ruby: 'require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
upload = openai.uploads.cancel("upload_abc123")
puts(upload)'
response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"cancelled\",\n \"expires_at\": 1719127296\n}\n"
/uploads/{upload_id}/complete:
post:
operationId: completeUpload
tags:
- Uploads
summary: "Completes the [Upload](/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.\nReturns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.\n"
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: 'The ID of the Upload.
'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CompleteUploadRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Upload'
x-oaiMeta:
name: Complete upload
group: uploads
examples:
request:
curl: "curl https://api.openai.com/v1/uploads/upload_abc123/complete\n -d '{\n \"part_ids\": [\"part_def456\", \"part_ghi789\"]\n }'\n"
node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst upload = await client.uploads.complete('upload_abc123', { part_ids: ['string'] });\n\nconsole.log(upload.id);"
python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nupload = client.uploads.complete(\n upload_id=\"upload_abc123\",\n part_ids=[\"string\"],\n)\nprint(upload.id)"
go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tupload, err := client.Uploads.Complete(\n\t\tcontext.TODO(),\n\t\t\"upload_abc123\",\n\t\topenai.UploadCompleteParams{\n\t\t\tPartIDs: []string{\"string\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", upload.ID)\n}\n"
java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCompleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UploadCompleteParams params = UploadCompleteParams.builder()\n .uploadId(\"upload_abc123\")\n .addPartId(\"string\")\n .build();\n Upload upload = client.uploads().complete(params);\n }\n}"
ruby: 'require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
upload = openai.uploads.complete("upload_abc123", part_ids: ["string"])
puts(upload)'
response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"completed\",\n \"expires_at\": 1719127296,\n \"file\": {\n \"id\": \"file-xyz321\",\n \"object\": \"file\",\n \"bytes\": 2147483648,\n \"created_at\": 1719186911,\n \"expires_at\": 1719127296,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n }\n}\n"
/uploads/{upload_id}/parts:
post:
operationId: addUploadPart
tags:
- Uploads
summary: "Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).\n"
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: 'The ID of the Upload.
'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/AddUploadPartRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UploadPart'
x-oaiMeta:
name: Add upload part
group: uploads
examples:
request:
curl: "curl https://api.openai.com/v1/uploads/upload_abc123/parts\n -F data=\"aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz...\"\n"
node.js: "import fs from 'fs';\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst uploadPart = await client.uploads.parts.create('upload_abc123', {\n data: fs.createReadStream('path/to/file'),\n});\n\nconsole.log(uploadPart.id);"
python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nupload_part = client.uploads.parts.create(\n upload_id=\"upload_abc123\",\n data=b\"Example data\",\n)\nprint(upload_part.id)"
go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tuploadPart, err := client.Uploads.Parts.New(\n\t\tcontext.TODO(),\n\t\t\"upload_abc123\",\n\t\topenai.UploadPartNewParams{\n\t\t\tData: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", uploadPart.ID)\n}\n"
java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.parts.PartCreateParams;\nimport com.openai.models.uploads.parts.UploadPart;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PartCreateParams params = PartCreateParams.builder()\n .uploadId(\"upload_abc123\")\n .data(new ByteArrayInputStream(\"Example data\".getBytes()))\n .build();\n UploadPart uploadPart = client.uploads().parts().create(params);\n }\n}"
ruby: 'require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
upload_part = openai.uploads.parts.create("upload_abc123", data: StringIO.new("Example data"))
puts(upload_part)'
response: "{\n \"id\": \"part_def456\",\n \"object\": \"upload.part\",\n \"created_at\": 1719185911,\n \"upload_id\": \"upload_abc123\"\n}\n"
components:
schemas:
CompleteUploadRequest:
type: object
additionalProperties: false
properties:
part_ids:
type: array
description: 'The ordered list of Part IDs.
'
items:
type: string
md5:
description: 'The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.
'
type: string
required:
- part_ids
AddUploadPartRequest:
type: object
additionalProperties: false
properties:
data:
description: 'The chunk of bytes for this Part.
'
type: string
format: binary
required:
- data
OpenAIFile:
title: OpenAIFile
description: The `File` object represents a document that has been uploaded to OpenAI.
properties:
id:
type: string
description: The file identifier, which can be referenced in the API endpoints.
bytes:
type: integer
description: The size of the file, in bytes.
created_at:
type: integer
format: unixtime
description: The Unix timestamp (in seconds) for when the file was created.
expires_at:
type: integer
format: unixtime
description: The Unix timestamp (in seconds) for when the file will expire.
filename:
type: string
description: The name of the file.
object:
type: string
description: The object type, which is always `file`.
enum:
- file
x-stainless-const: true
purpose:
type: string
description: The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
enum:
- assistants
- assistants_output
- batch
- batch_output
- fine-tune
- fine-tune-results
- vision
- user_data
status:
type: string
deprecated: true
description: Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
enum:
- uploaded
- processed
- error
status_details:
type: string
deprecated: true
description: Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.
required:
- id
- object
- bytes
- created_at
- filename
- purpose
- status
x-oaiMeta:
name: The file object
example: "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1680202602,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n}\n"
UploadPart:
type: object
title: UploadPart
description: 'The upload Part represents a chunk of bytes we can add to an Upload object.
'
properties:
id:
type: string
description: The upload Part unique identifier, which can be referenced in API endpoints.
created_at:
type: integer
format: unixtime
description: The Unix timestamp (in seconds) for when the Part was created.
upload_id:
type: string
description: The ID of the Upload object that this Part was added to.
object:
type: string
description: The object type, which is always `upload.part`.
enum:
- upload.part
x-stainless-const: true
required:
- created_at
- id
- object
- upload_id
x-oaiMeta:
name: The upload part object
example: "{\n \"id\": \"part_def456\",\n \"object\": \"upload.part\",\n \"created_at\": 1719186911,\n \"upload_id\": \"upload_abc123\"\n}\n"
CreateUploadRequest:
type: object
additionalProperties: false
properties:
filename:
description: 'The name of the file to upload.
'
type: string
purpose:
description: 'The intended purpose of the uploaded file.
See the [documentation on File
purposes](/docs/api-reference/files/create#files-create-purpose).
'
type: string
enum:
- assistants
- batch
- fine-tune
- vision
bytes:
description: 'The number of bytes in the file you are uploading.
'
type: integer
mime_type:
description: 'The MIME type of the file.
This must fall within the supported MIME types for your file purpose. See
the supported MIME types for assistants and vision.
'
type: string
expires_after:
$ref: '#/components/schemas/FileExpirationAfter'
required:
- filename
- purpose
- bytes
- mime_type
FileExpirationAfter:
type: object
title: File expiration policy
description: The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.
properties:
anchor:
description: 'Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.'
type: string
enum:
- created_at
x-stainless-const: true
seconds:
description: The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).
type: integer
format: int64
minimum: 3600
maximum: 2592000
required:
- anchor
- seconds
Upload:
type: object
title: Upload
description: 'The Upload object can accept byte chunks in the form of Parts.
'
properties:
id:
type: string
description: The Upload unique identifier, which can be referenced in API endpoints.
created_at:
type: integer
format: unixtime
description: The Unix timestamp (in seconds) for when the Upload was created.
filename:
type: string
description: The name of the file to be uploaded.
bytes:
type: integer
description: The intended number of bytes to be uploaded.
purpose:
type: string
description: The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values.
status:
type: string
description: The status of the Upload.
enum:
- pending
- completed
- cancelled
- expired
expires_at:
type: integer
format: unixtime
description: The Unix timestamp (in seconds) for when the Upload will expire.
object:
type: string
description: The object type, which is always "upload".
enum:
- upload
x-stainless-const: true
file:
allOf:
- $ref: '#/components/schemas/OpenAIFile'
- nullable: true
description: The ready File object after the Upload is completed.
required:
- bytes
- created_at
- expires_at
- filename
- id
- purpose
- status
x-oaiMeta:
name: The upload object
example: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"completed\",\n \"expires_at\": 1719127296,\n \"file\": {\n \"id\": \"file-xyz321\",\n \"object\": \"file\",\n \"bytes\": 2147483648,\n \"created_at\": 1719186911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\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: ResponseTextDeltaEvent
path: response/output_text/delta
- type: object
key: ResponseTextDoneEvent
path: response/output_text/done
- type: object
key: ResponseRefusalDeltaEvent
path: <auto>
- type: object
key: ResponseRefusalDoneEvent
path: <auto>
- type: object
key: ResponseFunctionCallArgumentsDeltaEvent
path: <auto>
- type: object
key: ResponseFunctionCallArgumentsDoneEvent
path: <auto>
- type: object
key: ResponseFileSearchCallInProgressEvent
path: <auto>
- type: object
key: ResponseFileSearchCallSearchingEvent
path: <auto>
- type: object
key: ResponseFileSearchCallCompletedEvent
path: <auto>
- type: object
key: ResponseWebSearchCallInProgressEvent
path: <auto>
- type: object
key: ResponseWebSearchCallSearchingEvent
path: <auto>
- type: object
key: ResponseWebSearchCallCompletedEvent
path: <auto>
- type: object
key: ResponseReasoningSummaryPartAddedEvent
path: <auto>
- type: object
key: ResponseReasoningSummaryPartDoneEvent
path: <auto>
- type: object
key: ResponseReasoningSummaryTextDeltaEvent
path: <auto>
- type: object
key: ResponseReasoningSummaryTextDoneEvent
path: <auto>
- type: object
key: ResponseReasoningTextDeltaEvent
path: <auto>
- type: object
key: ResponseReasoningTextDoneEvent
path: <auto>
- type: object
key: ResponseImageGenCallCompletedEvent
path: <auto>
- type: object
key: ResponseImageGenCallGeneratingEvent
path: <auto>
- type: object
key: ResponseImageGenCallInProgressEvent
path: <auto>
- type: object
key: ResponseImageGenCallPartialImageEvent
path: <auto>
- type: object
key: ResponseMCPCallArgumentsDeltaEvent
path: <auto>
- type: object
key: ResponseMCPCallArgumentsDoneEvent
path: <auto>
- type: object
key: ResponseMCPCallCompletedEvent
path: <auto>
- type: object
key: ResponseMCPCallFailedEvent
path: <auto>
- type: object
key: ResponseMCPCallInProgressEvent
path: <auto>
- type: object
key: ResponseMCPListToolsCompletedEvent
path: <auto>
- type: object
key: ResponseMCPListToolsFailedEvent
path: <auto>
- type: object
key: ResponseMCPListToolsInProgressEvent
path: <auto>
- type: object
key: ResponseCodeInterpreterCallInProgressEvent
path: <auto>
- type: object
key: ResponseCodeInterpreterCallInterpretingEvent
path: <auto>
- type: object
key: ResponseCodeInterpreterCallCompletedEvent
path: <auto>
- type: object
key: ResponseCodeInterpreterCallCodeDeltaEvent
path: <auto>
- type: object
key: ResponseCodeInterpreterCallCodeDoneEvent
path: <auto>
- type: object
key: ResponseOutputTextAnnotationAddedEvent
path: <auto>
- type: object
key: ResponseQueuedEvent
path: <auto>
- type: object
key: ResponseCustomToolCallInputDeltaEvent
path: <auto>
- type: object
key: ResponseCustomToolCallInputDoneEvent
path: <auto>
- type: object
key: ResponseErrorEvent
path: <auto>
- id: webhook-events
title: Webhook Events
description: 'Webhooks are HTTP requests sent by OpenAI to a URL you specify when certain
events happen during the course of API usage.
[Learn more about webhooks](/docs/guides/webhooks).
'
navigationGroup: webhooks
sections:
- type: object
key: WebhookResponseCompleted
path: <auto>
- type: object
key: WebhookResponseCancelled
path: <auto>
- type: object
key: WebhookResponseFailed
path: <auto>
- type: object
key: WebhookResponseIncomplete
path: <auto>
- type: object
key: WebhookBatchCompleted
path: <auto>
- type: object
key: WebhookBatchCancelled
path: <auto>
- type: object
key: WebhookBatchExpired
path: <auto>
- type: object
key: WebhookBatchFailed
path: <auto>
- type: object
key: WebhookFineTuningJobSucceeded
path: <auto>
- type: object
key: WebhookFineTuningJobFailed
path: <auto>
- type: object
key: WebhookFineTuningJobCancelled
path: <auto>
- type: object
key: WebhookEvalRunSucceeded
path: <auto>
- type: object
key: WebhookEvalRunFailed
path: <auto>
- type: object
key: WebhookEvalRunCanceled
path: <auto>
- type: object
key: WebhookRealtimeCallIncoming
path: <auto>
- id: images-streaming
title: Image Streaming
description: 'Stream image generation and editing in real time with server-sent events.
[Learn more about image streaming](/docs/guides/image-generation).
'
navigationGroup: endpoints
sections:
- type: object
key: ImageGenPartialImageEvent
path: <auto>
- type: object
key: ImageGenCompletedEvent
path: <auto>
- type: object
key: ImageEditPartialImageEvent
path: <auto>
- type: object
key: ImageEditCompletedEvent
path: <auto>
- id: realtime-client-events
title: Client events
description: 'These are events that the OpenAI Realtime WebSocket server will accept from the client.
'
navigationGroup: realtime
sections:
- type: object
key: RealtimeClientEventSessionUpdate
path: <auto>
- type: object
key: RealtimeClientEventInputAudioBufferAppend
path: <auto>
- type: object
key: RealtimeClientEventInputAudioBufferCommit
path: <auto>
- type: object
key: RealtimeClientEventInputAudioBufferClear
path: <auto>
- type: object
key: RealtimeClientEventConversationItemCreate
path: <auto>
- type: object
key: RealtimeClientEventConversationItemRetrieve
path: <auto>
- type: object
key: RealtimeClientEventConversationItemTruncate
path: <auto>
- type: object
key: RealtimeClientEventConversationItemDelete
path: <auto>
- type: object
key: RealtimeClientEventResponseCreate
path: <auto>
- type: object
key: RealtimeClientEventResponseCancel
path: <auto>
- type: object
key: RealtimeClientEventOutputAudioBufferClear
path: <auto>
- id: realtime-server-events
title: Server events
description: 'These are events emitted from the OpenAI Realtime WebSocket server to the client.
'
navigationGroup: realtime
sections:
- type: object
key: RealtimeServerEventError
path: <auto>
- type: object
key: RealtimeServerEventSessionCreated
path: <auto>
- type: object
key: RealtimeServerEventSessionUpdated
path: <auto>
- type: object
key: RealtimeServerEventConversationItemAdded
path: <auto>
- type: object
key: RealtimeServerEventConversationItemDone
path: <auto>
- type: object
key: RealtimeServerEventConversationItemRetri
# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openai/refs/heads/main/openapi/openai-uploads-api-openapi.yml