⚡ NEW: Flux Klein 9B — Faster inference, stunning quality · Try Now
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/flux_headshot \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"prompt": "<string>",
"face_image": "<string>",
"seed": 123,
"width": 123,
"height": 123,
"num_inference_steps": 25,
"guidance_scale": 5.5,
"webhook": "<string>",
"track_id": 123
}
'{
"status": "success",
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}This endpoint allows you to generate head shot with flux capabilities.
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/flux_headshot \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"prompt": "<string>",
"face_image": "<string>",
"seed": 123,
"width": 123,
"height": 123,
"num_inference_steps": 25,
"guidance_scale": 5.5,
"webhook": "<string>",
"track_id": 123
}
'{
"status": "success",
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}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.

POST request to below endpoint and pass the required parameters as a request body to the endpoint.
--request POST 'https://modelslab.com/api/v6/image_editing/flux_headshot' \
{
"key": "your_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://assets.modelslab.ai/generations/dadf8fb5-ee78-4038-b0d7-3dde65547217",
"width": "1024",
"height": "1024",
"num_inference_steps": "21",
"seed":null,
"guidance_scale": 7.5,
"webhook": null,
"track_id": null
}
Your API Key used for request authorization
Text prompt with description of the things you want in the image
Link or valid base64 string image for the face
Seed is used to reproduce results
Width of your generated image, If not provided, the width of face_image is used
x <= 1024Height of your generated image, If not provided, the height of face_image is used
x <= 1024Number of denoising steps
x <= 26Scale for classifier-free guidance
1 <= x <= 10URL to receive POST API call when complete
ID for webhook identification
Flux headshot response
success Time taken to generate the image in seconds
Unique identifier for the generation request
Array of generated image URLs
Array of proxy image URLs
Metadata about the generation process
Was this page helpful?