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

# Infer CXR Images

> Infer the findings section of a CXR image



## OpenAPI

````yaml POST /v2/models/infer
openapi: 3.0.1
info:
  title: OpenAPI Mecha Health
  description: API Endpoints for Mecha Health
  license:
    name: Reserved
  version: 1.0.0
servers:
  - url: https://api.mecha-health.ai
security:
  - bearerAuth: []
paths:
  /v2/models/infer:
    post:
      description: Infer the findings section of a CXR image
      requestBody:
        description: >-
          The request payload containing a Base64 encoded CXR image and an
          optional language parameter
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageInput'
      responses:
        '200':
          description: CXR interpretation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CXRInterpretation'
        '400':
          description: >-
            Bad Request - The request could not be understood or was missing
            required parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error occurred during inference processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImageInput:
      type: object
      required:
        - inputs
      properties:
        inputs:
          type: array
          items:
            type: object
            required:
              - name
              - data
            properties:
              name:
                type: string
                description: >-
                  The name of the input (IMAGE, INDICATION, or
                  PAST_REPORTS_DATES_TIMES)
                enum:
                  - IMAGE
                  - INDICATION
                  - PAST_REPORTS_DATES_TIMES
                example: IMAGE
              data:
                oneOf:
                  - type: string
                    description: >-
                      For IMAGE: Base64 encoded image data, for INDICATION: Text
                      description, for PAST_REPORTS_DATES_TIMES: Array of
                      arrays, length 5, containing report text as the first
                      element, and dates in the format (YYYY, DD, HH, MM) since
                      the current scan date.
                  - type: array
                    description: >-
                      For PAST_REPORTS_DATES_TIMES: Array of tuples containing
                      report text and dates, each tuple is length 5, containing
                      report text as the first element, and dates in the format
                      (YYYY, DD, HH, MM) since the current scan date.
                    items:
                      type: array
                      items:
                        oneOf:
                          - type: string
                          - type: number
        language:
          type: string
          description: Language parameter for the response
          enum:
            - en
            - es
          example: en
    CXRInterpretation:
      type: object
      required:
        - findings
      properties:
        findings:
          description: The findings of the CXR image
          type: string
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          example: Internal server error
        message:
          type: string
          example: >-
            An unexpected error occurred while processing your request. Please
            try again later or contact support if the issue persists.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````