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

# 予測の作成

> 予測を作成します。



## OpenAPI

````yaml /ja/weave/reference/service-api/openapi.json post /v2/{entity}/{project}/predictions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v2/{entity}/{project}/predictions:
    post:
      tags:
        - Predictions
      summary: 予測の作成
      description: 予測を作成します。
      operationId: prediction_create_v2__entity___project__predictions_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/PredictionCreateBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionCreateRes'
          description: 正常なレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    PredictionCreateBody:
      description: |-
        REST API 経由で予測を作成するためのリクエストボディ。

        このモデルには project_id は含まれません。RESTful endpoints の URL パスから取得されるためです。
      properties:
        evaluation_run_id:
          anyOf:
            - type: string
            - type: 'null'
          description: この予測を子 call として関連付けるためのオプションの評価 run ID
          title: Evaluation Run Id
        genai_span_ref:
          anyOf:
            - items:
                $ref: '#/components/schemas/GenAISpanRef'
              type: array
            - type: 'null'
          description: この予測によって生成される、省略可能な GenAI span 参照。
          title: Genai Span Ref
        inputs:
          additionalProperties: true
          description: 予測への入力
          title: Inputs
          type: object
        model:
          description: モデル参照（weave:// URI）
          title: Model
          type: string
        output:
          description: 予測の出力
          title: Output
      required:
        - model
        - inputs
        - output
      title: PredictionCreateBody
      type: object
    PredictionCreateRes:
      properties:
        prediction_id:
          description: 予測 ID
          title: Prediction Id
          type: string
      required:
        - prediction_id
      title: PredictionCreateRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    GenAISpanRef:
      properties:
        span_id:
          title: Span Id
          type: string
        trace_id:
          title: Trace Id
          type: string
      required:
        - trace_id
        - span_id
      title: GenAISpanRef
      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

````