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
import requests
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/aura-flow"
# Prepare data and files
data = {}
files = {}
data['cfg'] = 5
data['seed'] = 2425367
data['shift'] = 1.73
data['steps'] = 25
data['width'] = 1024
data['height'] = 1024
data['prompt'] = "A mesmerizing 3D render displaying a vibrant, dark fantasy-inspired birthday message for Mehtap. The letters 'Happy birthday' are written in a dreamy, pastel-colored cursive script, floating elegantly above a gradient background that transitions seamlessly from deep purple to soft pink. The dreamy atmosphere is accentuated by a vibrant swirling array of decorative elements, including a rainbow, heart-shaped objects in various sizes and textures, twinkling stars, and a collection of colorful, abstract shapes. The overall design pays homage to Ukiyo-e and graffiti art, creating a unique and captivating visual experience., 3d render, graffiti, vibrant, dark fantasy, typography, ukiyo-e, conceptual art"
data['sampler'] = "uni_pc"
data['scheduler'] = "normal"
data['output_format'] = "webp"
data['output_quality'] = 80
data['negative_prompt'] = ""
data['number_of_images'] = 1
headers = {'x-api-key': api_key}
response = requests.post(url, data=data, files=files, headers=headers)
print(response.content) # The response is the generated image
The guidance scale tells the model how similar the output should be to the prompt.
min : 0,
max : 20
Set a seed for reproducibility. Random by default.
The timestep scheduling shift; shift values higher than 1.0 are better at managing noise in higher resolutions.
min : 0,
max : 10
The number of steps to run the model for (more steps = better image but slower generation. Best results for this model are around 25 steps.)
min : 1,
max : 100
The width of the image
min : 512,
max : 2048
The height of the image
min : 512,
max : 2048
An enumeration.
Allowed values:
An enumeration.
Allowed values:
An enumeration.
Allowed values:
Quality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality.
min : 0,
max : 100
Things you do not want to see in your image
The number of images to generate
min : 1,
max : 10
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.
Aura Flow is a flow-based generation model, a powerful approach used in machine learning to explicitly model probability distributions. Unlike some other generative models, which might rely on complex architectures or adversarial training, redefining the possibilities of text-to-image synthesis.
Open-Source: Aura Flow is the largest fully open-sourced flow-based model, capable of transforming textual prompts into vivid visual representations.
Text-to-Image Magic: AuraFlow seamlessly bridges language and pixels. Feed it a descriptive text, and it weaves intricate images—whether serene landscapes, fantastical creatures, or everyday scenes.