API
If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/imagen"
# Request payload
data = {
"prompt": " White fluffy bear toy is sleeping in a children's room, on the floor of a baby bedroom with toy boxes and toys around, in the style of photorealistic 3D rendering",
"aspect_ratio": "1:1",
"safety_filter_level": "BLOCK_LOW_AND_ABOVE",
"person_generation": "ALLOW_ADULT"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Prompt to render
Changes the aspect ratio of the generated image..
Allowed values:
Adds a filter level to safety filtering.
Allowed values:
Allow the model to generate images of people.
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Imagen 3
Imagen 3 is Google DeepMind's most advanced text-to-image model, designed to generate images with exceptional detail, richer lighting, and fewer distracting artifacts compared to previous models.
Key Features of Imagen 3
-
Superior Image Quality: Delivers visually rich, high-quality images with excellent lighting and composition.
-
Enhanced Detail: Accurately renders fine details like wrinkles and complex textures.
-
Better Color Balance: Achieves improved overall color balance through several model advancements.
-
Diverse Art Styles: Renders various art styles with greater accuracy, including photo realism, impressionism, abstract, and anime.
-
Greater Versatility and Prompt Understanding: Understands prompts written in natural, everyday language, reducing the need for complex prompt engineering. It captures small details from longer, complex prompts.
-
High-Fidelity Detail: Produces richer textures and enhanced details for more visually compelling images.
-
Improved Text Rendering: Significantly enhanced text rendering capabilities for applications like stylized birthday cards and presentation
Technical Specifications
-
Training Data: Trained on detailed captions for each image to capture nuances like specific camera angles or compositions in long, complex prompts.
-
Benchmarks: Human evaluators prefer Imagen 3 to previous versions and other leading image generation models. It holds the highest score for visual quality and accuracy in responding to prompts.
Use cases
-
Doodles to Masterpieces: Generates high-quality images in various formats and styles, from photorealistic landscapes to textured oil paintings and claymation scenes.
-
Versatile Applications: Suitable for creating a wide range of visuals, including photographs, illustrations, and artistic renderings.
Other Popular Models
storydiffusion
Story Diffusion turns your written narratives into stunning image sequences.

fooocus
Fooocus enables high-quality image generation effortlessly, combining the best of Stable Diffusion and Midjourney.

sdxl1.0-txt2img
The SDXL model is the official upgrade to the v1.5 model. The model is released as open-source software

sd2.1-faceswapper
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training
