주요 콘텐츠로 건너뛰기

이 브라우저는 더 이상 지원되지 않습니다.

최신 기능, 보안 업데이트, 기술 지원을 이용하려면 Microsoft Edge로 업그레이드하세요.

Microsoft Edge 다운로드 Internet Explorer 및 Microsoft Edge에 대한 추가 정보
microsoft-foundry.rest.security.o-auth2-auth

Uploads

Complete an upload

POST /openai/v1/uploads/{upload_id}/complete

Creates an upload from the supplied request.

경로 매개 변수

upload_id string 필수

The ID of the Upload.

요청 본문

The request body.

Content-Type: application/json
part_ids string[] 필수

The ordered list of Part IDs.

md5 string

The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.

응답

The request has succeeded.

본문

Content-Type: application/json
id string 필수

The Upload unique identifier, which can be referenced in API endpoints.

created_at integer 필수

The Unix timestamp (in seconds) for when the Upload was created.

filename string 필수

The name of the file to be uploaded.

bytes integer 필수
purpose string 필수

The intended purpose of the file. Please refer here for acceptable values.

status enum 필수

The status of the Upload.

pendingcompletedcancelledexpired
expires_at integer 필수

The Unix timestamp (in seconds) for when the Upload will expire.

object enum

The object type, which is always "upload".

upload
file OpenAI.OpenAIFile | null

The ready File object after the Upload is completed.

id string 필수

The file identifier, which can be referenced in the API endpoints.

bytes integer | null 필수

The size of the file, in bytes. In a completed file upload response, this can be null when the file size is not yet available.

created_at integer 필수

The Unix timestamp (in seconds) for when the file was created.

expires_at integer

The Unix timestamp (in seconds) for when the file will expire. In a completed file upload response, this can be null when no expiry is set.

filename string 필수

The name of the file.

object enum 필수

The object type, which is always file.

file
purpose enum 필수

The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, and user_data.

assistantsassistants_outputbatchbatch_outputfine-tunefine-tune-resultsvisionuser_data
status enum 필수

Deprecated. The current status of the file, which can be either uploaded, processed, or error.

uploadedprocessederror
status_details string

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job. Completed file upload responses can return null when these details are unset.

Client error

본문

Content-Type: application/json
error OpenAI.Error 필수
code string | null 필수
message string 필수
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
다음 중 하나:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string 필수

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

본문

Content-Type: application/json
error OpenAI.Error 필수
code string | null 필수
message string 필수
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
다음 중 하나:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string 필수

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

요청

curl https://api.openai.com/v1/uploads/upload_abc123/complete
  -d '{
    "part_ids": ["part_def456", "part_ghi789"]
  }'
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const upload = await client.uploads.complete('upload_abc123', { part_ids: ['string'] });

console.log(upload.id);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
upload = client.uploads.complete(
    upload_id="upload_abc123",
    part_ids=["string"],
)
print(upload.id)
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/option"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("My API Key"),
    )
    upload, err := client.Uploads.Complete(
        context.TODO(),
        "upload_abc123",
        openai.UploadCompleteParams{
            PartIDs: []string{"string"},
        },
    )
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", upload.ID)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.uploads.Upload;
import com.openai.models.uploads.UploadCompleteParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        UploadCompleteParams params = UploadCompleteParams.builder()
            .uploadId("upload_abc123")
            .addPartId("string")
            .build();
        Upload upload = client.uploads().complete(params);
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

upload = openai.uploads.complete("upload_abc123", part_ids: ["string"])

puts(upload)

응답

{
  "id": "upload_abc123",
  "object": "upload",
  "bytes": 2147483648,
  "created_at": 1719184911,
  "filename": "training_examples.jsonl",
  "purpose": "fine-tune",
  "status": "completed",
  "expires_at": 1719127296,
  "file": {
    "id": "file-xyz321",
    "object": "file",
    "bytes": 2147483648,
    "created_at": 1719186911,
    "expires_at": 1719127296,
    "filename": "training_examples.jsonl",
    "purpose": "fine-tune",
  }
}
ko-kr
사용자의 개인 정보 보호 선택
  • AI 고지 사항
  • 이전 버전
  • 블로그
  • 참가
  • 개인 정보 보호
  • 소비자 건강 개인 정보
  • 사용 조건
  • 상표
  • © Microsoft 2026