> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Model Prediction by Annotation ID

> [!NOTE]
>
> **[Click for Python SDK](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.Dataset.prediction_loc)**
>
> ```
> Dataset.prediction_loc(
>     model: Model,
>     reference_id: str,
>     annotation_id: str
> ) -> Prediction
> ```

This endpoint should be used if you wish to retrieve an individual model prediction object and know the associated annotation ID that was either passed in or auto-generated.


## OpenAPI

````yaml openapi/nucleus.json GET /dataset/{dataset_id}/model/{model_id}/loc/{reference_id}/{annotation_id}
openapi: 3.1.0
info:
  title: Nucleus API
  version: '1.1'
servers:
  - url: https://api.scale.com/v1/nucleus
security:
  - sec0: []
paths:
  /dataset/{dataset_id}/model/{model_id}/loc/{reference_id}/{annotation_id}:
    get:
      summary: Get Model Prediction by Annotation ID
      operationId: get-model-prediction-by-annotation-id
      parameters:
        - name: dataset_id
          in: path
          description: The Scale-generated ID of the Dataset.
          schema:
            type: string
          required: true
        - name: model_id
          in: path
          description: The Scale-generated ID of the Model.
          schema:
            type: string
          required: true
        - name: reference_id
          in: path
          description: The user-defined ID of the item containing the prediction.
          schema:
            type: string
          required: true
        - name: annotation_id
          in: path
          description: The user-defined ID/idempotency key of the `Prediction` to fetch.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    box:
                      label: car
                      type: box
                      geometry:
                        x: 655.2
                        'y': 269.3
                        width: 70.5
                        height: 50.5
                      annotation_id: img_0_car_box_0
                      confidence: 0.86
                      class_pdf:
                        car: 0.86
                        pedestrian: 0.12
                        bike: 0.02
              schema:
                type: object
                properties:
                  box:
                    type: object
                    properties:
                      label:
                        type: string
                        example: car
                      type:
                        type: string
                        example: box
                      geometry:
                        type: object
                        properties:
                          x:
                            type: number
                            example: 655.2
                            default: 0
                          'y':
                            type: number
                            example: 269.3
                            default: 0
                          width:
                            type: number
                            example: 70.5
                            default: 0
                          height:
                            type: number
                            example: 50.5
                            default: 0
                      annotation_id:
                        type: string
                        example: img_0_car_box_0
                      confidence:
                        type: number
                        example: 0.86
                        default: 0
                      class_pdf:
                        type: object
                        properties:
                          car:
                            type: number
                            example: 0.86
                            default: 0
                          pedestrian:
                            type: number
                            example: 0.12
                            default: 0
                          bike:
                            type: number
                            example: 0.02
                            default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````