# SDXL Headshot > Face Gen is an AI avatar generator that creates images based on your prompt while maintaining a consistent character using your face, in styles like realistic, anime, 3D, chibi, and comic. ## Overview - **Model ID**: `ai-avatar-generatorface-gen` - **Category**: image - **Provider**: modelslab - **Status**: active - **Screenshot**: `https://assets.modelslab.com/generations/0598ee0d-1c3f-469d-849c-4a0876dce539.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v6/image_editing/face_gen` - **Method**: POST ### Parameters - **`face_image`** (required): The face image should be clear and must be visiable till shoulder - Type: file - **`prompt`** (required): - Type: textarea - **`style`** (required): Select style to get different style of output - Type: select (options: realistic, anime , 3d, chibi, comic) - **`negative_prompt`** (optional): descriptio - Type: textarea - **`num_inference_steps`** (optional): - Type: number (range: 21-41) - **`webhook`** (optional): URL to receive POST notification upon completion - Type: text - **` track_id`** (optional): ID for webhook identification - Type: text ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v6/image_editing/face_gen \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "ai-avatar-generatorface-gen", "face_image": "https://assets.modelslab.com/generations/2fdf185d-c676-427f-97e3-85b4998aee2e", "prompt": "Wearing pirate costume, cleavage, on pirate boat, ocean in background, blue sky", "style": "realistic", "negative_prompt": "drawing, big nose, long nose, fat, ugly, big lips, big mouth, face proportion mismatch, unrealistic, monochrome, lowres, bad anatomy, worst quality, low quality, blurry", "num_inference_steps": "41", "webhook": "null", " track_id": "null" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v6/image_editing/face_gen", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "ai-avatar-generatorface-gen", "face_image": "https://assets.modelslab.com/generations/2fdf185d-c676-427f-97e3-85b4998aee2e", "prompt": "Wearing pirate costume, cleavage, on pirate boat, ocean in background, blue sky", "style": "realistic", "negative_prompt": "drawing, big nose, long nose, fat, ugly, big lips, big mouth, face proportion mismatch, unrealistic, monochrome, lowres, bad anatomy, worst quality, low quality, blurry", "num_inference_steps": "41", "webhook": "null", " track_id": "null" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v6/image_editing/face_gen", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "ai-avatar-generatorface-gen", "face_image": "https://assets.modelslab.com/generations/2fdf185d-c676-427f-97e3-85b4998aee2e", "prompt": "Wearing pirate costume, cleavage, on pirate boat, ocean in background, blue sky", "style": "realistic", "negative_prompt": "drawing, big nose, long nose, fat, ugly, big lips, big mouth, face proportion mismatch, unrealistic, monochrome, lowres, bad anatomy, worst quality, low quality, blurry", "num_inference_steps": "41", "webhook": "null", " track_id": "null" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/ai-avatar-generatorface-gen/ai-avatar-generatorface-gen) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)