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
}
}For image-to-image generation with image-01 and image-01-live.
Public fields: model, prompt, subject_reference, aspect_ratio, width, height, response_format, seed, n, and prompt_optimizer. This document describes the JSON form of subject_reference.
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.
Model name used for this capability.
image-01, image-01-live Image editing prompt.
Subject reference data used to preserve character or object consistency in the generated result.
1Show child attributes
Target aspect ratio.
Target width.
Target height.
Response format. Use url for temporary download links or b64_json for Base64-encoded content.
url, b64_json Random seed.
Number of images to generate.
1 <= x <= 9Whether to enable prompt optimization.