Introduction
P-H3-Image Image Editing uses the first picture as its source and accepts up to eight additional reference images. A text instruction tells the model which elements to retain or replace.
Key features & highlights
Address the source as <Picture 1> and the next input as <Picture 2>. The default output shape follows the first picture; selecting aspect_ratio overrides it. All five resolution tiers are available for edits. In our tests one 4k edit returned 3360 x 5024 pixels.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Supply a required edit instruction with no default. State the change and what should remain, naming numbered pictures when combining sources. at least 1 characters · at most 5000 characters |
image_urls | Yes | Required ordered list of 1–9 image URLs, with no default source. at least 1 items · at most 9 items |
aspect_ratio | No | Omit this optional field to inherit the first picture's ratio. Override it with any of the 15 supported choices, from 1:3 to 3:1 and including 9:21 and 21:9; no ratio fee applies. |
resolution | No | An edit defaults to 1k, about 1 megapixel. Alternatives are 1.5k (~2.4 MP), 2k (~4 MP), 3k (~9.4 MP) and 4k (~16.8 MP); moving tiers changes the image charge. |
output_format | No | Save the edit as jpeg unless you request png or webp. These three encodings are priced alike. |
seed | No | You may supply a random-source value when comparing edits; none is required by default. |
Pricing
The edited result has a per-image tier charge covering 1k, 1.5k, 2k, 3k or 4k. Each input image after the first adds a small fee; output ratio and encoding add none. A failed request is not billed.
| Specification | Price |
|---|---|
| $0.03 / image |
| $0.048 / image |
| $0.066 / image |
| $0.138 / image |
| $0.21 / image |
Use cases
Use one portrait for a new outfit and seaside setting, or combine a stage photograph with a replacement performer. Our single-source and two-source tests retained the requested identity through scene changes.
Prompt guide & pro tips
Place the scene to keep in the first slot, then say which details come from each numbered input. Reversing that order gave a result closer to the other scene in our tests. Every reference beyond the first adds a small charge. Pruna AI says lower resolutions can show more detail artifacts.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "pruna-ai/p-h3-image/edit",
"input": {
"image_urls": [
"https://example.com/reference.png"
],
"output_format": "jpeg",
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"resolution": "1k"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.




