Share via


Files - Delete

지정된 파일 ID를 사용하여 파일을 삭제합니다. 파일이 사용된 경우(예: 미세 조정 작업에서 학습 파일로) 삭제도 허용됩니다.

DELETE {endpoint}/openai/files/{file-id}?api-version=2024-02-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
endpoint
path True

string

url

지원되는 Cognitive Services 엔드포인트(프로토콜 및 호스트 이름( 예: https://aoairesource.openai.azure.com) "aoairesource"를 Azure OpenAI 계정 이름으로 대체합니다.)

file-id
path True

string

파일의 식별자입니다.

api-version
query True

string

요청된 API 버전입니다.

요청 헤더

Name 필수 형식 Description
api-key True

string

여기에서 Cognitive Services Azure OpenAI 계정 키를 제공합니다.

응답

Name 형식 Description
204 No Content

파일이 성공적으로 삭제되었습니다.

Other Status Codes

ErrorResponse

오류가 발생했습니다.

보안

api-key

여기에서 Cognitive Services Azure OpenAI 계정 키를 제공합니다.

Type: apiKey
In: header

예제

Deleting a file.

Sample Request

DELETE https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099?api-version=2024-02-01

Sample Response

정의

Name Description
Error

오류

ErrorCode

오류 코드

ErrorResponse

ErrorResponse

InnerError

InnerError

InnerErrorCode

InnerErrorCode

Error

오류

Name 형식 Description
code

ErrorCode

오류 코드
Microsoft REST 지침(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)에 정의된 오류 코드입니다.

details

Error[]

사용 가능한 경우 오류 세부 정보입니다.

innererror

InnerError

InnerError
Microsoft REST 지침(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)에 정의된 내부 오류입니다.

message

string

이 오류의 메시지입니다.

target

string

사용 가능한 경우 오류가 발생한 위치입니다.

ErrorCode

오류 코드

Name 형식 Description
conflict

string

요청된 작업이 현재 리소스 상태와 충돌합니다.

contentFilter

string

안전 시스템의 결과로 이미지 생성에 실패했습니다.

fileImportFailed

string

파일을 가져오지 못했습니다.

forbidden

string

현재 사용자/api 키에는 작업이 금지되어 있습니다.

internalFailure

string

내부 오류입니다. 다시 시도하세요.

invalidPayload

string

이 작업에 대한 요청 데이터가 잘못되었습니다.

itemDoesAlreadyExist

string

항목이 이미 있습니다.

jsonlValidationFailed

string

jsonl 데이터의 유효성 검사에 실패했습니다.

notFound

string

리소스를 찾을 수 없습니다.

quotaExceeded

string

할당량이 초과되었습니다.

serviceUnavailable

string

현재 서비스를 사용할 수 없습니다.

tooManyRequests

string

요청이 너무 많습니다. 나중에 다시 시도하십시오.

unauthorized

string

현재 사용자/api 키는 작업에 대한 권한이 없습니다.

unexpectedEntityState

string

현재 리소스의 상태에서는 작업을 실행할 수 없습니다.

ErrorResponse

ErrorResponse

Name 형식 Description
error

Error

오류
Microsoft REST 지침(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)에 정의된 오류 콘텐츠입니다.

InnerError

InnerError

Name 형식 Description
code

InnerErrorCode

InnerErrorCode
Microsoft REST 지침(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)에 정의된 내부 오류 코드입니다.

innererror

InnerError

InnerError
Microsoft REST 지침(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)에 정의된 내부 오류입니다.

InnerErrorCode

InnerErrorCode

Name 형식 Description
invalidPayload

string

이 작업에 대한 요청 데이터가 잘못되었습니다.