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.
To access the API, you need a valid API key. Here are the steps to obtain and use an API key:
Api-Key
. For example, "Api-Key: Pk566ZkEQRLr9vNwo2Gkr1uL6pr-4VjZUkvdJHAdFsA"
.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
parameter lets you choose the version of the AI model for predictions. Detailed information on available models can be found in the models section.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.
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. |
file | string <binary> |
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())
{- "success": true,
- "message": "string",
- "id": "string",
- "predictions": [
- {
- "confidence": 0.1,
- "icd": "string",
- "name": "string",
- "classificationId": "string",
}
], - "fitzpatrick": null,
- "anonymous": {
- "confidence": 0.1,
- "prediction": true
}
}
This endpoint analyzes an image to determine if it contains images of genitals. It uses a specific model for this analysis.
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. |
file | string <binary> |
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)
{- "result": true
}
Endpoint to test if the server is alive. It returns a simple text response indicating the server's status.
import requests response = requests.get('https://autoderm.ai/v1/utils/healthz') print(response.text)
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.
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. |
file | string <binary> |
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}')
{- "is_blurry": true
}
This endpoint provides a list of all available disease classifications including their ID, ICD code, and name.
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. |
[- {
- "id": "string",
- "icd": "string",
- "name": "string"
}
]