Skip to main content
POST
Generate image with P-Image Edit

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text instruction describing the desired edit or composition.

reference_images
string[]
required

Reference images to edit or compose (1-3). Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads.

Maximum array length: 3
aspect_ratio
enum<string>
default:match_input_image

Output aspect ratio. Defaults to matching the first reference image.

Available options:
match_input_image,
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
num_images
integer
default:1

Number of images to generate. This model returns a single image per request.

Required range: 1 <= x <= 1
seed
integer

Seed for reproducible generation. Omit for random.

Response

Job accepted.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout