Skip to content
Developer Portal

P-Image-Edit

Edit and compose multiple images (1-5) with text instructions and flexible aspect ratios

P-Image-Edit is Pruna's premium image editing model that can work with 1-5 reference images simultaneously. It supports complex compositions, style transfers, and targeted edits with text instructions. You can select a primary reference image or let the model intelligently combine all inputs.

Rate Limit: 500 requests per minute

Category: Image Editing

Price: 0.01$ / image

Terminal window
curl -X POST "https://api.pruna.ai/v1/files" \
-H "apikey: YOUR_API_KEY" \
-F "content=@/path/to/your/file.jpg"

Note: Use -F (form) with @ prefix to upload a file from your local filesystem. The file path should be absolute or relative to your current directory.

Response:

{
"id": "fqadqq42xq",
"name": "test.jpg",
"content_type": "image/jpeg",
"size": 185093,
"etag": "\"14e9a51deaac6bee2dd8b5c52d7d0b5f\"",
"checksums": {
"sha256": "aa10d5d09bcee5cb5d854bd81899308b0cf0c0c50e29d4f00c2c06e51f0e2fe6"
},
"metadata": {
"content_length": 185093,
"width": 1344,
"height": 768
},
"created_at": "2025-01-08T18:51:26.729Z",
"expires_at": "2025-01-09T18:51:26.729Z",
"urls": {
"get": "https://api.pruna.ai/v1/files/fqadqq42xq"
}
}
Terminal window
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-edit' \
-d '{
"input": {
"prompt": "Transform the subject into a watercolor painting style",
"images": ["https://your-url.com/photo.jpg"],
"aspect_ratio": "1:1"
}
}'
Terminal window
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-edit' \
-H 'Try-Sync: true' \
-d '{
"input": {
"prompt": "Transform the subject into a watercolor painting style",
"images": ["https://your-url.com/photo.jpg"],
"aspect_ratio": "1:1"
}
}'
Terminal window
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-edit' \
-d '{
"input": {
"prompt": "Combine these images into a cohesive collage with a modern aesthetic",
"images": [
"https://your-url.com/image1.jpg",
"https://your-url.com/image2.jpg",
"https://your-url.com/image3.jpg"
],
"aspect_ratio": "16:9"
}
}'
ParameterTypeDescription
promptstringText instruction describing the desired edit or composition
imagesarray of stringsArray of 1-5 image URLs to use as reference
ParameterTypeDefaultDescription
turbobooleantrueRun faster with additional optimizations. For complicated tasks, it is recommended to turn this off
aspect_ratiostring"match_input_image"Output aspect ratio. Options: "match_input_image", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"
seedinteger(optional)Random seed for reproducible generation
disable_safety_checkerbooleanfalseDisable safety checker for generated images