💄
roboMUA APIs Documentation
  • 🤖Welcome!
  • 🏁Quick Start
  • Reference
    • 📖API Reference
      • 🤎Skin Shade Detection API
      • 👄Lips Application API
      • 🦰Hairstyle Try-On API
  • 🔒Terms of Use
Powered by GitBook
On this page
  • Endpoints
  • GET /api/generatekey
  • POST /api/skinshade
  • GET /api/skinshade-health
  • Error Codes
  • Authentication
  • Request Limit
  • Acceptable Image Files
  1. Reference
  2. API Reference

Skin Shade Detection API

This API employs advanced algorithms to factor in undertones, providing a more accurate and nuanced understanding of skin color to create more personalized and inclusive user experiences.

Good to know: We only offer cloud APIs and our methods are kept up to date automatically with changes to the API.

Endpoints

GET /api/generatekey

Generates a new API key. This endpoint is rate-limited to 1 request per month for the free tier.

Response

A JSON object containing the generated API key.

{
  "roboKey": "your-api-key"
}

POST /api/skinshade

Detects the skin shade from an image based on the tone and undertones.

x-api-key (header): Your API key.
file (form-data): The image file. Should be of type png, jpg, jpeg, or heic.

A JSON object containing the detected skin shade and tone range.

{
  "skinShade": "#hex-color",
  "toneRange": "tone-range"
}

GET /api/skinshade-health

Check the application's health, the AI model, and the database.

Response

A JSON object containing the following fields:

- `status`: A string that indicates the overall health of the API. It can be either "healthy" or "unhealthy".
- `details`: A dictionary containing each component's status. The keys are the names of the components ("app", "model", "database"), and the values are strings describing the status of the component.

Status Codes

- `200 OK`: The API is healthy.
- `503 Service Unavailable`: The API is unhealthy.

Example Response

{
    "status": "healthy",
    "details": {
        "app": "App is running",
        "model": "AI model is loaded",
        "database": "Database is connected"
    }
}

Good to know: The health check endpoint is useful for monitoring the health of the API and quickly identifying any issues with the application, the AI model, or the database.


Error Codes

  • 403: Missing or invalid API key.

  • 429: API key exceeded request limit.

  • 400: No file part, selected file, or invalid file type.

Authentication

To authenticate your requests, include your API key in the x-api-key header.

Request Limit

The generatekey endpoint is rate-limited to 1 request per month for the free tier. The skinshade endpoint is rate-limited to 100 requests per month per API key for the free tier.

Acceptable Image Files

The skinshade endpoint accepts image files of type png, jpg, jpeg, and heic. The maximum file size is 5MB.

PreviousAPI ReferenceNextLips Application API

Last updated 1 year ago

📖
🤎