> ## 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.

# calls 사용량

> 여러 루트 call의 집계 사용량을 하위 항목 롤업과 함께 계산합니다.



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /calls/usage
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /calls/usage:
    post:
      tags:
        - Calls
      summary: calls 사용량
      description: 여러 루트 call의 집계 사용량을 하위 항목 롤업과 함께 계산합니다.
      operationId: calls_usage_calls_usage_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallsUsageReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsUsageRes'
          description: 성공적인 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    CallsUsageReq:
      additionalProperties: false
      description: >-
        여러 루트 call의 집계된 사용량을 계산하기 위한 요청입니다.


        이 엔드포인트는 요청된 각 루트 call에 대한 사용 메트릭을 반환하며, 각 루트의 메트릭에는 해당 루트 자체의 사용량과 모든
        하위 항목의 사용량 합계가 포함됩니다.


        참고: 집계를 위해 일치하는 모든 call이 메모리에 로드됩니다. 결과 집합이 매우 큰 경우(>10k calls)에는 루트
        call ID를 배치로 나누어 처리하거나 애플리케이션 계층에서 더 좁은 필터를 사용하는 것을 고려하세요.
      properties:
        call_ids:
          description: 집계할 루트 call ID입니다. 각 결과 키는 입력 call ID 하나에 해당합니다.
          items:
            type: string
          title: Call Ids
          type: array
        include_costs:
          default: false
          description: true이면 사용량에 비용 계산을 포함합니다.
          title: Include Costs
          type: boolean
        limit:
          default: 10000
          description: 모든 트레이스에서 처리할 최대 call 수입니다. 무제한적인 메모리 사용을 방지하기 위한 안전 한도로 작동합니다.
          title: Limit
          type: integer
        project_id:
          title: Project Id
          type: string
      required:
        - project_id
        - call_ids
      title: CallsUsageReq
      type: object
    CallsUsageRes:
      description: 루트 call별 집계된 사용 메트릭이 포함된 응답입니다.
      properties:
        call_usage:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/LLMAggregatedUsage'
            type: object
          title: Call Usage
          type: object
        unfinished_call_ids:
          items:
            type: string
          title: Unfinished Call Ids
          type: array
      title: CallsUsageRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    LLMAggregatedUsage:
      description: 특정 LLM에 대한 집계된 사용 메트릭입니다.
      properties:
        cache_creation_input_tokens:
          default: 0
          title: Cache Creation Input Tokens
          type: integer
        cache_creation_input_tokens_total_cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cache Creation Input Tokens Total Cost
        cache_read_input_tokens:
          default: 0
          title: Cache Read Input Tokens
          type: integer
        cache_read_input_tokens_total_cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cache Read Input Tokens Total Cost
        completion_tokens:
          default: 0
          title: Completion Tokens
          type: integer
        completion_tokens_total_cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Completion Tokens Total Cost
        prompt_tokens:
          default: 0
          title: Prompt Tokens
          type: integer
        prompt_tokens_total_cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Prompt Tokens Total Cost
        requests:
          default: 0
          title: Requests
          type: integer
        total_tokens:
          default: 0
          title: Total Tokens
          type: integer
      title: LLMAggregatedUsage
      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
  securitySchemes:
    HTTPBasic:
      scheme: basic
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````