Skip to content

AI Teeth Whitening

Overview

AI Teeth Whitening API

The AI Teeth Whitening API provides an advanced, automated solution for enhancing smiles in photos. Using intelligent image processing, it brightens teeth naturally and accurately, creating polished, professional results within seconds.

How It Removes Yellow Teeth in Photos

Smart Whitening
The API automatically detects teeth and applies a natural-looking whitening effect without making the image appear artificial.

Adjustable Levels
A built-in adjustment feature allows users to control the degree of whitening, from a subtle enhancement to a more pronounced, camera-ready finish.

Key Features

Quick and Easy Enhancement
Achieve a noticeably brighter smile in just a few seconds.

Accurate AI Detection
Advanced detection ensures that only teeth are modified, maintaining a realistic and balanced appearance.

Adjustable Whitening Intensity
Users can fine-tune the whitening strength to match their preferred style.

Natural Results with Advanced Algorithms

The AI Teeth Whitening API uses sophisticated algorithms designed to identify teeth precisely and apply whitening effects that remain true to life. Users can refine the intensity to achieve a subtle, natural improvement, ensuring that the final result looks authentic and visually appealing.


Integration Guide

  • Take a Selfie

    • Face the camera directly with proper lighting.
    • Use the JS Camera Kit to capture the photo.
  • Retrieve upload URLs and File IDs via /s2s/v2.0/file API

    Upload the following files using the upload URLs returned in the file API response:

    • Your selfie photo
  • Execute AI Task /s2s/v2.0/task/teeth-whiten

    Run the AI task using file IDs or image URLs as the input source. Configure the effect parameters as desired.

  • Poll Task Status

    Use the returned task_id to monitor task progress.
    Poll GET /s2s/v2.0/task/teeth-whiten/{task_id} to check the engine's status.
    The task will remain in a “running” state until it is completed. No units are consumed while the task is running.

  • Usage demonstration

File Specs & Errors

  • Supported Formats & Dimensions
TypeSupported DimensionsSupported File SizeSupported Formats
AI Teeth WhiteningSelfie Image:
* Long side ≤ 1920 px
* Short side ≥ 320 px
< 10MBjpg/png
  • Error Codes
Error CodeDescription
error_exceed_max_image_sizeIf the longer side of an image exceeds 1920 pixels
error_below_min_image_sizeIf your image is smaller than 320 pixels in width or height, it's too small to use
error_face_position_invalidYour face needs to be fully visible in the image, without any parts cut off
error_face_position_too_smallThe face in your photo is too small to analyze properly
error_face_position_out_of_boundaryYour face is either too large or partially outside the edges of the photo
error_insufficient_lightingThe lighting is too dim, which makes analysis difficult
error_face_angle_invalidYour face angle isn't quite right. For front-facing shots, keep your head within 10 degrees of straight. For side-facing shots, the angle should be more than 15 degrees
  • Environment & Dependency
Sample Code Language / ToolRecommended Runtime Versions
cURL- bash >= 3.2
- curl >= 7.58 (modern TLS/HTTP support)
- jq >= 1.6 (robust JSON parsing)
Node.js (JavaScript)Node >= 18 (for global fetch)
JavaScript- Chrome / Edge >= 80
- Firefox >= 74
- Safari >= 13.1
PHPPHP >= 7.4 (for modern TLS/compat), ext-curl (recommended) or allow_url_fopen=On + ext-openssl, ext-json
PythonPython >= 3.10 (for f-strings), requests >= 2.20.0
JavaJava 11+ (for HttpClient), Jackson Databind >= 2.12.0

Unit Consumption

AI FeatureUnit Consumed
AI Teeth Whitening V1.01

Languages
Servers
https://yce-api-01.makeupar.com