Image Tools
Analyze, interpret, and generate images for various workflows such as reporting, marketing, and visual storytelling.
Overview
Tool Name
Purpose
The image_analysis_and_generation_tools offer functionalities to analyze, interpret, and generate images. These tools enable extracting insights from visual data and creating new, customized images for use in various workflows such as reporting, marketing, visual storytelling, and automation.
Functions Available
-
_image_analysis
: Analyzes an image for its content and provides answers to queries about the image. -
image_generation
: Generates an image based on a descriptive prompt.
Key Features
Image Analysis
Analyze images to extract embedded text, objects, scenes, or other features.
Query-Based Insights
Respond to specific queries about the contents of an image.
Custom Image Generation
Generate custom images from textual prompts, supporting creative visual outputs.
Multi-Format Support
Enable multi-format image handling, including base64 or local file paths, for analysis and generation.
Input Parameters
_image_analysis | Analyze an Image for Content & Respond to Queries | |
---|---|---|
Input Parameters | Definition | Format |
query (Optional) | A question or query about the image (e.g., “What does this image contain?”). | String |
openai_file_id (Optional) | File ID of the image if already uploaded to OpenAI. | String |
file_name (Optional) | Local file path of the image to be analyzed. | String |
image_generation | Create a New Image Based on a Descriptive Prompt | |
---|---|---|
Input Parameters | Definition | Format |
prompt | A detailed description of the image to generate (e.g., “A futuristic cityscape with neon lights”). | String |
Output
-
Image Analysis
- Provides answers to queries about the image, including detected objects, text, and relevant metadata (dimensions, formats).
-
Image Generation
-
Produces a high-quality visual representation of the prompt.
-
Returns either a direct file link, a base64-encoded output, or a success confirmation with details for further use.
-
Genbot Tip
-
For text-based queries, consider using OCR capabilities in
_image_analysis
to extract textual content from images (e.g., scanned documents, receipts). -
Provide clear, specific prompts in
image_generation
to achieve the most accurate or creative outputs.
How It Works
For analysis, users submit an image file path or use the OpenAI file ID to analyze image content based on a specific query. The tool processes the visual data and responds with results—such as objects detected, text content, or basic metadata. For generation, users provide a descriptive prompt, and the tool returns a newly created image reflecting the specified scene or concept.
IMPORTANT NOTE
-
The quality and relevance of generated images depend on the clarity and specificity of the textual prompt.
-
Analysis of very complex images may yield partial insights or generic results.
-
Large or high-resolution images may slow processing; consider optimizing image sizes before analysis.
-
Generated images may not always adhere to real-world constraints, as they are creatively produced by the model.
_image_analysis
– Offers tools to interpret visual images and pictures.
Example on Streamlit
In this example, we’ll ask the Genbot to analyze an Entity-Relationship (ER) Diagram for a Hospital Management System.
Upon image analysis and understanding the content within, you can further ask the Genbot how you can use the data from the image to enrich the data in your database/ projects.
Example on GenesisAPI
Example on Slack
Call your Genbot with @mention and ask to use analyze_image
on your image of choice.
In this example, we’ll be calling on Stuart:
You can utilize the data your Genbot receives from analyzing an image to run a deeper analysis, especially if you have an existing data table that can use the information within the image.
Generate Image
Overview
image_generation
– Create images from textual descriptions using DALL-E 3.
How To Use
Call your Genbot with @mention and ask to generate an image of your choice.
Example on Streamlit
Example on GenesisAPI
Example on Slack
In this example, we’ll be making a headshot for Maaaarty: