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

# Face Generator

> This endpoint allows you to generate image with the face image provided.

<img src="https://mintcdn.com/mod/Xe_I2k0P2zG5615S/images/enterprise-api/face-gen/assets/images/Face-Gen-90cdf5a0be5cc4e52b36cfcc87d9fb29.jpg?fit=max&auto=format&n=Xe_I2k0P2zG5615S&q=85&s=0f60f12caaa21ef53d561a68210f7ba0" alt="Face gen endpoint result" width="691" height="518" data-path="images/enterprise-api/face-gen/assets/images/Face-Gen-90cdf5a0be5cc4e52b36cfcc87d9fb29.jpg" />

<Warning>
  Make sure you add your [s3 details](/enterprise-api/general/update-s3-details) for `face_gen` server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after **24hours**
</Warning>

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body to the endpoint.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v1/enterprise/face_gen/make_gen' \
```

## Body

```json json theme={null}
{  
  "key": "enterprise_api_key",  
  "prompt": "pretty woman",  
  "negative_prompt": "anime, cartoon, drawing, big nose, long nose, fat, ugly, big lips, big mouth, face proportion mismatch, unrealistic, monochrome, lowres, bad anatomy, worst quality, low quality, blurry",  
  "face_image":"https://media.allure.com/photos/647f876463cd1ef47aab9c88/3:2/w_2465,h_1643,c_limit/angelina%20jolie%20blonde%20hair%20chloe.jpg",  
  "width": "512",  
  "height": "512",  
  "samples": "1",  
  "num_inference_steps": "21",  
  "safety_checker": false,  
  "s_scale":1.0,  
  "seed":1234,  
  "safety_checker_type":"blur",  
  "base64": false,  
  "guidance_scale": 7.5,  
  "webhook": null,  
  "track_id": null
}
```

## Body Attributes

<ParamField query="key" type="string" required placeholder="Your API key">
  Your API Key used for request authorization.
</ParamField>

<ParamField query="prompt" type="string" required placeholder="Prompt text">
  Text prompt with description of the things you want in the image to be generated.
</ParamField>

<ParamField query="face_image" type="string" required placeholder="Image URL or base64 data">
  Link or valid base64 data (data:image/jpeg;base64,{your_base64_string}) of the face you want generations to resemble.
</ParamField>

<ParamField query="safety_checker" type="bool" required>
  Whether to run the safety checker to prevent NSFW image generation.
</ParamField>

<ParamField query="safety_checker_type" type="string" default="sensitive_content_text" enum="blur,sensitive_content_text,pixelate,black">
  Modify image if NSFW images are found. Options: blur, sensitive\_content\_text, pixelate, black.
</ParamField>

<ParamField query="width" type="number">
  Width of your generated image. Max dimension: 512 x 768.
</ParamField>

<ParamField query="height" type="number">
  Height of your generated image. Max dimension: 512 x 768.
</ParamField>

<ParamField query="num_inference_steps" type="number" enum="21,31,41">
  Number of denoising steps. Accepted values: 21, 31, 41.
</ParamField>

<ParamField query="guidance_scale" type="number">
  Scale for classifier-free guidance.
</ParamField>

<ParamField query="s_scale" type="number" required default="1.0" min="0.0" max="2.0">
  Adjust the weight of the face structure. Range: 0.0 to 2.0.
</ParamField>

<ParamField query="seed" type="number" required>
  Seed used to reproduce results. Same seed will generate the same image again.
</ParamField>

<ParamField query="samples" type="number" default="1" max="2">
  Number of images to be returned in response. Max: 2.
</ParamField>

<ParamField query="base64" type="bool" default="false">
  If true, face\_image is in base64 format or output images will be returned as base64 strings.
</ParamField>

<ParamField query="webhook" type="string">
  URL to receive a POST call once image generation is complete.
</ParamField>

<ParamField query="track_id" type="string">
  ID returned in the webhook API call to identify the request.
</ParamField>
