Phota Edit

From 108 credits/call
ae_phota_edit

Edit one or more images using a text prompt, with optional reference profiles.

Image
From 108 credits/call

Pricing

From 108 credits/call
ResolutionCharge
1K / Not specified108 credits/image
4K216 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.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.promptstringYesText description of the desired image. To refer to specific profiles, use [[profile_id_1]], [[profile_id_2]], etc.—
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_urlsarrayYesList 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_imagesintegerNoNumber of images to generate.1
request_body.resolutionenum (1K | 4K)NoResolution of the generated image.1K
request_body.profile_idsarrayNoList of profile IDs to use for the image generation. Profiles may be tagged in the prompt as @Profile1, @Profile2, etc.—
request_body.aspect_ratioenum (auto | 1:1 | 16:9 | 4:3 | 3:4 | 9:16)NoAspect ratio of the generated image.auto
request_body.output_formatenum (jpeg | png | webp)NoThe format of the generated image.jpeg

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_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
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"
}