🎉 New Year Sale: Get 20% OFF on all plans — Use code NEWYEAR2026.

Upgrade now
SDXL Headshot thumbnail

ModelsLab/SDXL Headshot

ai-avatar-generatorface-gen
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.
API PlaygroundAPI Documentation

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 NameParameterTechnical Description
Face Reference Imageface_imageThe face image should be clear and must be visiable till shoulder
PromptpromptText description of the image you want to generate
StylestyleSelect style to get different style of output
Negative Promptnegative_promptdescriptio
Widthwidthmin & max is 512
Heightheightmin & max is 768
Stepsnum_inference_stepsNumber of inference steps
base64base64Set 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_checkersafety_checkerWhether to run the safety checker
seedseedSeed for reproducible results
guidance_scaleguidance_scaleThe scale for classifier-free guidance
s_scales_scaleAdjust the weight of the face structure , default:1
samplessamplesThe number of images to be returned in response
webhookwebhookURL to receive POST notification upon completion
track_id track_idID for webhook identification