FLUX Pulid

Usage-based pricing
ae_flux_pulid

Create images from a text prompt while preserving the identity of a person in a reference image.

ImageAvatar
Usage-based pricing

Pricing

The charge per call is (max(39.96 × generated image megapixels, 0)) AE credits. All applicable conditions are combined to calculate the total.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.seedinteger | unknownNo The same seed and the same prompt given to the same version of the model will output the same image every time. —
request_body.promptstringYesThe prompt to generate an image from.—
request_body.true_cfgnumberNoThe weight of the CFG loss.1
request_body.id_weightnumberNoThe weight of the ID loss.1
request_body.sync_modebooleanNoIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.false
request_body.image_sizeobject | stringNoThe size of the generated image.landscape_4_3
request_body.image_size.widthintegerNoThe width of the generated image.512
request_body.image_size.heightintegerNoThe height of the generated image.512
request_body.start_stepintegerNoThe number of steps to start the CFG from.0
request_body.guidance_scalenumberNo The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. 4
request_body.negative_promptstringNoThe prompt to generate an image from.""
request_body.max_sequence_lengthenum (128 | 256 | 512)NoThe maximum sequence length for the model.128
request_body.num_inference_stepsintegerNoThe number of inference steps to perform.20
request_body.reference_image_urlstringYesURL of image to use for inpainting.—
request_body.enable_safety_checkerbooleanNoIf set to true, the safety checker will be enabled.true

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit first, then query with the returned task_id until the task completes.

Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_flux_pulid' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "guidance_scale": 3,
      "id_weight": 1,
      "image_size": {
        "height": 1400,
        "width": 1050
      },
      "negative_prompt": "beauty filter, airbrushed skin, plastic smooth skin, porcelain doll face, idealized face, instagram face, heavy retouching, glowing skin, cgi, 3d render, hyperreal, glamour makeup, perfect symmetry, blank stare, blurry, text, watermark, colored background, casual clothes",
      "num_inference_steps": 30,
      "output_format": "jpeg",
      "prompt": "Unedited documentary portrait photograph of an Asian man in his mid-30s, a physician, waist-up composition, standing square to the camera, looking into the lens with a confident slight closed-mouth smile, wearing a dark navy suit jacket, white dress shirt and dark red silk necktie, black rectangular eyeglasses, short black hair, light moustache, plain white studio wall, shot on 35mm lens with natural even light, real photographic texture with visible skin pores, fine facial hair and subtle under-eye shadows, slightly uneven skin tone, no beauty retouching, no airbrushing, authentic candid professional photograph, head occupying about 30 percent of the frame height, no text, no watermark",
      "reference_image_url": "https://agentearth.ai/fileserver/file/1dde8222-ad78-470b-9294-44cac7dd0302.jpg",
      "seed": 550711
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "d2f19a9d-fb06-414e-bd39-22c82e4d567e"
}

This example shows part of the response. Copied content is valid JSON.