Autoderm – AI Dermatology API Inference API

The inference API from Autoderm – AI Dermatology API — 5 operation(s) for inference.

OpenAPI Specification

autoderm-ai-dermatology-api-inference-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Autoderm Inference API
  version: 2.3.6
servers:
- url: https://api.autoderm.ai
  description: Autoderm API Server (prod)
tags:
- name: inference
paths:
  /v1/infer-genitals/v1:
    post:
      tags:
      - inference
      summary: Infer Genitals V1
      description: 'Analyze an image to determine if it contains genitalia.


        The HTTP response is the genital flag only. Top body-part predictions are stored in inference metadata.'
      operationId: infer_genitals_v1_v1_infer_genitals_v1_post
      security:
      - HTTPBearer: []
      parameters:
      - name: require_anonymous
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
          default: false
          title: Require Anonymous
        description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_infer_genitals_v1_v1_infer_genitals_v1_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BooleanAnalysis'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/infer-age/v1:
    post:
      tags:
      - inference
      summary: Infer Age V1
      description: 'Analyze an image and return the predicted age of the subject.


        Internal/backfill utility endpoint: no API key, no usage tracking, no stored_images write.'
      operationId: infer_age_v1_v1_infer_age_v1_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_infer_age_v1_v1_infer_age_v1_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgeModelResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/infer-diseases/v1:
    post:
      tags:
      - inference
      summary: Infer Diseases V1
      description: 'Analyze an image and return the top 5 most probable skin diseases detected, using the AutoDerm v2.2 model.


        Response is returned as soon as genitals, diseases_detector_v1 and diseases_detector_v2 (and optionally

        skin_tone if include_skin_tone=true) complete. Two-eyes, skin_detection, age, and skin_tone (if not

        requested) run in the background and are stored as inference metadata after completion; age is never

        returned to the user.'
      operationId: infer_diseases_v1_v1_infer_diseases_v1_post
      security:
      - HTTPBearer: []
      parameters:
      - name: include_skin_tone
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to include Fitzpatrick skin type prediction in the response.
          default: false
          title: Include Skin Tone
        description: Whether to include Fitzpatrick skin type prediction in the response.
      - name: require_anonymous
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
          default: false
          title: Require Anonymous
        description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_infer_diseases_v1_v1_infer_diseases_v1_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiseaseModelResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/infer-diseases/v1/diseases:
    get:
      tags:
      - inference
      summary: Get Disease Catalog V1
      description: 'Return the complete list of diseases the model can predict.


        This catalog is static and will never change. It is intended to be cached and used as a translation layer for presentation purposes.

        API users should avoid calling this endpoint repeatedly and instead cache the result in the backend that displays results to end users.'
      operationId: get_disease_catalog_v1_v1_infer_diseases_v1_diseases_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  $ref: '#/components/schemas/DiseaseCatalogEntry'
                type: object
                title: Response Get Disease Catalog V1 V1 Infer Diseases V1 Diseases Get
      security:
      - HTTPBearer: []
  /v1/infer-skin-tone/v1:
    post:
      tags:
      - inference
      summary: Infer Skin Tone V1
      description: Analyze an image to determine the Fitzpatrick skin type.
      operationId: infer_skin_tone_v1_v1_infer_skin_tone_v1_post
      security:
      - HTTPBearer: []
      parameters:
      - name: require_anonymous
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
          default: false
          title: Require Anonymous
        description: Whether to require the image to be anonymous. Images where the subject can be identified will be rejected.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_infer_skin_tone_v1_v1_infer_skin_tone_v1_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkinToneModelResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_infer_skin_tone_v1_v1_infer_skin_tone_v1_post:
      properties:
        image:
          type: string
          contentMediaType: application/octet-stream
          title: Image
          description: 'Image file to upload. Maximum size: 10.00 MB. Minimum resolution: 224x224. Supported formats: JPEG, PNG, BMP, GIF, TIFF, PPM, PGM, PBM, WebP, DICOM.'
      type: object
      required:
      - image
      title: Body_infer_skin_tone_v1_v1_infer_skin_tone_v1_post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BooleanAnalysis:
      properties:
        prediction:
          type: boolean
          title: Prediction
          description: Model prediction
        confidence:
          type: number
          maximum: 1.0
          minimum: 0.0
          title: Confidence
          description: Prediction confidence score
      type: object
      required:
      - prediction
      - confidence
      title: BooleanAnalysis
    DiseasePrediction:
      properties:
        disease:
          type: string
          title: Disease
          description: Disease label, see disease catalog for details
        confidence:
          type: number
          maximum: 1.0
          minimum: 0.0
          title: Confidence
          description: Prediction confidence score
        icd_10:
          type: string
          title: Icd 10
          description: ICD-10 code for the disease
        name:
          type: string
          title: Name
          description: Disease name in English language, see disease catalog for details
      type: object
      required:
      - disease
      - confidence
      - icd_10
      - name
      title: DiseasePrediction
    SkinToneModelResponse:
      properties:
        fitzpatrick:
          type: integer
          maximum: 6.0
          minimum: 1.0
          title: Fitzpatrick
          description: Fitzpatrick skin type classification (1 is lightest and 6 is darkest)
        confidence:
          type: number
          maximum: 1.0
          minimum: 0.0
          title: Confidence
          description: Prediction confidence score
      type: object
      required:
      - fitzpatrick
      - confidence
      title: SkinToneModelResponse
    DiseaseModelResponse:
      properties:
        predictions:
          items:
            $ref: '#/components/schemas/DiseasePrediction'
          type: array
          title: Predictions
          description: List of disease predictions
        skin_tone:
          anyOf:
          - $ref: '#/components/schemas/SkinToneModelResponse'
          - type: 'null'
          description: Fitzpatrick skin type classification
      type: object
      required:
      - predictions
      title: DiseaseModelResponse
    Body_infer_genitals_v1_v1_infer_genitals_v1_post:
      properties:
        image:
          type: string
          contentMediaType: application/octet-stream
          title: Image
          description: 'Image file to upload. Maximum size: 10.00 MB. Minimum resolution: 224x224. Supported formats: JPEG, PNG, BMP, GIF, TIFF, PPM, PGM, PBM, WebP, DICOM.'
      type: object
      required:
      - image
      title: Body_infer_genitals_v1_v1_infer_genitals_v1_post
    DiseaseCatalogEntry:
      properties:
        icd_10:
          type: string
          title: Icd 10
        categories:
          items:
            $ref: '#/components/schemas/DiseaseCategory'
          type: array
          title: Categories
        en:
          $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
        fr:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
        de:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
        it:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
        es:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
        sv:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
        zh:
          anyOf:
          - $ref: '#/components/schemas/DiseaseCatalogLocalizedEntry'
          - type: 'null'
      type: object
      required:
      - icd_10
      - categories
      - en
      - fr
      - de
      - it
      - es
      - sv
      - zh
      title: DiseaseCatalogEntry
    Body_infer_diseases_v1_v1_infer_diseases_v1_post:
      properties:
        image:
          type: string
          contentMediaType: application/octet-stream
          title: Image
          description: 'Image file to upload. Maximum size: 10.00 MB. Minimum resolution: 224x224. Supported formats: JPEG, PNG, BMP, GIF, TIFF, PPM, PGM, PBM, WebP, DICOM.'
      type: object
      required:
      - image
      title: Body_infer_diseases_v1_v1_infer_diseases_v1_post
    DiseaseCategory:
      type: string
      enum:
      - GENITAL
      - BODY
      title: DiseaseCategory
      description: Categorization tags for diseases.
    DiseaseCatalogLocalizedEntry:
      properties:
        name:
          type: string
          title: Name
        simple_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Simple Name
        read_more_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Read More Url
      type: object
      required:
      - name
      - simple_name
      - read_more_url
      title: DiseaseCatalogLocalizedEntry
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    AgeModelResponse:
      properties:
        age:
          type: number
          minimum: 0.0
          title: Age
          description: Predicted age of the subject in years
      type: object
      required:
      - age
      title: AgeModelResponse
    Body_infer_age_v1_v1_infer_age_v1_post:
      properties:
        image:
          type: string
          contentMediaType: application/octet-stream
          title: Image
          description: 'Image file to upload. Maximum size: 10.00 MB. Minimum resolution: 224x224. Supported formats: JPEG, PNG, BMP, GIF, TIFF, PPM, PGM, PBM, WebP, DICOM.'
      type: object
      required:
      - image
      title: Body_infer_age_v1_v1_infer_age_v1_post
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer