From be5fa8a1a1475a19e4eaf608c048bad7bc83c5ca Mon Sep 17 00:00:00 2001 From: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com> Date: Fri, 25 Sep 2026 05:34:23 +0000 Subject: [PATCH] chore(api): document files and uploads error responses Castiron-Internal-PR: https://github.com/openai/openai-python-internal/pull/155 Castiron-Source-SHA: 9de9165abbc9e7c42859d814928269cb1c8da511 Castiron-Public-Base-SHA: 63099e739d25cb18f90cae93648471bf037bc46f --- .castiron.stats.yml | 10 +- api_reference/openapi.transformed.yml | 180 ++++++++++++++++++++++++++ 2 files changed, 185 insertions(+), 5 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index eb293d48e7..3f302e348a 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 609890e8-e394-414e-9f46-19228c660a02 -openapi_spec_hash: c391453ba13869e34306c479834d24a5 -openapi_transformed_spec_hash: 9ccfb60d276e7be95a2d78b81cbc2474 +generation_id: bbcf5fb4-a54f-48d7-9c24-772776477085 +openapi_spec_hash: 0e4e2f7dffefdf9af4ba091f557e3698 +openapi_transformed_spec_hash: 289efd507762e0572ba21c2b46935826 config_hash: 84cdcc959ee7140cc9a65e9b642c097b -codegen_sha: cd0d2fbdca92c3722e2d8c89a3264360bb297fd5 +codegen_sha: 89568c51f375a47f1d3156069016495765eeb70f codegen_hash: 67b5ab20d81c80689a8a857466838278fb0d428d48b3261d2479bab43396d589 -public_codegen_sha: a647954332e5cc4fad53f7841d3cb20f513caaa6 +public_codegen_sha: adc070c132abc2bdd81fd8ef5c4b75925ea0a02c diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 54da3fd6c5..07e65f039a 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -6025,6 +6025,24 @@ paths: application/json: schema: $ref: '#/components/schemas/ListFilesResponse' + '400': + description: The file listing parameters are invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The file specified by the after cursor was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6122,6 +6140,24 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIFile' + '400': + description: The file upload request is invalid or exceeds a file size or storage quota limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The file could not be uploaded because of a server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6196,6 +6232,18 @@ paths: application/json: schema: $ref: '#/components/schemas/DeleteFileResponse' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6247,6 +6295,18 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIFile' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6302,6 +6362,30 @@ paths: application/json: schema: type: string + '400': + description: The file cannot be downloaded for its purpose or the account does not have permission to download it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The file could not be downloaded because of a server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -20874,6 +20958,18 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload request is invalid or exceeds a file size or storage quota limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -20928,6 +21024,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload is no longer pending or is already being completed and cannot be cancelled. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -20982,6 +21102,36 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload cannot be completed in its current state, the parts are invalid, or the uploaded size does not match the specified size. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The upload could not be completed. Retry the same request, preserving the part order and MD5 value. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -21045,6 +21195,36 @@ paths: application/json: schema: $ref: '#/components/schemas/UploadPart' + '400': + description: The upload cannot accept more parts, or the part exceeds an upload size limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The part could not be uploaded. Try the request again. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: