Skip to content

AI Smile

overview

Introducing Generative AI Smile API, the easy way to turn that frown upside down. This convenient AI smile generator transforms sad or neutral facial expressions into happy, natural looking smiles in just moments. Powered by advanced generative AI, it helps bring warmth and positivity to any photo with a simple and effortless process. Upload an image, let the AI work its magic, and instantly convert your sad face into a cheerful smiley face that spreads happiness everywhere it's shared.

The AI Smile generator supports two distinct smile styles, giving users more control over the final expression.

  1. smile_with_teeth_visible
    This option creates a bright, joyful smile with naturally visible teeth. It is ideal for upbeat portraits, social media photos, and situations where a warm and expressive look is desired.

  2. closed_mouth_smile
    This option produces a subtle, gentle smile with lips closed. It works well for professional photos, formal profiles, or when a calm and natural expression is preferred.

Users can easily choose the smile type that best matches their photo, mood, or intended use, ensuring realistic and appealing results every time.

Whether you're editing photos, creating fun content, or simply want to add a touch of positivity, Generative AI Smile makes it easy to spread happiness, one smile at a time.

Upload a face. Click once. Smile instantly.

Integration Guide

This guide walks you through:

Workflow for AI Smile API:

Endpoint: /s2s/v2.0/task/ai-smile

Authentication Required: Authorization: Bearer YOUR_API_KEY

Workflow Steps:

  1. Image Upload Preparation:

    • Prepare a selfie image for upload.
    • Call the File API /s2s/v2.0/file to obtain the upload URL and associated file_id.
    • Upload the selfie image using the provided upload URL.
  2. Initiate AI Task and Obtain Task ID:

    • Send the file_id along with the chosen effect configuration via an HTTP POST request to /s2s/v2.0/task/ai-smile.
    • Await a unique task ID in the response, which identifies this interaction.
  3. Poll Task Status (Continuous Check):

    • Use the obtained task_id to periodically poll the task status using an HTTP GET request (e.g., GET /s2s/v2.0/task/ai-smile/${task_id}).
    • Continuously monitor for:
      • Task_status = "success" (process completed).
      • Task_status = "error" (resolve or retry if applicable).
    • Update the workflow accordingly once the status transitions to success.

This structured workflow ensures efficient integration with user inputs, automated monitoring of tasks, and seamless retrieval of results.


  1. Authentication
  • Include your API key in the request header using Bearer Token:
    Authorization: Bearer YOUR_API_KEY

You can find your API Key at https://yce.makeupar.com/api-console/en/api-keys/.

  1. Upload an Image

    You may upload a file directly to the server or provide a valid image URL in the AI task payload.

    • Upload Endpoint

      POST /s2s/v2.0/file

    Alternatively, skip this step if you already have a public image URL.


  1. Create an AI Smile Task and Poll for Results

    Once you have an image and a complete effect setup, create a task. The API processes the request asynchronously. You must poll the task status until it reaches success or error.

    • Create Task Endpoint

      POST /s2s/v2.0/task/ai-smile
    • Polling Endpoint

      GET /s2s/v2.0/task/ai-smile/{task_id}

File Specs & Errors

  • AI Smile Specification

Supported Selfie View Only single-person images are supported, the image must contain a clearly visible face of sufficient size exceeding 32 x 32 pixels when the long edge is 640, and the capture angles must have a roll within plus or minus 75 degrees and a yaw within plus or minus 90 degrees to avoid face detection failure.


  • Supported Formats & Dimensions
AI FeatureSupported DimensionsSupported File SizeSupported Formats
AI Smilelong side <= 4096< 10MBjpg/jpeg/png/heic
  • Error Codes
Error CodeDescription
EXCEED_MAX_FILESIZEThe input file exceeds the maximum allowed size.
INVALID_PARAMETEROne or more required parameters are missing, empty, or improperly formatted.
ERROR_DOWNLOAD_IMAGEThe source image could not be downloaded.
ERROR_NO_FACENo face was detected in the provided image.
ERROR_INFERENCEThe inference process failed due to a workflow issue, execution error, encoding error, or missing output image.
UNKNOWN_INTERNAL_ERRORAn unexpected internal error occurred.
  • 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 Smile V1.01

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