FLUX Lora Inpainting

42.00 credits/MP
ae_flux_lora_inpainting

Fill or replace masked areas of an image using a text prompt and optional style adapters.

Image
42.00 credits/MP

Pricing

42.00 AE credits per MP. Charge for successfully returned images. Round each image up to a whole MP, then sum. One MP is 1024 by 1024 pixels.

42.00 credits/MP

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.lorasarrayNo The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image. —
request_body.loras[].pathstringYesURL or the path to the LoRA weights.—
request_body.loras[].scalenumberNo The scale of the LoRA weight. This is used to scale the LoRA weight before merging it with the base model. 1
request_body.promptstringYesThe prompt to generate an image from.—
request_body.mask_urlstringYes The mask to area to Inpaint in. —
request_body.strengthnumberNoThe strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original.0.85
request_body.image_urlstringYesURL of image to use for inpainting. or img2img—
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.—
request_body.image_size.widthintegerNoThe width of the generated image.512
request_body.image_size.heightintegerNoThe height of the generated image.512
request_body.num_imagesintegerNoThe number of images to generate. This is always set to 1 for streaming output.1
request_body.accelerationenum (none | regular)NoAcceleration level for image generation. 'regular' balances speed and quality.none
request_body.output_formatenum (jpeg | png)NoThe format of the generated image.jpeg
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. 3.5
request_body.num_inference_stepsintegerNoThe number of inference steps to perform.28
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_lora_inpainting' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "enable_safety_checker": false,
      "guidance_scale": 3.5,
      "image_url": "https://file.gw.xnetwk.net/file/72e3789a-db19-4223-9896-5845d0cd9ee8.png",
      "mask_url": "https://file.gw.xnetwk.net/file/ffa8572b-467e-44b0-a064-b8597566aa86.png",
      "num_inference_steps": 30,
      "output_format": "png",
      "prompt": "One long flowing whale-like tail attached at the waistline: a smoothly tapering stem sweeping down and outward, ending in a wide fan-shaped fluke of three layered translucent indigo leaves with thin gaps. Painterly blue membrane, cyan rim light, chunky oil brush marks, hazy edges. Hand-painted concept art matching the dark blue silk gown, not 3d render.",
      "seed": 20261109,
      "strength": 0.95
    }
  }
}'
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": "4c84ec16-3f85-4c59-8419-6d5ecc333022"
}

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