POST
javascript
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 const axios = require('axios'); const FormData = require('form-data'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/aura-flow"; const reqBody = { "cfg": 5, "seed": 2425367, "shift": 1.73, "steps": 25, "width": 1024, "height": 1024, "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", "sampler": "uni_pc", "scheduler": "normal", "output_format": "webp", "output_quality": 80, "number_of_images": 1 }; (async function() { try { const formData = new FormData(); // Append regular fields for (const key in reqBody) { if (reqBody.hasOwnProperty(key)) { formData.append(key, reqBody[key]); } } // Convert and append images as Base64 if necessary const response = await axios.post(url, formData, { headers: { 'x-api-key': api_key, ...formData.getHeaders() } }); console.log(response.data); } catch (error) { console.error('Error:', error.response ? error.response.data : error.message); } })();
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.