> ## Documentation Index
> Fetch the complete documentation index at: https://ailabtools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Facial Expressions API

> Change Facial Expressions API edits portrait expressions with realistic smiles, cool looks, sad faces, and more while preserving identity.

export const expressions = [{
  value: "10",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/10.webp"
}, {
  value: "11",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/11.webp"
}, {
  value: "12",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/12.webp"
}, {
  value: "13",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/13.webp"
}, {
  value: "14",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/14.webp"
}, {
  value: "15",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/15.webp"
}, {
  value: "16",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/16.webp"
}, {
  value: "100",
  image: "https://ai-resource.ailabtools.com/change-facial-expressions/expressions/100.webp"
}];

## Submit Task

### `expression`

The following enum values are supported for `expression`.

<Expandable title="Expressions">
  <div className="mt-2 grid grid-cols-2 lg:grid-cols-4 align-center gap-2">
    {expressions.map((item) => (
            <div key={item.value} className="rounded-xl">
              <img className="w-full mt-0 mb-2 aspect-square object-contain rounded-xl" src={item.image} alt={item.value} />
              <code className="block break-all text-center text-xs">{item.value}</code>
            </div>
          ))}
  </div>
</Expandable>


## OpenAPI

````yaml POST /api/portrait/effects/emotion-editor
openapi: 3.0.0
info:
  title: AILabAPI
  description: >-
    [<b>AILabTools</b>](https://www.ailabtools.com) is an advanced tool that
    offers a vast array of simple and flexible API endpoints to suit your
    specific needs. With just one [<b>API
    KEY</b>](https://www.ailabtools.com/doc/get-api-key), you can easily call
    any of the endpoints and integrate them quickly into your application or
    workflow, allowing for smooth and efficient operations.


    [<b>AILabTools</b>](https://www.ailabtools.com) is continuously evolving,
    and you can anticipate even more API endpoints being added in the future,
    further enhancing its capabilities and usefulness for your artificial
    intelligence and machine learning requirements.
  version: 1.0.0
servers:
  - url: https://www.ailabapi.com
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: AI IMAGE
  - name: AI IMAGE > Image Enhancement
  - name: AI IMAGE > Image Effects
  - name: AI IMAGE > Image Editing
  - name: AI IMAGE > Image Scoring
  - name: AI BACKGROUND REMOVAL
  - name: AI BACKGROUND REMOVAL > Portrait
  - name: AI BACKGROUND REMOVAL > General
  - name: AI PORTRAIT
  - name: AI PORTRAIT > Portrait Effects
  - name: AI PORTRAIT > Portrait Enhance
  - name: AI PORTRAIT > Portrait Editing
  - name: AI PORTRAIT > Portrait Analysis
  - name: AI COMMON
paths:
  /api/portrait/effects/emotion-editor:
    post:
      tags:
        - AI PORTRAIT > Portrait Effects
      summary: Change Facial Expressions
      description: >-
        Change Facial Expressions API edits portrait expressions with realistic
        smiles, cool looks, sad faces, and more while preserving identity.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image_target:
                  type: string
                  format: binary
                  description: |-
                    - Image format: `JPEG` `JPG` `PNG` 
                    - Image size: No more than 5 MB. 
                    - Image resolution: Less than 4096x4096px.
                service_choice:
                  type: string
                  enum:
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 100
                  description: >-
                    Expression. See [Supported expression
                    values](/docs/ai-portrait/effects/emotion-editor/api#expression).
      responses:
        '200':
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicResponseFields'
                  - type: object
                    properties:
                      data:
                        type: object
                        description: The content of the result data returned.
                        properties:
                          image:
                            type: string
                            description: >-
                              The result image, returning the Base64 encoding of
                              the image.
              example:
                request_id: ''
                log_id: ''
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                data:
                  image: ''
          description: Success
components:
  schemas:
    PublicResponseFields:
      type: object
      required:
        - request_id
        - log_id
        - error_detail
      properties:
        request_id:
          type: string
          description: Request ID for debugging.
        log_id:
          type: string
          description: Log ID for debugging.
        error_detail:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - code
        - code_message
        - message
      properties:
        code:
          type: string
          description: >-
            Error Code. See [Error
            Codes](/docs/response-description#error-codes).
        code_message:
          type: string
          description: Error summary.
        message:
          type: string
          description: Detailed error message.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ailabapi-api-key
      description: API Key for authentication

````