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

# Call 완료

> 완료된 Call 배치를 `calls_complete` 테이블에 직접 업서트합니다.

배치의 각 Call에는 시작 정보와 종료 정보가 모두 포함됩니다.
이 Endpoint는 Call이 클라이언트 측에서 버퍼링된 뒤 완료된 레코드로 전송될 때 사용됩니다.



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /v2/{entity}/{project}/calls/complete
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v2/{entity}/{project}/calls/complete:
    post:
      tags:
        - Calls
      summary: Call 완료
      description: |-
        완료된 Call 배치를 `calls_complete` 테이블에 직접 업서트합니다.

        배치의 각 Call에는 시작 정보와 종료 정보가 모두 포함됩니다.
        이 Endpoint는 Call이 클라이언트 측에서 버퍼링된 뒤 완료된 레코드로 전송될 때 사용됩니다.
      operationId: calls_complete_v2__entity___project__calls_complete_post
      parameters:
        - in: path
          name: entity
          required: true
          schema:
            title: Entity
            type: string
        - in: path
          name: project
          required: true
          schema:
            title: Project
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallsUpsertCompleteReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsUpsertCompleteRes'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
components:
  schemas:
    CallsUpsertCompleteReq:
      description: 완료된 Call 배치를 업서트하기 위한 요청입니다.
      properties:
        batch:
          items:
            $ref: '#/components/schemas/CompletedCallSchemaForInsert'
          title: Batch
          type: array
      required:
        - batch
      title: CallsUpsertCompleteReq
      type: object
    CallsUpsertCompleteRes:
      description: 완료된 Call 배치를 업서트하기 위한 응답입니다.
      properties: {}
      title: CallsUpsertCompleteRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CompletedCallSchemaForInsert:
      description: |-
        완료된 Call을 직접 삽입하기 위한 스키마입니다.

        삽입 시점에 이미 완료된 Call을 나타내며, 시작 정보와 종료 정보가 모두
        함께 제공됩니다. `calls_complete` Endpoint에서 사용됩니다.
      properties:
        attributes:
          additionalProperties: true
          title: Attributes
          type: object
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        ended_at:
          format: date-time
          title: Ended At
          type: string
        exception:
          anyOf:
            - type: string
            - type: 'null'
          title: Exception
        id:
          title: Id
          type: string
        inputs:
          additionalProperties: true
          title: Inputs
          type: object
        op_name:
          title: Op Name
          type: string
        otel_dump:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Otel Dump
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        project_id:
          title: Project Id
          type: string
        started_at:
          format: date-time
          title: Started At
          type: string
        summary:
          $ref: '#/components/schemas/SummaryInsertMap'
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        trace_id:
          title: Trace Id
          type: string
        turn_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Turn Id
        wb_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Wb Run Id
        wb_run_step:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wb Run Step
        wb_run_step_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wb Run Step End
        wb_user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 직접 설정하지 마세요. 서버가 이 필드를 자동으로 채웁니다.
          title: Wb User Id
      required:
        - project_id
        - id
        - trace_id
        - op_name
        - started_at
        - ended_at
        - attributes
        - inputs
        - summary
      title: CompletedCallSchemaForInsert
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    SummaryInsertMap:
      additionalProperties: true
      properties:
        status_counts:
          additionalProperties:
            type: integer
          propertyNames:
            $ref: '#/components/schemas/TraceStatus'
          title: Status Counts
          type: object
        usage:
          additionalProperties:
            $ref: '#/components/schemas/LLMUsageSchema'
          title: Usage
          type: object
      title: SummaryInsertMap
      type: object
    LLMUsageSchema:
      additionalProperties: true
      properties:
        cache_creation_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Creation Input Tokens
        cache_read_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Read Input Tokens
        completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Completion Tokens
        input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Tokens
        output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Tokens
        prompt_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Tokens
        requests:
          anyOf:
            - type: integer
            - type: 'null'
          title: Requests
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
      title: LLMUsageSchema
      type: object

````