> ## Documentation Index
> Fetch the complete documentation index at: https://landinglens.docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Per Sample Report

> Get a download link for the per-sample performance report of a model.

The report is a CSV file with one row per image in the snapshot the model was
trained on, covering every split, and it is the same file the LandingLens web
app offers as a model performance CSV download.

The columns are `Project Name`, `Project Type`, `Image Name`, `Image ID`,
`Split`, `Upload Time`, `Image Width`, `Image Height`, `Model Name`,
`Metadata`, followed by the ground truth and prediction columns for the
project type:

* Classification: `GT_Class`, `PRED_Class`, `Model_Correct`,
  `PRED_Confidence`, `Gt-PRED JSON`
* Anomaly detection: `GT_Class`, `PRED_Class`, `Model_Correct`,
  `Model_Confidence`, `Gt-PRED JSON`
* Object detection: `GT_Class`, `PRED_Class`, `PRED_Class_Confidence`,
  `Class_TotalArea`, `GT-PRED JSON`

Predictions are reported at the threshold saved on the model, which is the
same threshold used by the `results/metrics` and `results/confusion-matrix`
endpoints. Segmentation projects are not supported.

The download link expires; `downloadExpiresAt` is when it does.



## OpenAPI

````yaml /openapi.json get /v1/projects/{project_id}/train/{training_id}/results/per-sample-report
openapi: 3.1.0
info:
  title: LandingLens API
  description: >

    **LandingLens API** is a RESTful API that allows you to use
    [LandingLens](https://app.landing.ai) programmatically.

    Our API has predictable resource-oriented URLs, returns JSON-encoded
    responses, and uses standard HTTP response codes, authentication, and verbs.


    You can use the LandingLens API to programmatically perform many tasks in
    LandingLens, including:

    * Create projects

    * Upload images to projects

    * Create classes

    * Train models

    * Deploy models to cloud-endpoints hosted by LandingAI (cloud deployment)


    ## Tutorial

    Check out this
    [tutorial](https://landing-ai.github.io/public-rest-api/tutorial/) to learn
    the basic workflow for using the LandingLens APIs.
  version: 0.1.0
servers:
  - url: https://api.landing.ai
    description: Production environment
security: []
paths:
  /v1/projects/{project_id}/train/{training_id}/results/per-sample-report:
    get:
      tags:
        - Training
      summary: Get Per Sample Report
      description: >-
        Get a download link for the per-sample performance report of a model.


        The report is a CSV file with one row per image in the snapshot the
        model was

        trained on, covering every split, and it is the same file the
        LandingLens web

        app offers as a model performance CSV download.


        The columns are `Project Name`, `Project Type`, `Image Name`, `Image
        ID`,

        `Split`, `Upload Time`, `Image Width`, `Image Height`, `Model Name`,

        `Metadata`, followed by the ground truth and prediction columns for the

        project type:


        * Classification: `GT_Class`, `PRED_Class`, `Model_Correct`,
          `PRED_Confidence`, `Gt-PRED JSON`
        * Anomaly detection: `GT_Class`, `PRED_Class`, `Model_Correct`,
          `Model_Confidence`, `Gt-PRED JSON`
        * Object detection: `GT_Class`, `PRED_Class`, `PRED_Class_Confidence`,
          `Class_TotalArea`, `GT-PRED JSON`

        Predictions are reported at the threshold saved on the model, which is
        the

        same threshold used by the `results/metrics` and
        `results/confusion-matrix`

        endpoints. Segmentation projects are not supported.


        The download link expires; `downloadExpiresAt` is when it does.
      operationId: >-
        get_per_sample_report_v1_projects__project_id__train__training_id__results_per_sample_report_get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
            title: Project Id
        - name: training_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Training Id
        - name: timeout
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 60
            title: Timeout
        - name: apikey
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Apikey
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerSampleReportResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PerSampleReportResponse:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/SignedDownload'
            - type: 'null'
      type: object
      required:
        - data
      title: PerSampleReportResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SignedDownload:
      properties:
        downloadUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Downloadurl
        downloadExpiresAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Downloadexpiresat
          readOnly: true
      type: object
      required:
        - downloadExpiresAt
      title: SignedDownload
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````