POST
/
image_editing
/
flux_headshot
Flux head shot generator
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>",
  "width": 123,
  "height": 123,
  "num_inference_steps": 25,
  "guidance_scale": 5.5,
  "seed": 123,
  "webhook": "<string>",
  "track_id": 123
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {}
}

Flux Headshot

Face gen endpoint result

Request

Make a POST request to below endpoint and pass the required parameters as a request body to the endpoint.
curl
--request POST 'https://modelslab.com/api/v6/image_editing/flux_headshot' \

Body

json
{  
   "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.com/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
}

Body

application/json
key
string
required

Your API Key used for request authorization

prompt
string
required

Text prompt with description of the things you want in the image

face_image
string
required

Link or valid base64 string image for the face

seed
integer
required

Seed is used to reproduce results

width
integer

Width of your generated image, If not provided, the width of face_image is used

Required range: x <= 1024
height
integer

Height of your generated image, If not provided, the height of face_image is used

Required range: x <= 1024
num_inference_steps
integer

Number of denoising steps

Required range: x <= 26
guidance_scale
number

Scale for classifier-free guidance

Required range: 1 <= x <= 10
webhook
string<uri>

URL to receive POST API call when complete

track_id
integer

ID for webhook identification

Response

200 - application/json

Flux headshot response

status
enum<string>
Available options:
success
generationTime
number

Time taken to generate the image in seconds

id
integer

Unique identifier for the generation request

output
string<uri>[]

Array of generated image URLs

Array of proxy image URLs

meta
object

Metadata about the generation process