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

# Detect Observation Item

> Upload an image of an electrical appliance, tool, or equipment item to classify and identify observation items.

### What is detected
- **Item Classification:** Identifies appliances and equipment (e.g., 2 Pin Lead, AC Adapter, Soldering Iron, Surge Protector) with confidence ratings.
- **Top-K Predictions:** Returns ranked candidates with individual confidence scores.
- **Recognition Status:** Indicates whether the item was recognized with sufficient confidence (`recognized: true/false`).

### Supported files
- **Formats:** `.jpg`, `.jpeg`, `.png`
- **Max file size:** 10 MB
- **Content type:** `multipart/form-data` under the `file` field




## OpenAPI

````yaml /api/api-reference/detection.yml post /detect-observation
openapi: 3.0.3
info:
  title: Field Sight API
  version: 1.0.0
  description: Field Sight electrical board analysis API.
servers:
  - url: https://api.novumlogictechnologies.com
security:
  - ApiKeyAuth: []
paths:
  /detect-observation:
    post:
      tags:
        - Detection
      summary: Detect Observation Item
      description: >
        Upload an image of an electrical appliance, tool, or equipment item to
        classify and identify observation items.


        ### What is detected

        - **Item Classification:** Identifies appliances and equipment (e.g., 2
        Pin Lead, AC Adapter, Soldering Iron, Surge Protector) with confidence
        ratings.

        - **Top-K Predictions:** Returns ranked candidates with individual
        confidence scores.

        - **Recognition Status:** Indicates whether the item was recognized with
        sufficient confidence (`recognized: true/false`).


        ### Supported files

        - **Formats:** `.jpg`, `.jpeg`, `.png`

        - **Max file size:** 10 MB

        - **Content type:** `multipart/form-data` under the `file` field
      operationId: detectObservation
      parameters:
        - name: check_blur
          in: query
          required: false
          description: >-
            When set to `true`, enables image sharpness and blur level analysis.
            Defaults to `false`.
          schema:
            type: boolean
            default: false
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    The equipment or observation image file to analyze (.jpg,
                    .jpeg, .png).
      responses:
        '200':
          description: Observation detection completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetectObservationResponse'
              examples:
                recognized_item:
                  summary: Recognized Item
                  value:
                    id: ea7123-9339-44df-b169-4c75aa04a65a
                    source: api
                    tokens_charged: 1
                    status: completed
                    created_at: '2026-11-11T11:49:30.617332Z'
                    input:
                      endpoint: /detect-observation
                      image_path: >-
                        901b68dd-adc1-49c0-9f65-fee163f9b12a/images/detect-observation
                        demo 01.jpeg
                      service_name: Detect Observation
                    output:
                      recognized: true
                      confidence: 0.929
                      prediction: 2 Pin Lead
                      is_blurred: false
                      blur_percentage: 0
                      top_k:
                        - label: 2 Pin Lead
                          confidence: 0.929
                        - label: AC Adapter
                          confidence: 0.0118
                        - label: Soldering Iron
                          confidence: 0.0112
                unrecognized_item:
                  summary: Unrecognized Item (Low Confidence)
                  value:
                    id: de0s2r85-a1f2-4666-9055-cae2cb4a66ab
                    source: api
                    tokens_charged: 1
                    status: completed
                    created_at: '2026-11-11T11:50:09.237639Z'
                    input:
                      endpoint: /detect-observation
                      image_path: >-
                        901bancd-ed2d-49c0-9f65-fee163f9bcb2/images/supply-form-validation
                        demo 01.png
                      service_name: Detect Observation
                    output:
                      recognized: false
                      confidence: 0.1752
                      prediction: null
                      is_blurred: false
                      blur_percentage: 0
                      top_k:
                        - label: AC Adapter
                          confidence: 0.1752
                        - label: Surge Protector
                          confidence: 0.1303
                        - label: Multi Plug Adapter
                          confidence: 0.0914
        '400':
          description: Bad request (invalid query parameter or missing multipart file).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: BAD_REQUEST
                error: 'Invalid input: check_blur must be true or false'
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: UNAUTHORIZED
                error: API key not found or no longer valid
        '402':
          description: No active subscription or token balance exhausted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: TOKENS_EXHAUSTED
                error: Available usage was just used up.
        '413':
          description: File size exceeds the 10MB limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: FILE_TOO_LARGE
                error: file size exceeds 10MB limit
        '415':
          description: Unsupported media type or invalid file content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: INVALID_FILE_CONTENT
                error: file content is not a valid JPEG or PNG image
        '422':
          description: Unprocessable entity (AI model failed to process image).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: UNPROCESSABLE_ENTITY
                error: Unprocessable entity
        '429':
          description: Too many requests in progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: TOO_MANY_PENDING_REQUESTS
                error: Too many requests in progress. Please wait a moment and retry.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: INTERNAL_ERROR
                error: Internal server error
components:
  schemas:
    DetectObservationResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source:
          type: string
          example: api
        tokens_charged:
          type: integer
          example: 1
        status:
          type: string
          example: completed
        created_at:
          type: string
          format: date-time
        input:
          type: object
          properties:
            endpoint:
              type: string
            image_path:
              type: string
            service_name:
              type: string
        output:
          type: object
          properties:
            recognized:
              type: boolean
              description: >-
                Indicates whether the observation item was recognized with high
                confidence.
            confidence:
              type: number
              format: float
              description: Confidence score for top prediction (0 to 1).
            prediction:
              type: string
              nullable: true
              description: The predicted label name, or null if unrecognized.
            is_blurred:
              type: boolean
              nullable: true
              description: Whether the image was detected as blurry.
            blur_percentage:
              type: number
              format: float
              nullable: true
              description: Blur calculation metric.
            top_k:
              type: array
              description: Top matching item predictions ranked by confidence.
              items:
                $ref: '#/components/schemas/TopKItem'
    Error:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: string
          description: Standardized error code identifier.
          example: UNAUTHORIZED
        error:
          type: string
          description: Human-readable error description.
          example: API key not found or no longer valid
    TopKItem:
      type: object
      properties:
        label:
          type: string
          description: The classification category or item name.
          example: 2 Pin Lead
        confidence:
          type: number
          format: float
          description: Confidence score for this candidate label (0 to 1).
          example: 0.929
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Field Sight API key.

````