Skip to main content
POST
/
image_editing
/
face_gen
Face generator
curl --request POST \
  --url https://modelslab.com/api/v6/image_editing/face_gen \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "prompt": "<string>",
  "face_image": "<string>",
  "width": 123,
  "height": 123,
  "num_inference_steps": 21,
  "guidance_scale": 10.5,
  "s_scale": 1,
  "samples": 1,
  "safety_checker": true,
  "safety_checker_type": "black",
  "base64": false,
  "style": "realistic",
  "webhook": "<string>",
  "track_id": 123
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {}
}
Image url generated will not be accessible after 24 hours, kindly save your image generations accordingly.

Facegen

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/face_gen' \

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/568d6320-8b6c-4af8-8725-51c0c9f633a3",  
  "width": "512",  
  "height": "512",  
  "samples": "1",  
  "num_inference_steps": "21",  
  "safety_checker": false,  
  "base64": false,  
  "seed": null,  
  "guidance_scale": 7.5,  
  "webhook": null,  
  "track_id": null
}

Body

application/json
key
string
required
prompt
string
required
face_image
string
required
width
integer
Required range: x <= 512
height
integer
Required range: x <= 768
num_inference_steps
enum<integer>
Available options:
21,
31,
41
guidance_scale
number
Required range: 1 <= x <= 20
s_scale
number
default:1
Required range: 0 <= x <= 2
samples
integer
Required range: x <= 2
safety_checker
boolean
safety_checker_type
enum<string>
Available options:
black,
blur,
sensitive_content_text,
pixelate
base64
boolean
default:false
style
enum<string>
default:realistic
Available options:
comic,
chibi,
3d,
anime,
realistic
webhook
string<uri>
track_id
integer

Response

200 - application/json
  • Option 1
  • Option 2
  • Option 3
status
enum<string>
Available options:
success
generationTime
number
id
integer
output
string<uri>[]
meta
object