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

# Locate Image on Screen

> Searches for a specified image on the screen and returns its location if found.



## OpenAPI

````yaml api-reference/openapi.json post /api/display/locate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: http://localhost:4242/{computer_name}
    description: Local development server
    variables:
      computer_name:
        default: your-computer-name
        description: Computer name
security: []
paths:
  /api/display/locate:
    post:
      tags:
        - display
      summary: Locate Image on Screen
      description: >-
        Searches for a specified image on the screen and returns its location if
        found.
      operationId: locateImage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageLocateRequest'
              description: Image search parameters
        required: true
      responses:
        '200':
          description: Successfully searched for image
          content:
            application/json:
              schema:
                anyOf:
                  - additionalProperties:
                      type: integer
                    type: object
                  - type: 'null'
                title: Response Locateimage
              example:
                x: 100
                'y': 100
                width: 50
                height: 50
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    ImageLocateRequest:
      properties:
        image_path:
          type: string
          title: Image Path
          description: Path to the image file to locate on screen
          example: /path/to/image.png
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          description: Confidence threshold for image matching (0.0 to 1.0)
          default: 0.9
          example: 0.9
        display_num:
          type: integer
          title: Display Num
          description: Display number to target
          default: 1
          example: 1
      type: object
      required:
        - image_path
      title: ImageLocateRequest
      example:
        confidence: 0.9
        display_num: 1
        image_path: /path/to/image.png
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````