{ "model_id": "pruna/p-image-edit", "provider_id": "pruna", "name": "P-Image-Edit", "description": "Pruna's P-Image-Edit edits and composes 1-5 reference images with text instructions. It supports complex compositions, style transfers, and targeted edits with flexible output aspect ratios.", "task": "Image-to-Image", "tags": [ "Image Editing", "Image-to-Image", "Composition" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Per image": 0.01 }, "examples": [ { "name": "Watercolor Style", "description": "Apply a watercolor style transfer to a single reference image.", "input": { "prompt": "Transform the subject into a watercolor painting style with vibrant colors", "images": [ "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg" ], "aspect_ratio": "1:1" }, "output": { "image": "https://examples.aig.cloudflare.com/pruna/p-image-edit/watercolor-style.jpg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/pruna/p-image-edit/watercolor-style.jpg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'pruna/p-image-edit',\n {\n prompt: 'Transform the subject into a watercolor painting style with vibrant colors',\n images: ['https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg'],\n aspect_ratio: '1:1',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"pruna/p-image-edit\",\n \"input\": {\n \"prompt\": \"Transform the subject into a watercolor painting style with vibrant colors\",\n \"images\": [\n \"https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg\"\n ],\n \"aspect_ratio\": \"1:1\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": false, "zdr_comment": null, "external_info": "https://docs.api.pruna.ai/guides/quickstart", "terms": null, "cover_image_url": null, "metadata": { "Reference Images": "1-5", "Output Formats": "jpg" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "pruna", "pricing": { "output_image_count": 0.01 } } ], "banner": null, "created_at": "2026-06-18 15:48:19", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string", "description": "Text instruction describing the desired edit or composition." }, "images": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "type": "string" }, "description": "Array of 1-5 reference images. Each entry is an HTTP(S) URL or a base64 data URI (data:image/...;base64,...)." }, "turbo": { "default": true, "description": "Run faster with additional optimizations. For complicated tasks, it is recommended to turn this off.", "type": "boolean" }, "aspect_ratio": { "default": "match_input_image", "description": "Output aspect ratio.", "type": "string", "enum": [ "match_input_image", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3" ] }, "seed": { "description": "Random seed for reproducible generation.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "disable_safety_checker": { "default": false, "description": "Disable safety checker for generated images.", "type": "boolean" } }, "required": [ "prompt", "images", "turbo", "aspect_ratio", "disable_safety_checker" ], "additionalProperties": {} }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri", "description": "Presigned URL for the edited image." } }, "required": [ "image" ], "additionalProperties": {} } } }