> ## 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 /ja/weave/reference/service-api/openapi.json post /call/upsert_batch
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /call/upsert_batch:
    post:
      tags:
        - Calls
      summary: call 開始バッチ
      operationId: call_start_batch_call_upsert_batch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallCreateBatchReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallCreateBatchRes'
          description: 成功レスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    CallCreateBatchReq:
      properties:
        batch:
          items:
            anyOf:
              - $ref: '#/components/schemas/CallBatchStartMode'
              - $ref: '#/components/schemas/CallBatchEndMode'
          title: Batch
          type: array
      required:
        - batch
      title: CallCreateBatchReq
      type: object
    CallCreateBatchRes:
      properties:
        res:
          items:
            anyOf:
              - $ref: '#/components/schemas/CallStartRes'
              - $ref: '#/components/schemas/CallEndRes'
          title: Res
          type: array
      required:
        - res
      title: CallCreateBatchRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CallBatchStartMode:
      properties:
        mode:
          default: start
          title: Mode
          type: string
        req:
          $ref: '#/components/schemas/CallStartReq'
      required:
        - req
      title: CallBatchStartMode
      type: object
    CallBatchEndMode:
      properties:
        mode:
          default: end
          title: Mode
          type: string
        req:
          $ref: '#/components/schemas/CallEndReq'
      required:
        - req
      title: CallBatchEndMode
      type: object
    CallStartRes:
      properties:
        id:
          title: Id
          type: string
        trace_id:
          title: Trace Id
          type: string
      required:
        - id
        - trace_id
      title: CallStartRes
      type: object
    CallEndRes:
      properties: {}
      title: CallEndRes
      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
    CallStartReq:
      additionalProperties: false
      properties:
        start:
          $ref: '#/components/schemas/StartedCallSchemaForInsert'
      required:
        - start
      title: CallStartReq
      type: object
    CallEndReq:
      additionalProperties: false
      properties:
        end:
          $ref: '#/components/schemas/EndedCallSchemaForInsert'
      required:
        - end
      title: CallEndReq
      type: object
    StartedCallSchemaForInsert:
      properties:
        attributes:
          additionalProperties: true
          title: Attributes
          type: object
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        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
        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
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
        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_user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 直接設定しないでください。サーバーがこのフィールドを自動的に設定します。
          title: Wb User Id
      required:
        - project_id
        - op_name
        - started_at
        - attributes
        - inputs
      title: StartedCallSchemaForInsert
      type: object
    EndedCallSchemaForInsert:
      properties:
        ended_at:
          format: date-time
          title: Ended At
          type: string
        exception:
          anyOf:
            - type: string
            - type: 'null'
          title: Exception
        id:
          title: Id
          type: string
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        project_id:
          title: Project Id
          type: string
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started At
        summary:
          $ref: '#/components/schemas/SummaryInsertMap'
        wb_run_step_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wb Run Step End
      required:
        - project_id
        - id
        - ended_at
        - summary
      title: EndedCallSchemaForInsert
      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
  securitySchemes:
    HTTPBasic:
      scheme: basic
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````