Image Editing Reframe
48 credits/call
ae_image_editing_reframe
Reframe and crop an image to a chosen aspect ratio with content-aware composition.
48 credits/call
Pricing
48 credits/call
| Condition | Charge |
|---|---|
| Each call | 48 credits/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.image_url | string | Yes | URL of the old or damaged photo to restore. | — |
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.aspect_ratio | enum (21:9 | 16:9 | 4:3 | 3:2 | 1:1 | 2:3 | 3:4 | 9:16 | 9:21) | No | The desired aspect ratio for the reframed image. | 16:9 |
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.safety_tolerance | enum (1 | 2 | 3 | 4 | 5 | 6) | No | 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 | No | Number of inference steps for sampling. | 30 |
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_image_editing_reframe' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"aspect_ratio": "16:9",
"guidance_scale": 3.5,
"image_url": "https://agentearth.ai/fileserver/file/02db8275-0945-4e33-8206-2d02cc33fec5.png",
"num_inference_steps": 30,
"output_format": "jpeg",
"safety_tolerance": "2"
}
}
}'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": "0c9bee3a-811c-4a91-be34-1dc07de41134"
}






