---
title: "AI Face Editor"
method: POST
path: "/v1/ai-face-editor"
tags: ["Image Projects"]
---

# AI Face Editor

`POST /v1/ai-face-editor`

Edit facial features of an image using AI. Each edit costs 1 frame. The height/width of the output image depends on your subscription. Please refer to our [pricing](https://magichour.ai/pricing) page for more details

## Request body

- object
  - `name` string — Give your image a custom name for easy identification.
  - `assets` object, required — Provide the assets for face editor
    - `image_file_path` string, required — This is the image whose face will be edited. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
  - `style` object, required — Face editing parameters
    - `enhance_face` boolean — Enhance face features
    - `eyebrow_direction` number — Eyebrow direction (-100 to 100), in increments of 5
    - `eye_gaze_horizontal` number — Horizontal eye gaze (-100 to 100), in increments of 5
    - `eye_gaze_vertical` number — Vertical eye gaze (-100 to 100), in increments of 5
    - `eye_open_ratio` number — Eye open ratio (-100 to 100), in increments of 5
    - `lip_open_ratio` number — Lip open ratio (-100 to 100), in increments of 5
    - `head_roll` number — Head roll (-100 to 100), in increments of 5
    - `mouth_grim` number — Mouth grim (-100 to 100), in increments of 5
    - `mouth_pout` number — Mouth pout (-100 to 100), in increments of 5
    - `mouth_purse` number — Mouth purse (-100 to 100), in increments of 5
    - `mouth_smile` number — Mouth smile (-100 to 100), in increments of 5
    - `mouth_position_horizontal` number — Horizontal mouth position (-100 to 100), in increments of 5
    - `mouth_position_vertical` number — Vertical mouth position (-100 to 100), in increments of 5
    - `head_pitch` number — Head pitch (-100 to 100), in increments of 5
    - `head_yaw` number — Head yaw (-100 to 100), in increments of 5

## Response `200`

Success

- object — Success
  - `id` string, required — Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
  - `credits_charged` integer, required — The amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

## Other responses

- `400` — Invalid Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/magichourhq/apis/magic-hour-api.md) · [All operations](https://skmtc.net/magichourhq/apis/magic-hour-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/magichourhq/magic-hour-api/versions/941298cfb29f/schema)
