ModelsLab/Flux Headshot
flux-headshotGenerate ultra-realistic headshots instantly with advanced image generation and facial optimization, supporting resolutions up to 1024x1024.
API Endpoint URL
Base URL for all API requests to this endpoint.
https://modelslab.com/api/v6/image_editing/flux_headshot
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
{"prompt": "a beautiful woman, wearing pirate costume, on pirate boat, ocean in the background","face_image": "https://assets.modelslab.com/generations/373b4973-c74b-4096-9fa9-51558f463b7d","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","width": "1024","height": "1024","num_inference_steps": "21","seed": "0","guidance_scale": "7.5","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 |
|---|---|---|
| prompt | 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 | face_image | Required. Link or valid base64 string image. This is the face you want your generations to resemble. |
| negative_prompt | negative_prompt | Negative Prompt |
| width | width | Width of your generated image, If not provided, the width of face_image is used Required range: x <= 1024 |
| height | height | Height of your generated image, If not provided, the height of face_image is used Required range: x <= 1024 |
| num_inference_steps | num_inference_steps | Number of denoising steps Required range: x <= 26 |
| seed | seed | Seed is used to reproduce results |
| guidance_scale | guidance_scale | Scale for classifier-free guidance Required range: 1 <= x <= 10 |
| webhook | webhook | URL to receive POST API call when complete |
| track_id | track_id | ID for webhook identification |