Skip to main content
POST
/
v1
/
images
/
edits
Image-01 Image Editing
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
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model name used for this capability.

Available options:
image-01,
image-01-live
prompt
string
required

Image editing prompt.

subject_reference
object[]
required

Subject reference data used to preserve character or object consistency in the generated result.

Minimum array length: 1
aspect_ratio
string

Target aspect ratio.

width
integer

Target width.

height
integer

Target height.

response_format
enum<string>

Response format. Use url for temporary download links or b64_json for Base64-encoded content.

Available options:
url,
b64_json
seed
integer<int64>

Random seed.

n
integer

Number of images to generate.

Required range: 1 <= x <= 9
prompt_optimizer
boolean

Whether to enable prompt optimization.

Response

Success, returns unified image response structure.

created
integer<int64>
data
object[]
metadata
object