Phota Edit
From 108 credits/call
ae_phota_edit
Edit one or more images using a text prompt, with optional reference profiles.
From 108 credits/call
Pricing
From 108 credits/call
| Resolution | Charge |
|---|---|
| 1K / Not specified | 108 credits/image |
| 4K | 216 credits/image |
An omitted image count is charged as one image. Starting price applies to Resolution: 1K.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | No parameter description. | — |
request_body.prompt | string | Yes | Text description of the desired image. To refer to specific profiles, use [[profile_id_1]], [[profile_id_2]], etc. | — |
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_urls | array | Yes | List of URLs/ Base64 data URIs of the images to edit. A maximum of 10 images are supported, additional images will be ignored. | — |
request_body.num_images | integer | No | Number of images to generate. | 1 |
request_body.resolution | enum (1K | 4K) | No | Resolution of the generated image. | 1K |
request_body.profile_ids | array | No | List of profile IDs to use for the image generation. Profiles may be tagged in the prompt as @Profile1, @Profile2, etc. | — |
request_body.aspect_ratio | enum (auto | 1:1 | 16:9 | 4:3 | 3:4 | 9:16) | No | Aspect ratio of the generated image. | auto |
request_body.output_format | enum (jpeg | png | webp) | No | The format of the generated image. | jpeg |
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_phota_edit' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"aspect_ratio": "3:4",
"image_urls": [
"https://agentearth.ai/fileserver/file/b85d880f-257b-4271-85dd-50d23bd60707.jpg"
],
"num_images": 1,
"output_format": "jpeg",
"prompt": "严格基于原图人物制作中国居民身份证证件照(一寸竖版3:4)。身份锁定:必须与原图是同一个人,脸型宽度、下颌轮廓、眉毛形状、眼睛大小与眼型、鼻翼宽度、嘴唇厚度与嘴型、肤色全部与原图保持一致;严禁瘦脸、严禁削下巴、严禁放大眼睛、严禁改变唇形与鼻子,不做任何美颜,保留真实皮肤纹理与毛孔。仅允许以下改变:①背景改为纯净白色,无阴影无杂物;②正面平视、双肩端正、头居中,拍到头顶到胸口以上,头部占画面约60%-70%;③头发梳理整齐,刘海分开不遮挡眉毛,两侧头发别到耳后露出双耳;④表情自然中性、闭唇不露齿;⑤穿深色简约有领衬衫;⑥不戴眼镜帽子和首饰,光线均匀柔和,专业照相馆质感。",
"resolution": "1K"
}
}
}'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": "8354de75-6342-49ff-89b6-b06dcb513860"
}






