Aura Flow

Largest completely open sourced flow-based generation model that is capable of text-to-image generation

~79.15s
~$0.117
 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

POSThttps://api.segmind.com/v1/aura-flow

Parameters

cfgoptional
number

The guidance scale tells the model how similar the output should be to the prompt.

Default: 5Range: 0 - 20
heightoptional
integer

The height of the image

Default: 1024Range: 512 - 2048
negative_promptoptional
string

Things you do not want to see in your image

Default: ""
number_of_imagesoptional
integer

The number of images to generate

Default: 1Range: 1 - 10
output_formatoptional
string

An enumeration.

Default: "webp"
Allowed values :
"webp""jpg""png"
output_qualityoptional
integer

Quality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality.

Default: 80Range: 0 - 100
promptoptional
string
Default: ""
sampleroptional
string

An enumeration.

Default: "uni_pc"
Allowed values (27 total):
"euler""euler_cfg_pp""euler_ancestral""euler_ancestral_cfg_pp""heun""heunpp2""dpm_2""dpm_2_ancestral""lms""dpm_fast"+17 more
scheduleroptional
string

An enumeration.

Default: "normal"
Allowed values :
"normal""karras""exponential""sgm_uniform""simple""ddim_uniform"
seedoptional
integer

Set a seed for reproducibility. Random by default.

Default: 2425367
shiftoptional
number

The timestep scheduling shift; shift values higher than 1.0 are better at managing noise in higher resolutions.

Default: 1.73Range: 0 - 10
stepsoptional
integer

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.)

Default: 25Range: 1 - 100
widthoptional
integer

The width of the image

Default: 1024Range: 512 - 2048

Response Type

Returns: Image

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out