Edit Image
Action ID: pml_edit_image
Description
Edit an image using a prompt.
Connection
PixelML Connection
The PixelML connection to use for the edit image.
True
pixelml
Input Parameters
prompt
string
✓
-
The prompt to edit the image
images
array
✓
-
The images to use for the edit (JPG/PNG)
temperature
number
-
0.9
Controls randomness (0-1). Lower values are more deterministic
max_tokens
integer
-
2048
Maximum tokens to generate (2048-4096)
top_p
number
-
1
Nucleus sampling parameter for token selection
Output Parameters
content
any
The edited image or response content from PixelML
How It Works
This node uses PixelML's AI-powered image editing capabilities to modify images based on text prompts. You provide one or more source images along with a descriptive prompt explaining the desired edits. The AI model processes the prompt and images, applying transformations such as style changes, object additions/removals, color adjustments, or content modifications. The temperature and token parameters control the creativity and output length of the generation process.
Usage Examples
Example 1: Change Image Style
Input:
prompt: "Make this image look like a watercolor painting"
images: ["https://example.com/photo.jpg"]
temperature: 0.7
max_tokens: 2048Output:
content: {
"url": "https://pixelml.com/edited/watercolor-image.png",
"format": "png"
}Example 2: Remove Background Objects
Input:
prompt: "Remove all people from this street scene"
images: ["https://example.com/street.jpg"]
temperature: 0.3
max_tokens: 2048Output:
content: {
"url": "https://pixelml.com/edited/empty-street.png"
}Example 3: Add Creative Elements
Input:
prompt: "Add autumn leaves falling in the background"
images: ["https://example.com/portrait.jpg"]
temperature: 0.9
max_tokens: 3000Output:
content: {
"url": "https://pixelml.com/edited/autumn-portrait.png"
}Common Use Cases
Product Photography: Modify product images by changing backgrounds, colors, or adding props
Photo Retouching: Remove unwanted objects, blemishes, or people from photographs
Creative Transformations: Apply artistic styles like oil painting, sketch, or cartoon effects
Image Composition: Add or modify elements within existing images based on text descriptions
Background Replacement: Change or enhance backgrounds while preserving foreground subjects
Color Grading: Adjust mood, tone, and color palette of images using natural language descriptions
Fashion and Design: Visualize clothing or design changes on existing product photos
Error Handling
Connection Failed
Invalid or missing PixelML connection credentials
Verify your PixelML connection is properly configured with valid API credentials
Invalid Image URL
Image URL is not accessible or invalid format
Ensure image URLs are publicly accessible and in JPG or PNG format
Prompt Too Vague
Editing prompt is unclear or ambiguous
Provide specific, descriptive prompts with clear editing instructions
Token Limit Exceeded
max_tokens set too high for the model
Reduce max_tokens to 2048 or check model limits
Unsupported Format
Image format not supported by PixelML
Convert images to JPG or PNG format before processing
Rate Limit Exceeded
Too many API requests in short period
Implement delays between requests or upgrade your PixelML plan
Processing Timeout
Complex edits taking too long to process
Simplify the editing prompt or reduce image resolution
Notes
Image Formats: Only JPG and PNG image formats are supported. Ensure your images are in one of these formats before processing.
Temperature Control: Lower temperature (0.0-0.3) produces more consistent, predictable edits. Higher temperature (0.7-1.0) generates more creative and varied results.
Prompt Specificity: The more specific and detailed your prompt, the better the results. Include information about style, mood, colors, and specific changes desired.
Image URLs: All image URLs must be publicly accessible. The PixelML service needs to download them for processing.
Token Management: Higher max_tokens allows for more complex edits but increases processing time and cost. Start with the default 2048 for most tasks.
Multiple Images: You can provide multiple images in the array, useful for batch processing or providing reference images for the editing style.
API Costs: Each edit operation consumes PixelML API credits. Monitor your usage to avoid unexpected costs.
Last updated
Was this helpful?