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

# Detect Skin Disease API

> Detect Skin Disease API classifies natural skin images across 24 common conditions, including eczema, psoriasis, urticaria, and acne.

<Danger>
  \[Important: API Service Retirement Notice]

  Dear Developers,

  Thank you for your continued trust and support of the AILabTools API.

  To better focus on delivering more efficient, stable, and future-ready solutions, we are announcing the retirement of this API.

  Due to its outdated architecture and limitations in performance and scalability, this API will be permanently discontinued and will no longer be available starting from the date of this announcement. Any applications or integrations that still rely on this API may experience service interruptions if no action is taken.

  We strongly recommend that you evaluate alternative solutions and plan your migration as soon as possible to ensure a smooth transition and uninterrupted service for your users.

  If you have any questions or need assistance during this transition, our support team is ready to help:
  📧 [support@ailabtools.com](mailto:support@ailabtools.com)

  We sincerely appreciate your understanding and cooperation. Thank you for being part of AILabTools. We remain committed to providing you with more powerful and reliable services.

  Best regards,

  AILabTools Support Team
</Danger>

## Request

* **URL**: `https://www.ailabapi.com/api/portrait/analysis/skin-disease-detection`
* **Method**: `POST`
* **Content-Type**: `multipart/form-data`

### Image requirements

* **Image format**: `JPG` `PNG`
* **Image size**: No more than 20 MB.
* **Image resolution**: Less than 1280x1280px.

### Headers

| Field              | Required | Type     | Description                                           |
| :----------------- | :------- | :------- | :---------------------------------------------------- |
| `ailabapi-api-key` | YES      | `string` | Application API KEY. [Get API KEY](/docs/get-api-key) |

### Body

| Field   | Required | Type   |
| :------ | :------- | :----- |
| `image` | YES      | `file` |

## Response

<Warning>
  **Response Field Handling Flow**

  1. **Handle `Public Response Fields`**

     Parse and validate the `Public Response Fields`, checking the status code or response message to ensure the request is successful and error-free.

  2. **Handle `Business Response Fields`**

     If the `Public Response Fields` are valid and error-free, proceed with processing the business logic in the `Business Response Fields`.
</Warning>

### Public Response Fields

<a href="/docs/response-description" target="_blank">Viewing Public Response Fields and Error Codes</a>

### Business Response Fields

| Field                       | Type     | Description                                                                                                           |
| :-------------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------- |
| `data`                      | `object` | The content of the result data returned.                                                                              |
| +`body_part`                | `string` | Skin lesion site identification.                                                                                      |
| +`image_quality`            | `float`  | Image quality score.                                                                                                  |
| +`image_type`               | `string` | Image classification.                                                                                                 |
| +`results_english`          | `object` | 【English】The predicted results. Contains Key-Value pairs, where Key is the disease name and Value is the probability. |
| ++`acne`                    | `float`  | Acne                                                                                                                  |
| ++`actinic_keratosis`       | `float`  | Actinic Keratosis                                                                                                     |
| ++`alopecia_androgenetica`  | `float`  | Alopecia Androgenetica                                                                                                |
| ++`alopecia_areata`         | `float`  | Alopecia Areata                                                                                                       |
| ++`bullous_dermatosis`      | `float`  | Bullous Dermatosis                                                                                                    |
| ++`chloasma`                | `float`  | Chloasma                                                                                                              |
| ++`corn`                    | `float`  | Corn                                                                                                                  |
| ++`dermatofibroma`          | `float`  | Dermatofibroma                                                                                                        |
| ++`eczema_dermatitis`       | `float`  | Eczema Dermatitis                                                                                                     |
| ++`erysipelas`              | `float`  | Erysipelas                                                                                                            |
| ++`erythema_multiforme`     | `float`  | Erythema Multiforme                                                                                                   |
| ++`folliculitis`            | `float`  | Folliculitis                                                                                                          |
| ++`furuncle`                | `float`  | Furuncle                                                                                                              |
| ++`haemangioma`             | `float`  | Haemangioma                                                                                                           |
| ++`herpes`                  | `float`  | Herpes                                                                                                                |
| ++`herpes_simplex`          | `float`  | Herpes Simplex                                                                                                        |
| ++`iga_vasculitis`          | `float`  | Iga Vasculitis                                                                                                        |
| ++`keloid`                  | `float`  | Keloid                                                                                                                |
| ++`keratosis_follicularism` | `float`  | Keratosis Follicularism                                                                                               |
| ++`lichen_planus`           | `float`  | Lichen Planus                                                                                                         |
| ++`lupus_erythematosus`     | `float`  | Lupus Erythematosus                                                                                                   |
| ++`molluscum_contagiosum`   | `float`  | Molluscum Contagiosum                                                                                                 |
| ++`nevus`                   | `float`  | Nevus                                                                                                                 |
| ++`paronychia`              | `float`  | Paronychia                                                                                                            |
| ++`pityriasis_alba`         | `float`  | Pityriasis Alba                                                                                                       |
| ++`pityriasis_rosea`        | `float`  | Pityriasis Rosea                                                                                                      |
| ++`prurigo_nodularis`       | `float`  | Prurigo Nodularis                                                                                                     |
| ++`psoriasis`               | `float`  | Psoriasis                                                                                                             |
| ++`rosacea`                 | `float`  | Rosacea                                                                                                               |
| ++`sebaceous_cyst`          | `float`  | Sebaceous Cyst                                                                                                        |
| ++`sebaceousnevus`          | `float`  | Sebaceousnevus                                                                                                        |
| ++`seborrheic_dermatitis`   | `float`  | Seborrheic Dermatitis                                                                                                 |
| ++`seborrheic_keratosis`    | `float`  | Seborrheic Keratosis                                                                                                  |
| ++`skin_tag`                | `float`  | Skin Tag                                                                                                              |
| ++`stasis_dermatitis`       | `float`  | Stasis Dermatitis                                                                                                     |
| ++`syringoma`               | `float`  | Syringoma                                                                                                             |
| ++`tinea_capitis`           | `float`  | Tinea Capitis                                                                                                         |
| ++`tinea_corporis`          | `float`  | Tinea Corporis                                                                                                        |
| ++`tinea_cruris`            | `float`  | Tinea Cruris                                                                                                          |
| ++`tinea_manuum`            | `float`  | Tinea Manuum                                                                                                          |
| ++`tinea_pedis`             | `float`  | Tinea Pedis                                                                                                           |
| ++`tinea_unguium`           | `float`  | Tinea Unguium                                                                                                         |
| ++`tinea_versicolor`        | `float`  | Tinea Versicolor                                                                                                      |
| ++`urticaria`               | `float`  | Urticaria                                                                                                             |
| ++`urticaria_papular`       | `float`  | Urticaria Papular                                                                                                     |
| ++`varicella`               | `float`  | Varicella                                                                                                             |
| ++`verruca_plana`           | `float`  | Verruca Plana                                                                                                         |
| ++`verruca_vulgaris`        | `float`  | Verruca Vulgaris                                                                                                      |
| ++`vitiligo`                | `float`  | Vitiligo                                                                                                              |

### Response Example

```json theme={null}
{
  "request_id":   "",
  "log_id":       "",
  "error_code":   0,
  "error_msg":    "",
  "error_detail": {
    "status_code":  200,
    "code":         "",
    "code_message": "",
    "message":      ""
  },
  "data":         {
    "body_part":       "",
    "image_quality":   "",
    "image_type":      "",
    "results_english": {
      "acne": 0
    }
  }
}

```
