curl --request POST \
--url https://api.powertokens.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "image-01-live",
"prompt": "Turn this portrait into a manga cover",
"subject_reference": [
{
"type": "character",
"image_file": "https://example.com/reference.png"
}
],
"response_format": "url",
"n": 1
}
'{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>"
}
],
"metadata": {
"provider_request_id": "<string>",
"provider_status_code": 123,
"provider_status_msg": "<string>",
"success_count": 123,
"failed_count": 123
}
}适用于 image-01 与 image-01-live 模型的图生图能力。
公开字段:model、prompt、subject_reference、aspect_ratio、width、height、response_format、seed、n、prompt_optimizer。subject_reference 在该文档中按 JSON 请求展开。
curl --request POST \
--url https://api.powertokens.ai/v1/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "image-01-live",
"prompt": "Turn this portrait into a manga cover",
"subject_reference": [
{
"type": "character",
"image_file": "https://example.com/reference.png"
}
],
"response_format": "url",
"n": 1
}
'{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>"
}
],
"metadata": {
"provider_request_id": "<string>",
"provider_status_code": 123,
"provider_status_msg": "<string>",
"success_count": 123,
"failed_count": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
当前能力使用的模型名称。
image-01, image-01-live 图像编辑提示词。
主体参考信息,用于约束生成结果中的人物或物体一致性。
1Show child attributes
目标宽高比。
目标宽度。
目标高度。
返回格式。使用 url 获取临时下载地址,使用 b64_json 获取 Base64 编码内容。
url, b64_json 随机种子。
期望返回的图片数量。
1 <= x <= 9是否启用提示词优化。