Aura Flow
Largest completely open sourced flow-based generation model that is capable of text-to-image generation
1import requests
2import json
3
4url = "https://api.segmind.com/v1/aura-flow"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "cfg": 5,
12 "seed": 2425367,
13 "shift": 1.73,
14 "steps": 25,
15 "width": 1024,
16 "height": 1024,
17 "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",
18 "sampler": "uni_pc",
19 "scheduler": "normal",
20 "output_format": "webp",
21 "output_quality": 80,
22 "number_of_images": 1
23}
24
25response = requests.post(url, headers=headers, json=data)
26
27if response.status_code == 200:
28 result = response.json()
29 print(json.dumps(result, indent=2))
30else:
31 print(f"Error: {response.status_code}")
32 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/aura-flow"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "cfg": 5,
12 "seed": 2425367,
13 "shift": 1.73,
14 "steps": 25,
15 "width": 1024,
16 "height": 1024,
17 "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",
18 "sampler": "uni_pc",
19 "scheduler": "normal",
20 "output_format": "webp",
21 "output_quality": 80,
22 "number_of_images": 1
23}
24
25response = requests.post(url, headers=headers, json=data)
26
27if response.status_code == 200:
28 result = response.json()
29 print(json.dumps(result, indent=2))
30else:
31 print(f"Error: {response.status_code}")
32 print(response.text)API Endpoint
https://api.segmind.com/v1/aura-flowParameters
cfgoptionalnumberThe guidance scale tells the model how similar the output should be to the prompt.
5Range: 0 - 20heightoptionalintegerThe height of the image
1024Range: 512 - 2048negative_promptoptionalstringThings you do not want to see in your image
""number_of_imagesoptionalintegerThe number of images to generate
1Range: 1 - 10output_formatoptionalstringAn enumeration.
"webp""webp""jpg""png"output_qualityoptionalintegerQuality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality.
80Range: 0 - 100promptoptionalstring""sampleroptionalstringAn enumeration.
"uni_pc""euler""euler_cfg_pp""euler_ancestral""euler_ancestral_cfg_pp""heun""heunpp2""dpm_2""dpm_2_ancestral""lms""dpm_fast"+17 morescheduleroptionalstringAn enumeration.
"normal""normal""karras""exponential""sgm_uniform""simple""ddim_uniform"seedoptionalintegerSet a seed for reproducibility. Random by default.
2425367shiftoptionalnumberThe timestep scheduling shift; shift values higher than 1.0 are better at managing noise in higher resolutions.
1.73Range: 0 - 10stepsoptionalintegerThe number of steps to run the model for (more steps = better image but slower generation. Best results for this model are around 25 steps.)
25Range: 1 - 100widthoptionalintegerThe width of the image
1024Range: 512 - 2048Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out