FLUX Lora
Usage-based pricing
ae_flux_lora
Generate images from a text prompt with optional custom style, character, or concept weights.
Usage-based pricing
Pricing
The charge per call is (max(42 × Generated image billable megapixels (each image rounded up), 0)) AE credits. All applicable conditions are combined to calculate the total.
Charges depend on the number and dimensions of images actually generated. Each image's megapixel count is rounded up separately, then summed for billing; multiple images are not covered by a fixed total price per call.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | No parameter description. | — |
request_body.seed | integer | unknown | No | The same seed and the same prompt given to the same version of the model will output the same image every time. | — |
request_body.loras | array | No | 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[].path | string | Yes | URL or the path to the LoRA weights. | — |
request_body.loras[].scale | number | No | The scale of the LoRA weight. This is used to scale the LoRA weight before merging it with the base model. | 1 |
request_body.prompt | string | Yes | The prompt to generate an image from. | — |
request_body.sync_mode | boolean | No | If `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_size | object | string | No | The size of the generated image. | landscape_4_3 |
request_body.image_size.width | integer | No | The width of the generated image. | 512 |
request_body.image_size.height | integer | No | The height of the generated image. | 512 |
request_body.num_images | integer | No | The number of images to generate. This is always set to 1 for streaming output. | 1 |
request_body.acceleration | enum (none | regular) | No | Acceleration level for image generation. 'regular' balances speed and quality. | none |
request_body.output_format | enum (jpeg | png) | No | The format of the generated image. | jpeg |
request_body.guidance_scale | number | No | 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_steps | integer | No | The number of inference steps to perform. | 28 |
request_body.enable_safety_checker | boolean | No | If 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-KeySubmit 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' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"image_size": {
"height": 1024,
"width": 1024
},
"num_images": 1,
"num_inference_steps": 28,
"prompt": "一只机械熊猫在雨夜的东京街头吃拉面,霓虹灯招牌上写着「深夜拉面」,电影感构图,地面反光,赛博朋克风格"
}
}
}'Response exampleresponse.json
{
"description": "task accepted; poll the result via query_tool with this task_id",
"query_tool": "ae_get_result",
"status": "created",
"task_id": "18cc9ecb-e38e-4c74-a6c7-1e0b5556ac05"
}
