Get Image
Retrieves details and metadata of an uploaded image by its ID.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Connection Id (String) - Connection ID from the Connect node (optional if API Key credentials are provided directly).
- Image ID (String) - ID of the uploaded image to retrieve (from Upload Image node).
Options
- API Key - Leonardo AI API key (optional if using Connection ID).
Outputs
- Image (Object) - Image details and metadata including:
- Image ID
- URL to access the image
- Upload timestamp
- Image dimensions
- File format
- Other metadata
How It Works
The Get Image node retrieves information about an uploaded image. When executed, the node:
- Validates the image ID is not empty
- Sends a request to Leonardo AI API to fetch image details
- Returns the complete image object with metadata
Requirements
- Valid Leonardo AI API key (via Connection ID or credentials)
- Valid image ID from an Upload Image node
Error Handling
The node will return specific errors in the following cases:
- Empty image ID - "Image ID cannot be empty. Please provide a valid image ID."
- API error - "Failed to retrieve image. API error:
{details}" - Image not found - API returns 404 if image doesn't exist
Usage Examples
Verify Upload Success
Check if an image was uploaded successfully:
- Upload Image and get the image ID
- Use Get Image with the image ID
- Verify the image object contains valid URL and metadata
- Proceed with using the image in generation
Get Image URL
Retrieve the URL of an uploaded image:
// After calling Get Image
const image = $.image;
const imageUrl = image.url;
// Use the URL to download or display the image
Validate Image Before Use
Check image properties before generation:
- Upload Image
- Get Image with the returned ID
- Check dimensions and format
- If valid, proceed with Create Generation
List and Inspect Images
Build an inventory of uploaded images:
- Keep track of uploaded image IDs
- Loop through IDs and call Get Image for each
- Compile a list with URLs and metadata
- Use for image management or cleanup
Usage Notes
- Use this node to verify successful uploads
- The image object includes the URL where the image can be accessed
- Image IDs remain valid until the image is deleted
- Useful for debugging upload issues
- Can be used to retrieve image URLs for downloading
- Metadata includes upload timestamp and file information
- The image URL can be used outside of Leonardo AI workflows
- Consider caching image details if you need to reference them multiple times