Imagen 3
imagen-3
Google's highest quality text-to-image model, Imagen-3 is capable of generating images with detail, rich lighting and beauty
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.

Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "imagen-3","version": "0.0.1","input": {"prompt": "your prompt here","aspect_ratio": "1:1","negative_prompt": "your negative prompt here","safety_filter_level": "block_medium_and_above"}})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~15 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Imagen 3 is a text-to-image generative model developed by Google Deepmind to produce high-quality images from textual descriptions. It excels in understanding natural language prompts and generating images with enhanced detail, lighting, and reduced artifacts. The Imagen 3 supports various artistic styles, ranging from photorealism to abstract art.
Technical Specifications
- Architecture: Imagen 3 employs a latent diffusion model, enabling efficient and high-quality image generation from text prompts.
- Training Data: The Imagen 3 is trained on a diverse dataset comprising various image styles and subjects, enhancing its ability to generate a wide range of visuals.
- Resolution: Capable of producing images with high resolution, capturing fine details and textures.
- Language Understanding: Enhanced natural language processing allows for better comprehension of complex prompts, resulting in more accurate image representations.
Key Considerations
Content Sensitivity: While the Imagen 3 includes safety filters, always review generated images to ensure they meet content standards, especially in sensitive contexts.
Prompt Specificity: Overly complex or ambiguous prompts may lead to unexpected results. Strive for clarity and specificity in your descriptions.
Legal Information for Imagen 3
By using this Imagen 3, you agree to:
Tips & Tricks
Optimizing Prompts for Imagen 3:
- Clarity: Use clear and concise language to describe the desired image.
- Detail: Incorporate specific details such as colors, lighting, and composition to guide Imagen 3.
- Style Specification: Mention the desired artistic style (e.g., "watercolor painting," "digital art") to influence the output.
Negative Prompt Usage:
- Exclusion: Clearly state elements to avoid in the negative_prompt to prevent their inclusion.
- Testing: Experiment with different negative prompts to see their impact on the generated image.
Aspect Ratio Selection:
- Purpose Alignment: Choose an aspect ratio that fits the intended use of the image (e.g., 16:9 for widescreen displays).
- Consistency: Maintain consistent aspect ratios when generating images for a cohesive look.
Safety Filter Configuration:
- Contextual Adjustment: Set the safety_filter_level based on the context and audience of the images.
- Review: Even with filters, always review images to ensure appropriateness.
Capabilities
Diverse Style Generation: Produces images across various styles, including photorealistic, illustrative, and abstract art.
High-Resolution Output: Generates detailed images suitable for professional and creative use cases.
Natural Language Comprehension: Understands and interprets detailed textual descriptions to create corresponding visuals.
What can I use for?
Creative Design: Assists artists and designers in visualizing concepts and generating inspiration.
Marketing Materials: Generates visuals for advertising, social media, and promotional content.
Educational Resources: Creates illustrative content to support learning materials and presentations.
Things to be aware of
Style Exploration: Experiment with different artistic styles by specifying them in your prompts.
Detail Variation: Adjust the level of detail in prompts to see how Imagen 3 interprets and represents various complexities.
Negative Prompt Testing: Use the negative_prompt to refine images by excluding certain elements and observe the changes.
Limitations
Complex Scenes: Imagen 3 may struggle with highly complex scenes involving numerous interacting elements.
Text Generation: Rendering legible text within images can be challenging and may not always be accurate.
Abstract Concepts: Interpreting and visualizing highly abstract or conceptual prompts may lead to unpredictable results.
Output Format: PNG