Aura Flow Serverless API
Largest completely open sourced flow-based generation model that is capable of text-to-image generation
POST /v2/aura-flow · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "aura-flow",
9 cfg=5,
10 seed=2425367,
11 shift=1.73,
12 steps=25,
13 width=1024,
14 height=1024,
15 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",
16 sampler="uni_pc",
17 scheduler="normal",
18 output_format="webp",
19 output_quality=80,
20 number_of_images=1,
21)
22print(result["status"]) # COMPLETED
23print(result.get("output")) # model output (e.g. media URL)
24print(result["metrics"]["inference_time"]) # server compute seconds
25
26# --- Or submit + poll manually (track request_id, control the cadence) ---
27from segmind import SegmindClient, InferenceFailed, InferenceTimeout
28
29client = SegmindClient() # reads SEGMIND_API_KEY
30payload = {
31 "cfg": 5,
32 "seed": 2425367,
33 "shift": 1.73,
34 "steps": 25,
35 "width": 1024,
36 "height": 1024,
37 "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",
38 "sampler": "uni_pc",
39 "scheduler": "normal",
40 "output_format": "webp",
41 "output_quality": 80,
42 "number_of_images": 1,
43}
44job = client.submit_async("aura-flow", **payload)
45print(job.request_id) # available immediately
46try:
47 result = job.wait(timeout=600, interval=1.0)
48except InferenceTimeout as e:
49 print("still running:", e.request_id)
50except InferenceFailed as e:
51 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "aura-flow",
9 cfg=5,
10 seed=2425367,
11 shift=1.73,
12 steps=25,
13 width=1024,
14 height=1024,
15 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",
16 sampler="uni_pc",
17 scheduler="normal",
18 output_format="webp",
19 output_quality=80,
20 number_of_images=1,
21)
22print(result["status"]) # COMPLETED
23print(result.get("output")) # model output (e.g. media URL)
24print(result["metrics"]["inference_time"]) # server compute seconds
25
26# --- Or submit + poll manually (track request_id, control the cadence) ---
27from segmind import SegmindClient, InferenceFailed, InferenceTimeout
28
29client = SegmindClient() # reads SEGMIND_API_KEY
30payload = {
31 "cfg": 5,
32 "seed": 2425367,
33 "shift": 1.73,
34 "steps": 25,
35 "width": 1024,
36 "height": 1024,
37 "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",
38 "sampler": "uni_pc",
39 "scheduler": "normal",
40 "output_format": "webp",
41 "output_quality": 80,
42 "number_of_images": 1,
43}
44job = client.submit_async("aura-flow", **payload)
45print(job.request_id) # available immediately
46try:
47 result = job.wait(timeout=600, interval=1.0)
48except InferenceTimeout as e:
49 print("still running:", e.request_id)
50except InferenceFailed as e:
51 print("failed:", e.detail)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
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/aura-flowSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
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