{
  "openapi": "3.0.4",
  "info": {
    "title": "Attention Emotion API",
    "description": "Attention Emotion API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/emotion-attention/detect": {
      "post": {
        "tags": [
          "EmotionAttention"
        ],
        "summary": "Returns whether a face was detected and, for the dominant face in the image, the detected emotions, attention state, and facial landmarks.",
        "requestBody": {
          "description": "Emotion and attention request model",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmotionsAttentionRequestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmotionsAttentionRequestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmotionsAttentionRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the emotions, attention and facial landmark results",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmotionsAttentionResultModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmotionsAttentionResultModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmotionsAttentionResultModel"
                }
              }
            }
          }
        }
      }
    },
    "/v1/healthz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Simple health check endpoint that returns the current UTC time.",
        "responses": {
          "200": {
            "description": "Returns the server UTC time.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EmotionsAttentionModel": {
        "type": "object",
        "properties": {
          "hasFace": {
            "type": "boolean",
            "description": "Describes whether a face is detected in the image. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "presence": {
            "type": "boolean",
            "description": "Describes whether a person is present in the image. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "eyesOnScreen": {
            "type": "boolean",
            "description": "Describes whether the person's eyes are on the screen. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "attention": {
            "type": "boolean",
            "description": "Describes whether the person is attentive. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "confusion": {
            "type": "boolean",
            "description": "Describes the detected emotions. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "contempt": {
            "type": "boolean",
            "description": "Describes whether the person shows contempt. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "disgust": {
            "type": "boolean",
            "description": "Describes whether the person shows disgust. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "happy": {
            "type": "boolean",
            "description": "Describes whether the person shows happiness. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "empathy": {
            "type": "boolean",
            "description": "Describes whether the person shows empathy. (Null means, that it could not be determined reliably)",
            "nullable": true
          },
          "surprise": {
            "type": "boolean",
            "description": "Describes whether the person shows surprise. (Null means, that it could not be determined reliably)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the results of analyzing an image for facial presence, attention, and emotional states."
      },
      "EmotionsAttentionRequestModel": {
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageModel"
          }
        },
        "additionalProperties": false,
        "description": "Represents a request model for emotion and attention detection."
      },
      "EmotionsAttentionResultModel": {
        "type": "object",
        "properties": {
          "emotionsAttention": {
            "$ref": "#/components/schemas/EmotionsAttentionModel"
          },
          "landmarks": {
            "$ref": "#/components/schemas/LandmarkModel"
          }
        },
        "additionalProperties": false,
        "description": "Model for the result of emotion and attention detection"
      },
      "ImageModel": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "URL of a jpeg or png image",
            "nullable": true
          },
          "bytes": {
            "type": "string",
            "description": "Base64 string encoded binary jpeg or png image",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents an image using either a URL or a Base64 encoded string."
      },
      "LandmarkModel": {
        "type": "object",
        "properties": {
          "scale": {
            "type": "number",
            "description": "Scale of the face",
            "format": "double"
          },
          "roll": {
            "type": "number",
            "description": "Roll pose angle",
            "format": "double"
          },
          "yaw": {
            "type": "number",
            "description": "Yaw pose angle",
            "format": "double"
          },
          "pitch": {
            "type": "number",
            "description": "Pitch pose angle",
            "format": "double"
          },
          "translate": {
            "$ref": "#/components/schemas/Point2D"
          },
          "landmarks2D": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point2D"
            },
            "description": "Position of the 49 landmarks, in image coordinates",
            "nullable": true
          },
          "landmarks3D": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point3D"
            },
            "description": "Position of the 49 landmarks, in an un-scaled face-centered 3D space",
            "nullable": true
          },
          "isGood": {
            "type": "boolean",
            "description": "Describes whether the tracking is good quality or not"
          }
        },
        "additionalProperties": false,
        "description": "Represents the result of a facial landmark detection, including pose, scale, and landmark positions in both 2D and\n3D space."
      },
      "Point2D": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number",
            "description": "The X axis coordinate of a point in 2D space.",
            "format": "double"
          },
          "y": {
            "type": "number",
            "description": "The Y axis coordinate of a point in 2D space.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Represents a point in 2D space."
      },
      "Point3D": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number",
            "description": "The X axis coordinate of a point in 3D space.",
            "format": "double"
          },
          "y": {
            "type": "number",
            "description": "The Y axis coordinate of a point in 3D space.",
            "format": "double"
          },
          "z": {
            "type": "number",
            "description": "The Z axis coordinate of a point in 3D space.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Represents a point in 3D space."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter your token in the text input below.\r\n\r\nExample: \"1safsfsdfd...\"",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "API key Authorization header using the ApiKey scheme. \r\n\r\n Enter 'ApiKey' [space] and then your APIKey in the text input below.\r\n\r\nExample: \"ApiKey 5j3245lj...\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ],
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "EmotionAttention"
    },
    {
      "name": "Health"
    }
  ]
}