Codeformer
2.52 credits/MP
ae_codeformer
Restore and enhance faces in photos, with options for face alignment, facial upscaling, and detail preservation.
2.52 credits/MP
Pricing
2.52 AE credits per MP. Charge for successfully returned images. Charge proportionally to actual pixels. One MP is 1024 by 1024 pixels.
2.52 credits/MP
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 | Random seed for reproducible generation. | — |
request_body.aligned | boolean | No | Should faces etc should be aligned. | false |
request_body.fidelity | number | No | Weight of the fidelity factor. | 0.5 |
request_body.image_url | string | Yes | URL of image to be used for relighting | — |
request_body.face_upscale | boolean | No | Should faces be upscaled | true |
request_body.upscale_factor | number | No | Upscaling factor | 2 |
request_body.only_center_face | boolean | No | Should only center face be restored | false |
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_codeformer' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"aligned": true,
"face_upscale": true,
"fidelity": 0.6,
"image_url": "https://agentearth.ai/fileserver/file/16e6f30d-e27a-4484-8018-829053d1ea9a.jpg",
"only_center_face": false,
"upscale_factor": 1
}
}
}'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": "838b51cf-d25c-4cd2-b1a5-161316005e88"
}






