POST
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
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


cfgfloat ( default: 5 )

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

min : 0,

max : 20


seedint ( default: 2425367 )

Set a seed for reproducibility. Random by default.


shiftfloat ( default: 1.73 )

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

min : 0,

max : 10


stepsint ( default: 25 )

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


widthint ( default: 1024 )

The width of the image

min : 512,

max : 2048


heightint ( default: 1024 )

The height of the image

min : 512,

max : 2048


promptstr ( default: 1 )


samplerenum:str ( default: uni_pc )

An enumeration.

Allowed values:


schedulerenum:str ( default: normal )

An enumeration.

Allowed values:


output_formatenum:str ( default: webp )

An enumeration.

Allowed values:


output_qualityint ( default: 80 )

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

min : 0,

max : 100


negative_promptstr ( default: 1 )

Things you do not want to see in your image


number_of_imagesint ( default: 1 )

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

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.

Key Highlights

  1. Open-Source: Aura Flow is the largest fully open-sourced flow-based model, capable of transforming textual prompts into vivid visual representations.

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