About P-Image LoRA
P-Image LoRA edit takes a prompt, up to five image_urls and one LoRA, typically in about 11 seconds.
Call it with the model name pruna-ai/p-image-lora/edit on POST /jobs/createTask, from $0.012.
Introduction
P-Image LoRA Image editing changes one to five source images by instruction on P-Image-Edit from Pruna AI, with one optional LoRA for a specific edit style. Say what should change and what should stay; the result follows the first image's shape unless you pick a ratio.
Choose a mode by starting material
| What you have | Mode |
|---|---|
| one or more pictures to change | P-Image LoRA Image editing |
| a written description only | P-Image LoRA Text to image |
Key features
Edits by instruction
Outfits, light and framing change on request while faces and settings stay.
Up to five pictures at once
Two portraits taken separately came back as one scene with both faces kept. Refer to each picture by its number in the instruction.
Edit LoRAs
One LoRA trained for Qwen-Image-Edit can be loaded, such as a photo-to-anime or a next-shot LoRA. The instruction does most of the work; the LoRA steers the style of the change.
Request parameters
| Parameter | Required | Description |
|---|---|---|
aspect_ratio | No | The shape of the frame: wide, square or tall. 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 |
image_urls | Yes | Photos to edit or combine. Say in the prompt what each one adds. |
loras | No | Add LoRA weights compatible with this model to guide its style or character. Default: [] |
output_format | No | File type of the result. jpeg · png · webp · Default: jpeg |
prompt | Yes | Describe what you want to make. |
seed | No | Use the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647 |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per image |
|---|---|
| Standard | $0.012 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
Use cases
Wardrobe and light changes
Try outfits, times of day and colour grades on the same person and set without reshooting.
Group scenes from separate photos
Put people photographed apart into one frame for covers, posters or storyboards.
Restyling a set
Run a folder of photos through one edit LoRA, such as photo-to-anime, with the same instruction and seed.
Prompt guide & pro tips
Say what to keep
Name the parts that must survive, such as the face, the hair or the room, then describe the change. Unnamed details may drift.
Number your images
With several sources write 'the woman from image 1 and the man from image 2'. The output takes the first image's shape unless you set a ratio.
Use the LoRA's phrase
Edit LoRAs are trained with a fixed phrase, such as 'Next Scene:' or 'transform into anime'. Put it at the start of the instruction.
Leave LoRAs out for plain edits
A plain instruction works without any LoRA. Load one only when you want its particular style; LoRAs for text-to-image models fail here.
API quick start
Call the P-Image LoRA API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model pruna-ai/p-image-lora/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "pruna-ai/p-image-lora/edit",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"image_urls": [
"https://media.popnow.ai/influencer/examples/marco.webp"
],
"output_format": "jpeg"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
About the P-Image LoRA Edit Image endpoint
The edit endpoint loads LoRAs made for Qwen Image Edit, not P-Image text LoRAs.
It can produce the next shot of a scene, such as a closer view of a character from a wide still, keeping the setting.
Combining people from two photos into one image works when each photo is named in the prompt.
Its speed makes it suitable for interactive editing where users try several instructions in a row.
P-Image LoRA API questions
How much does the P-Image LoRA API cost?
P-Image LoRA starts at $0.012 per image with Edit Image, its lowest-priced task. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What are the limits of the P-Image LoRA · Edit Image API?
Aspect ratios: 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3; Reference images: 5; Prompt length (characters): 5,000; Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.
More about P-Image LoRA
- Endpoints
- P-Image LoRA · Create Image
