ModelsLab/SDXL Headshot
ai-avatar-generatorface-genFace 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.
API Endpoint URL
Base URL for all API requests to this endpoint.
https://modelslab.com/api/v6/image_editing/face_gen
API Authentication
Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.
Integration Examples
Production-ready code samples for API integration
{"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","width": "512","height": "768","num_inference_steps": "41","base64": "false","safety_checker": false,"seed": "0","guidance_scale": "7.5","s_scale": "1","samples": "1","webhook": null," track_id": null,"key": "YOUR_API_KEY"}
SDKs
Official SDKs
Production-ready SDKs and client libraries for all major programming languages
API Parameters
Technical specifications for API request parameters.
| Field Name | Parameter | Technical Description |
|---|---|---|
| Face Reference Image | face_image | The face image should be clear and must be visiable till shoulder |
| Prompt | prompt | Text description of the image you want to generate |
| Style | style | Select style to get different style of output |
| Negative Prompt | negative_prompt | descriptio |
| Width | width | min & max is 512 |
| Height | height | min & max is 768 |
| Steps | num_inference_steps | Number of inference steps |
| base64 | base64 | Set to true if the provided face image is in base64 format or if you want your generated images as a base64 string. The default is false |
| safety_checker | safety_checker | Whether to run the safety checker |
| seed | seed | Seed for reproducible results |
| guidance_scale | guidance_scale | The scale for classifier-free guidance |
| s_scale | s_scale | Adjust the weight of the face structure , default:1 |
| samples | samples | The number of images to be returned in response |
| webhook | webhook | URL to receive POST notification upon completion |
| track_id | track_id | ID for webhook identification |