Autoderm API (1.0.0)

Download OpenAPI specification:Download

Autoderm's API provides advanced AI-driven image analysis for detecting skin diseases. It's designed for easy integration into existing healthcare systems.

API Key Usage

To access the API, you need a valid API key. Here are the steps to obtain and use an API key:

Obtaining an API Key

  • Subscription: You can start a 3-months free trial by subscribing to one of our offers, cancellable anytime, while enjoying an extensive list of services.
  • Contact Us: You can also contact us if you have any question or enquiry, or if you require support.

Using the API Key

  • Header Authentication: Include your API key in the request header under the name Api-Key. For example, "Api-Key: Pk566ZkEQRLr9vNwo2Gkr1uL6pr-4VjZUkvdJHAdFsA".
  • Keep it Secure: Treat your API key like a password. Avoid sharing it publicly, storing it in version-controlled files, or embedding it directly in your application's code.
  • Environment Variables: Consider setting the API key as an environment variable in your application's runtime environment. For guidelines on managing environment variables, refer to the 12 Factor App methodology.

Additional Parameters

  • Language: The language parameter allows you to specify the language of the response content. It accepts a two-letter ISO 639-1 code. Default is "en" for English.
  • Model: The model parameter lets you choose the version of the AI model for predictions. Detailed information on available models can be found in the models section.

Disease Model

Detect the top 5 most likely diseases from a picture

This endpoint accepts an image and returns the top 5 most likely diseases, including ICD codes, disease names, and additional information. If no model name is provided, the most recent one shall be selected as default. We recommend sending images with a high resolution, uncompressed, ideally over 300kb in size, well centered around the area of the condition for optimal results.

Authorizations:
ApiKeyAuth
query Parameters
model
string

The AI model to be used for prediction. Available values are autoderm_v2_2 (latest), autoderm_v2_1, autoderm_v2_0, autoderm_v1_1, autoderm_v1_0.

language
string
Default: "en"

Specifies the language for the response. Default is 'en'. Possible values are en, sv, es, zh.

simple_names
boolean

Specifies whether the returned disease names should be simplified.

save_image
boolean

If you want to manually disable image saving - note that this may not help improve future models. Default value true

anon_filter
boolean

If set to true, filters out identifiable/non-anonymous images (images with 2 or more eyes). When this filter is applied, the API will return an error if the image is not considered anonymous.

Request Body schema: multipart/form-data
required
file
string <binary>

Responses

Request samples

import requests

url = 'https://autoderm.ai/v1/query'
files = {'file': open('path_to_image.jpg', 'rb')}
data = {'model': 'autoderm_v2_2', 'language': 'en', 'anon_filter': 'false'}
headers = {'Api-Key': 'Your API Key here'}

response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "id": "string",
  • "predictions": [
    ],
  • "fitzpatrick": null,
  • "anonymous": {
    }
}

Genital Model

Check for presence of genitals in an image

This endpoint analyzes an image to determine if it contains images of genitals. It uses a specific model for this analysis.

Authorizations:
ApiKeyAuth
query Parameters
model
required
string
Default: "genitals_v1_0"

The AI model to be used for checking the image. Currently, the only available model is 'genitals_v1_0'.

save_image
boolean

If you want to manually disable image saving - note that this may not help improve future models. Default value true.

Request Body schema: multipart/form-data
required
file
string <binary>

Responses

Request samples

import requests

with open("image.jpg", "rb") as f:
    image_contents = f.read()

response = requests.post(
    "https://autoderm.ai/v1/query_genitals",
    headers={"Api-Key": "Your API Key"},
    files={"file": image_contents},
    params={"model": "genitals_v1_0"}
)

if response.status_code != 200:
    print(f'status_error: {response.status_code}')
else:
    data = response.json()
    print(data)

Response samples

Content type
application/json
{
  • "result": true
}

utils

Check server health

Endpoint to test if the server is alive. It returns a simple text response indicating the server's status.

Authorizations:
ApiKeyAuth

Responses

Request samples

import requests
response = requests.get('https://autoderm.ai/v1/utils/healthz')
print(response.text)

Check blur in an image

Send an image to check if it's blurry based on a certain threshold. In production, image are not binary between what is blurry or not. Using this improves the performances of the model by trimming to top 30% of the images considered blurry.

Authorizations:
ApiKeyAuth
query Parameters
threshold
number [ 0 .. 300 ]

Blur threshold, we recommend a value of 50.0 which trims down 30% of the usual blurred images in production. You can test with your own image sources for your ideal value.

Request Body schema: multipart/form-data
file
string <binary>

Responses

Request samples

import requests

# Replace YOUR_API_KEY with your actual API key
API_KEY = 'YOUR_API_KEY'

# Open the test image and read the bytes
with open('skin.JPG', 'rb') as f:
    image_contents = f.read()

# Send the query
response = requests.post(
    'https://autoderm.ai/v1/utils/check_blur',
    headers={'Api-Key': API_KEY},
    files={'file': image_contents},
    params={'threshold': 50.0}
)

# Print the response content
print(response.content)

if response.status_code != 200:
    print(f'status_error: {response.status_code}')
else:
    # Get the JSON data returned
    data = response.json()

    print(f'data: {data}')

Response samples

Content type
application/json
{
  • "is_blurry": true
}

classifications

Retrieve a list of available classifications

This endpoint provides a list of all available disease classifications including their ID, ICD code, and name.

Authorizations:
ApiKeyAuth
query Parameters
model
any

The AI model to be used for prediction. Available values are autoderm_v2_2 (latest), autoderm_v2_1, autoderm_v2_0, autoderm_v1_1, autoderm_v1_0.

Responses

Response samples

Content type
application/json
[
  • {
    }
]