



const fs = require('fs');
const path = require('path');
const main = async () => {
const response = await fetch('https://api.ai.cc/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer ',
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'A jellyfish in the ocean',
model: 'imagen-3.0-generate-002',
}),
}).then((res) => res.json());
response['data'].forEach((image, i) => {
const buffer = Buffer.from(image['url'], 'base64');
fs.writeFileSync(path.join(__dirname, `image_${i + 1}.png`), buffer);
});
};
main();
import requests
def main():
response = requests.post(
"https://api.ai.cc/v1/images/generations",
headers={
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
json={
"prompt": "A jellyfish in the ocean",
"model": "imagen-3.0-generate-002",
},
)
response.raise_for_status()
data = response.json()
for i, image in enumerate(data["data"]):
with open(f"image_{i+1}.png", "wb") as f:
f.write(base64.b64decode(image["url"]))
if __name__ == "__main__":
main()
-
AI Playground

Test all API models in the sandbox environment before you integrate.
We provide more than 300 models to integrate into your app.


Product Detail
✨ Introduction to Imagen 3
Imagen 3 is Google's cutting-edge text-to-image AI model, revolutionizing how we create photorealistic images from simple text descriptions. Released in July 2024, this version builds upon its predecessors by offering unparalleled detail, lighting, and an astonishing reduction in visual artifacts. It sets a new standard for natural language understanding and introduces significantly improved text rendering within images, opening up a world of creative possibilities.
"Imagen 3 is Google's latest text-to-image AI model, designed to generate high-quality, photorealistic images from text descriptions with improved detail, lighting, and fewer artifacts."
— Quoted from Original Imagen 3 Description
🔑 Key Features of Imagen 3
- ✨ High-Quality Image Generation: Creates realistic images with exceptional detail, richer lighting, and minimal visual artifacts.
- 💡 Enhanced Natural Language Understanding: Significantly improved ability to interpret complex prompts, reducing the need for elaborate prompt engineering.
- ✍️ Better Text Rendering: Delivers superior text rendering within generated images, expanding creative applications.
- 🧠 Contextual Awareness & Coherence: Employs a sophisticated scene composition mechanism to ensure logical coherence in generated images.
- 🔍 Higher Resolution & Realism: Generates ultra-high-definition images that are virtually indistinguishable from real photographs.
🎯 Intended Use Cases
Imagen 3 is ideal for generating realistic images from text descriptions across various applications, including marketing, advertising, design, and creative projects. It's perfectly suited for businesses requiring tailored visuals and developers building applications that demand high-quality image generation capabilities.
⚙️ Technical Details
- Architecture: Leverages a deep learning approach, combining a language model (like Google’s T5) with a generative adversarial network (GAN) or diffusion model.
- Training Data: Trained on massive datasets of text-image pairs, with enriched captions to capture finer nuances.
- Diversity & Bias: Incorporates extensive filtering and data labeling to minimize harmful content in the training dataset, ensuring responsible AI generation.
📈 Performance Metrics
- Visual Quality: Achieves the highest scores for visual quality, producing appealing and largely artifact-free images.
- Prompt Accuracy: Demonstrates high accuracy in responding to complex prompts.
📊 Comparison to Other Models
Human evaluation on GenAI-Bench consistently shows Imagen 3's superior performance in overall preference benchmarks against other leading models.


🚀 Getting Started with Imagen 3
Code Samples:
Integrate Imagen 3 into your applications using the provided code snippets. Images generated will be saved directly to your computer.
<snippet data-name="image.gemini" data-model="imagen-3.0-generate-002"></snippet>
Parameters for Image Generation:
- num_images [int]: Specifies the number of images to generate.
- seed [int]: Sets the random seed for reproducible image generation.
- enhance_prompt [boolean]: Optional parameter to utilize an LLM-based prompt rewriting feature for higher quality images that better align with the original prompt's intent. Disabling this may affect image quality and adherence.
- convert_base64_to_url [boolean]: If true, the image URL will be returned; otherwise, the image file will be provided in base64 format.
- aspect_ratio [1:1, 9:16, 16:9, 3:4, 4:3]: Defines the aspect ratio for the generated image.
- person_generation [dont_allow, allow_adult]: Controls the generation of people by the model.
- safety_setting [block_low_and_above, block_medium_and_above, block_only_high]: Adds a filter level to safety mechanisms.
Expected Response Format:
Upon successful generation, you will receive a JSON response similar to this:
{
"data": [
{
"mime_type": "image/png",
"url": "base64image / url",
"prompt": "enhanced prompt"
}
]
}
The model is readily available on the AI/ML API platform under the name "Imagen 3".
Comprehensive API Documentation:
Detailed API Documentation is available for developers seeking in-depth information.
🛡️ Ethical Guidelines & Responsible AI
- Safety First: Developed with paramount safety and responsibility in mind, strictly adhering to Google’s AI Principles.
- Digital Watermarking (SynthID): Includes SynthID to clearly identify AI-generated content, promoting transparency.
- Harmful Content Prevention: Employs advanced safety filters to rigorously prevent the generation of harmful content.
- Data Governance: Utilizes robust data governance policies, ensuring customer data is never used for training purposes.
📄 Licensing & Usage
When using Imagen 3, it is crucial to comply with Google's responsible AI and usage guidelines. For specific scenarios, such as generating images containing people, additional approvals from Google might be required. If your project involves creating such images, ensure you follow the necessary approval processes.
Access the Imagen 3 API and begin your creative journey here.
❓ Frequently Asked Questions (FAQ)
-
Q1: What is Imagen 3?
A1: Imagen 3 is Google's latest text-to-image AI model, released in July 2024, designed to generate high-quality, photorealistic images from text descriptions with enhanced detail, lighting, and natural language understanding.
-
Q2: How does Imagen 3 improve upon previous versions?
A2: It offers superior image quality, richer lighting, fewer visual artifacts, better understanding of complex prompts, improved text rendering within images, and higher resolution generation.
-
Q3: Can I use Imagen 3 for commercial projects?
A3: Yes, Imagen 3 is intended for various applications including marketing, advertising, and design. However, specific uses like generating images of people may require additional approvals from Google.
-
Q4: What measures are in place for ethical AI usage?
A4: Imagen 3 incorporates digital watermarking (SynthID), employs safety filters to prevent harmful content, and follows robust data governance policies, aligning with Google's AI Principles.
-
Q5: Where can I access the Imagen 3 API?
A5: The Imagen 3 API is available on the AI/ML API platform. You can find detailed API documentation here.
Learn how you can transformyour company with AICC APIs



Log in