P-Image-Edit
Edit and compose multiple images (1-5) with text instructions and flexible aspect ratios
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: 250 requests per minute
Category: Image Editing
Price: 0.01$ / image
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"
}
}
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"
}
}'
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"
}
}'
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"
}
}'
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text instruction describing the desired edit or composition |
| images | array of strings | Array of 1-5 image URLs to use as reference |
| Parameter | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | string | "match_input_image" | Output aspect ratio. Options: "match_input_image", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3" |
| seed | integer | (optional) | Random seed for reproducible generation |
| disable_safety_checker | boolean | false | Disable safety checker for generated images |