> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 데이터셋 항목 추가 또는 교체

> 단일 트랜잭션으로 최대 5,000개의 OpenAI 채팅 행을 기록합니다. JSON 배열을 보내거나, 동일한 행을 NDJSON(줄당 하나의 행) 형식으로 `Content-Type: application/x-ndjson`과 함께 보내세요. 유효하지 않은 행이 하나라도 있으면 요청이 거부되고 해당 행의 인덱스가 보고됩니다. NDJSON의 N번째 줄에 해당하는 인덱스는 N - 1입니다. `mode=append`는 이미 존재하는 `row_id`를 거부합니다(409 `entry_exists`). `mode=upsert`는 해당 행을 대체하되, 행에서 `group_id`, `split`, `metadata`, `provenance` 중 생략한 필드는 기존에 저장된 값을 유지합니다. 새 항목은 기본적으로 `train`과 자체 그룹에 할당됩니다. 쓰기 작업으로 인해 하나의 그룹이 둘 이상의 분할에 속하게 되면 409 `group_split_conflict`가 반환됩니다. 쓰기 작업은 데이터셋을 새 리비전으로 갱신하고, 완료된 재라벨링과 평가를 최신 상태가 아닌 것으로 표시합니다.



## OpenAPI

````yaml ko/openapi/model-distillation/management.openapi.yaml POST /projects/{alias}/datasets/{datasetId}/entries
openapi: 3.1.0
info:
  title: CoreWeave Model Distillation Management API
  version: 1.0.0
  description: |
    공급자, 프로젝트, 라우팅 버전, 데이터셋, 재라벨링,
    미세 조정 모델, 평가, 분석을 관리하세요. 이 API는
    Model Distillation에서 사용하는 API와 동일합니다.
servers:
  - url: https://forge.coreweave.com/api/distillation/v1
    description: 프로덕션
security:
  - WandbCredential: []
tags:
  - name: Providers
    description: OpenAI 호환 엔드포인트, 인증 정보, 모델 카탈로그 및 가격.
  - name: Projects
    description: 안정적인 프로젝트 ID와 프로젝트 수준 정보입니다.
  - name: Routing
    description: 버전이 지정된 모델 대상, 가중치, 요청 매개변수.
  - name: Datasets
    description: 재현 가능한 데이터 스냅샷, 항목, 레이블 재지정, 재사용 가능한 모델 출력.
  - name: Fine-tunes
    description: 지도 파인튜닝 작업 및 호스팅된 모델 아티팩트.
  - name: Evaluations
    description: 직접 비교, 완전 일치, 범주화 평가.
  - name: Analytics
    description: 프로젝트 트래픽, 토큰, 오류, 예상 비용 조회 모델.
  - name: UI preferences
    description: UI에서 사용하는 프로젝트별 표시 기본 설정.
paths:
  /projects/{alias}/datasets/{datasetId}/entries:
    parameters:
      - $ref: '#/components/parameters/WandbEntity'
      - $ref: '#/components/parameters/ProjectAlias'
      - $ref: '#/components/parameters/DatasetId'
    post:
      tags:
        - Datasets
      summary: 데이터셋 항목 추가 또는 교체
      description: >-
        단일 트랜잭션으로 최대 5,000개의 OpenAI 채팅 행을 기록합니다. JSON 배열을 보내거나, 동일한 행을 NDJSON(줄당
        하나의 행) 형식으로 `Content-Type: application/x-ndjson`과 함께 보내세요. 유효하지 않은 행이
        하나라도 있으면 요청이 거부되고 해당 행의 인덱스가 보고됩니다. NDJSON의 N번째 줄에 해당하는 인덱스는 N - 1입니다.
        `mode=append`는 이미 존재하는 `row_id`를 거부합니다(409 `entry_exists`).
        `mode=upsert`는 해당 행을 대체하되, 행에서 `group_id`, `split`, `metadata`,
        `provenance` 중 생략한 필드는 기존에 저장된 값을 유지합니다. 새 항목은 기본적으로 `train`과 자체 그룹에
        할당됩니다. 쓰기 작업으로 인해 하나의 그룹이 둘 이상의 분할에 속하게 되면 409 `group_split_conflict`가
        반환됩니다. 쓰기 작업은 데이터셋을 새 리비전으로 갱신하고, 완료된 재라벨링과 평가를 최신 상태가 아닌 것으로 표시합니다.
      operationId: writeDatasetEntries
      parameters:
        - name: mode
          in: query
          description: append는 row_id가 이미 존재하는 행을 거부하고, upsert는 해당 행을 대체합니다.
          required: false
          schema:
            default: append
            type: string
            enum:
              - append
              - upsert
        - name: dry_run
          in: query
          description: 변경 사항을 검증하고 보고한 다음 롤백하세요.
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              minItems: 1
              maxItems: 5000
              type: array
              items:
                type: object
                properties:
                  row_id:
                    description: >-
                      데이터셋 내에서 변하지 않는 ID. 업서트 시 이 ID로 일치하는 항목을 찾습니다. 기본값은 메시지와
                      요청 필드의 다이제스트입니다.
                    type: string
                    minLength: 1
                    maxLength: 512
                  group_id:
                    description: 하나의 대화에 속한 턴처럼 동일한 분할에 속해야 하는 행. 기본값은 row_id입니다.
                    type: string
                    minLength: 1
                    maxLength: 512
                  split:
                    description: >-
                      train 또는 val. 평가용으로 행을 트레이닝에서 제외하려면 val을 사용하세요. 새 행의 기본값은
                      train입니다.
                    type: string
                    enum:
                      - train
                      - val
                  messages:
                    minItems: 2
                    maxItems: 1000
                    type: array
                    items:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                  tools:
                    maxItems: 128
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          const: function
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                              minLength: 1
                              maxLength: 256
                            description:
                              type: string
                              maxLength: 16384
                            parameters:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            strict:
                              type: boolean
                          required:
                            - name
                          additionalProperties: false
                      required:
                        - type
                        - function
                      additionalProperties: false
                  tool_choice: {}
                  response_format: {}
                  metadata:
                    description: 사용자나 고객 세그먼트 등 필터링에 사용할 수 있는 속성.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  provenance:
                    description: 원본 시스템이나 트레이스 ID 등 행의 출처 정보.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - messages
                additionalProperties: false
          application/x-ndjson:
            schema:
              type: string
              description: 줄당 하나의 JSON 행이며, 각 행은 JSON 배열의 항목과 동일한 구조입니다.
      responses:
        '200':
          description: 항목이 기록되었습니다. 모의 실행인 경우 실제로 실행하면 기록될 항목입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetEntryWriteResult'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    WandbEntity:
      name: Wandb-Entity
      in: header
      required: false
      description: 액세스 가능한 개인 또는 팀 entity. 인증된 사용자의 기본 entity를 사용하려면 생략하세요.
      schema:
        type: string
    ProjectAlias:
      name: alias
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-z0-9-]{1,64}$
    DatasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    DatasetEntryWriteResult:
      type: object
      required:
        - dry_run
        - created
        - updated
        - revision
        - entry_counts
        - group_conflicts
      properties:
        dry_run:
          type: boolean
        created:
          type: integer
          description: 새 항목으로 추가된 행입니다.
        updated:
          type: integer
          description: 행이 대체한 기존 항목입니다.
        revision:
          type: integer
          description: 쓰기 후의 데이터셋 리비전입니다. 모의 실행에서는 변경되지 않습니다.
        entry_counts:
          $ref: '#/components/schemas/DatasetEntryCounts'
        group_conflicts:
          type: array
          items:
            type: string
          description: 둘 이상의 분할에 걸쳐 있는 그룹입니다. 충돌이 있으면 실제 쓰기는 거부됩니다.
    DatasetEntryCounts:
      type: object
      required:
        - total
        - train
        - val
      properties:
        total:
          type: integer
        train:
          type: integer
        val:
          type: integer
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
      example:
        error:
          message: Project 'missing' not found in entity 'your-team'
          type: not_found
  responses:
    Error:
      description: 요청이 실패했습니다.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    WandbCredential:
      type: http
      scheme: bearer
      bearerFormat: wandb API key or JWT
      description: >-
        wandb API 키 또는 wandb JWT. 브라우저 세션은 Model Distillation 웹 앱 백엔드에서 교환하며, 작업
        권한은 내부에서만 사용됩니다.

````