Image Editing Background Change
48积分/次
ae_image_editing_background_change
将图片背景替换为提示词中描述的新场景。
48积分/次
价格说明
48积分/次
工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
request_body | object | 是 | 暂无参数说明。 | — |
request_body.seed | integer | unknown | 否 | The same seed and the same prompt given to the same version of the model will output the same image every time. | — |
request_body.prompt | string | 否 | The desired background to apply. | beach sunset with palm trees |
request_body.image_url | string | 是 | Image prompt for the omni model. | — |
request_body.sync_mode | boolean | 否 | 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.aspect_ratio | string | unknown | 否 | The aspect ratio of the generated image. | — |
request_body.output_format | enum (jpeg | png) | 否 | The format of the generated image. | jpeg |
request_body.guidance_scale | number | 否 | 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.safety_tolerance | enum (1 | 2 | 3 | 4 | 5 | 6) | 否 | The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. | 2 |
request_body.num_inference_steps | integer | 否 | Number of inference steps for sampling. | 30 |
调用示例
提交任务并查询完成结果
POST
/agent-api/v1/tool/executeX-Api-Key先提交任务,再用返回的 task_id 查询,直至完成。
请求代码request.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_image_editing_background_change' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"aspect_ratio": "9:16",
"image_url": "https://d.uguu.se/inPcpTMx.jpg",
"num_inference_steps": 30,
"output_format": "jpeg",
"prompt": "Professional ID photo background: replace the background with a smooth light blue studio gradient backdrop (lighter at bottom, standard Chinese ID photo blue). Keep the girl, her face, hair, pink jacket and purple headband exactly unchanged with clean natural edges. Remove any stray clothing or objects floating in the background area.",
"safety_tolerance": "2"
}
}
}'返回示例response.json
{
"description": "task accepted; poll the result via query_tool with this task_id",
"query_tool": "ae_get_result",
"status": "created",
"task_id": "5a059fb8-65ae-422b-af50-c9e221cfdbe4"
}





