> ## 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 통계



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /calls/stats
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /calls/stats:
    post:
      tags:
        - Calls
      summary: Call 통계
      operationId: call_stats_calls_stats_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallStatsReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallStatsRes'
          description: 성공적인 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    CallStatsReq:
      additionalProperties: false
      description: 시간 범위에 대한 집계된 call 통계 요청입니다.
      properties:
        call_metrics:
          anyOf:
            - items:
                $ref: '#/components/schemas/CallMetricSpec'
              type: array
            - type: 'null'
          description: 계산할 call 수준 메트릭(지연 시간, 개수)입니다. timestamp 기준으로만 그룹화됩니다.
          title: Call Metrics
        end:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 제외 종료 시간(UTC, ISO 8601)입니다. 생략하면 현재 시간으로 설정됩니다.
          title: End
        filter:
          anyOf:
            - $ref: '#/components/schemas/CallsFilter'
            - type: 'null'
        granularity:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            버킷 크기(초 단위, 예: 1시간은 3600)입니다. 생략하면 시간 범위에 따라 자동으로 선택됩니다. 버킷 수가
            10,000개를 초과하게 되면 조정됩니다.
          title: Granularity
        project_id:
          title: Project Id
          type: string
        start:
          description: 포함 시작 시간(UTC, ISO 8601)입니다.
          format: date-time
          title: Start
          type: string
        timezone:
          default: UTC
          description: '버킷 정렬에 사용할 IANA 표준 시간대(예: ''America/New_York'')'
          title: Timezone
          type: string
        usage_metrics:
          anyOf:
            - items:
                $ref: '#/components/schemas/UsageMetricSpec'
              type: array
            - type: 'null'
          description: 계산할 사용 메트릭(토큰, 비용)입니다. timestamp와 모델별로 그룹화됩니다.
          title: Usage Metrics
      required:
        - project_id
        - start
      title: CallStatsReq
      type: object
    CallStatsRes:
      description: 시계열 call 통계를 포함한 응답입니다.
      properties:
        call_buckets:
          default: []
          description: call 수준 메트릭입니다. 각 버킷에는 'timestamp'와 집계된 메트릭 값이 포함됩니다.
          items:
            additionalProperties: true
            type: object
          title: Call Buckets
          type: array
        end:
          description: 확정된 종료 시간(UTC)
          format: date-time
          title: End
          type: string
        granularity:
          description: 사용된 버킷 크기(초 단위)
          title: Granularity
          type: integer
        start:
          description: 확정된 시작 시간(UTC)
          format: date-time
          title: Start
          type: string
        timezone:
          description: 버킷 정렬에 사용된 표준 시간대
          title: Timezone
          type: string
        usage_buckets:
          default: []
          description: 모델별 사용 메트릭입니다. 각 버킷에는 'timestamp', 'model', 집계된 메트릭 값이 포함됩니다.
          items:
            additionalProperties: true
            type: object
          title: Usage Buckets
          type: array
      required:
        - start
        - end
        - granularity
        - timezone
      title: CallStatsRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CallMetricSpec:
      additionalProperties: false
      description: 집계할 call 수준 메트릭 사양입니다(모델별로 그룹화되지 않음).
      properties:
        aggregations:
          default:
            - sum
          description: 적용할 기본 집계 함수
          items:
            $ref: '#/components/schemas/AggregationType'
          title: Aggregations
          type: array
        metric:
          description: 집계할 메트릭입니다.
          enum:
            - latency_ms
            - call_count
            - error_count
          title: Metric
          type: string
        percentiles:
          default: []
          description: '계산할 백분위수 값(0~100)입니다. 예: p50, p95, p99의 경우 [50, 95, 99]'
          items:
            type: number
          title: Percentiles
          type: array
      required:
        - metric
      title: CallMetricSpec
      type: object
    CallsFilter:
      additionalProperties: false
      properties:
        call_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Call Ids
        input_refs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Input Refs
        op_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Op Names
        output_refs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Output Refs
        parent_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Parent Ids
        thread_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Thread Ids
        trace_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Trace Ids
        trace_roots_only:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Trace Roots Only
        turn_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Turn Ids
        wb_run_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Wb Run Ids
        wb_user_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Wb User Ids
      title: CallsFilter
      type: object
    UsageMetricSpec:
      additionalProperties: false
      description: 집계할 사용 메트릭의 사양입니다(모델별로 그룹화됨).
      properties:
        aggregations:
          default:
            - sum
          description: 적용할 기본 집계 함수
          items:
            $ref: '#/components/schemas/AggregationType'
          title: Aggregations
          type: array
        metric:
          description: 집계할 메트릭입니다. token 메트릭은 제공업체 전반에서 정규화됩니다.
          enum:
            - input_tokens
            - output_tokens
            - total_tokens
            - cache_read_input_tokens
            - cache_creation_input_tokens
            - input_cost
            - output_cost
            - total_cost
          title: Metric
          type: string
        percentiles:
          default: []
          description: '계산할 백분위수 값(0-100)입니다. 예: p50, p95, p99의 경우 [50, 95, 99]'
          items:
            type: number
          title: Percentiles
          type: array
      required:
        - metric
      title: UsageMetricSpec
      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
    AggregationType:
      description: 피드백 및 호출 통계 메트릭에서 지원되는 집계 함수입니다.
      enum:
        - sum
        - avg
        - min
        - max
        - count
        - count_true
        - count_false
      title: AggregationType
      type: string
  securitySchemes:
    HTTPBasic:
      scheme: basic
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````