Instant Character
Usage-based pricing
ae_instant_character
Create new images of a character or subject from a reference photo and text prompt while keeping them visually consistent.
Usage-based pricing
Pricing
The charge per call is (max(120 × total generated image megapixels, 0)) AE credits. All applicable conditions are combined to calculate the total.
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.scale | number | No | The scale of the subject image. Higher values will make the subject image more prominent in the generated image. | 1 |
request_body.prompt | string | Yes | The prompt to generate an image from. | — |
request_body.image_url | string | Yes | The image URL to generate an image from. Needs to match the dimensions of the mask. | — |
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_size | object | string | No | The size of the generated image. | square_hd |
request_body.image_size.width | integer | No | The width of the generated image. | 512 |
request_body.image_size.height | integer | No | The height of the generated image. | 512 |
request_body.num_images | integer | No | The number of images to generate. | 1 |
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.negative_prompt | string | No | The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution). | "" |
request_body.num_inference_steps | integer | No | The number of inference steps to perform. | 28 |
request_body.enable_safety_checker | boolean | No | If set to true, the safety checker will be enabled. | true |
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_instant_character' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"enable_safety_checker": true,
"guidance_scale": 4.5,
"image_size": "portrait_16_9",
"image_url": "https://agentearth.ai/fileserver/file/ad10a9a7-815f-4435-b5b3-9b160ee77016.jpg",
"num_images": 2,
"num_inference_steps": 35,
"output_format": "png",
"prompt": "全身正面站立的年轻亚洲女生,长相与参考图中的人物完全一致:圆润柔和的鹅蛋脸、脸颊略有肉感、大而明亮眼睛、深棕色瞳孔、自然深色平眉、小巧鼻子、丰满嘴唇带温柔浅笑,长直黑发加空气刘海;肤色极白、白皙透亮。她正面朝镜头直立,从头到脚全身入镜,赤足。穿着青绿到白色的渐变飘逸汉服纱裙,宽大透明长袖,袖摆与裙摆上有粉色桃花刺绣,青绿色宽腰封配金色流苏吊坠,裙摆外层为菱形网格薄纱。修身收腰版型,凸显纤细腰肢与凹凸有致的女性身材曲线,露肩方领展现白皙锁骨,身姿优雅妩媚。浅米色影棚背景,柔和自然光,高清时尚人像摄影,无文字。",
"scale": 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": "077675cd-a0bb-4090-8587-af50616cd00a"
}This example shows part of the response. Copied content is valid JSON.







