Fetch Stock Image with ID
The "Fetch Stock Image with ID" step allows you to retrieve a specific stock image using its unique identifier. This is particularly useful when you've previously identified an image you want to use and need to fetch it directly without performing a new search.
How to Configure the Fetch Stock Image with ID Step
Configuring the step requires setting the parameters shown below:
[IMAGE: Screenshot of the Fetch Stock Image with ID step configuration panel]
Image ID
Enter the unique identifier of the stock image you want to retrieve. This ID is typically obtained from a previous "Search Stock Images" step or from the stock image provider directly.
You can use Liquid syntax to dynamically reference an image ID from a previous step:
Image Size (Optional)
Select the desired size of the image you want to retrieve:
Original
Large
Medium
Small
This allows you to control the resolution and file size of the retrieved image based on your specific needs.
Output Format
The Fetch Stock Image with ID step returns a JSON object containing details about the retrieved image:
[IMAGE: Screenshot showing an example of the fetch results in the AirOps interface]
How to Use the Results
You can access the image properties in subsequent workflow steps using Liquid syntax. For example:
This will reference the download URL of the fetched image.
Common Use Cases
Retrieving specific images for content creation
Generating consistent visuals across multiple workflow runs
Creating template-based content with predefined images
Building image libraries for specific projects or campaigns
How to Continue if the Fetch Fails
By default, the Fetch Stock Image with ID step will terminate the workflow if it fails. To continue the workflow if the step fails, click "Continue" at the bottom of the settings panel.
[IMAGE: Screenshot showing the "Continue" option in the step settings]
The step will return the following keys when it fails:
output
: this will benull
error
:message
: the message returned from the stepcode
: the error code representing the error
Example Workflow
Here's a common pattern using the Fetch Stock Image with ID step:
First, use the "Search Stock Images" step to find images related to your topic
Use an LLM step to analyze and select the best image, outputting its ID
Use the "Fetch Stock Image with ID" step to retrieve the selected image at the desired size
Incorporate the image into your final content using the download URL
This approach allows you to first search broadly, then make a specific selection, and finally retrieve the exact image you need at the optimal quality for your use case.
Last updated
Was this helpful?