Create Stunning Images from Text with Aura Flow V0.2

27 Apr 2025
Create Stunning Images from Text with Aura Flow V0.2

The Aura Flow V0.2 is an innovative tool designed to transform text prompts into high-quality images, leveraging the power of a fully open-sourced large flow-based model. With its advanced image generation capabilities, Aura Flow V0.2 enables developers to create visually appealing graphics quickly and efficiently. The customization options available, including adjustable dimensions, formats, and quality settings, empower users to produce images that meet their specific needs.

Common use cases for Aura Flow V0.2 include generating marketing materials, creating artwork for social media, and developing content for websites and applications. Whether you're looking to produce eye-catching visuals for a campaign or simply want to explore creative concepts, this tool simplifies the image generation process, making it accessible to developers of all skill levels.

Prerequisites

Before you start using Aura Flow V0.2, ensure you have a Cognitive Actions API key and a basic understanding of making API calls.

Generate Images from Text with AuraFlow

The "Generate Images from Text with AuraFlow" action allows users to create images based on descriptive text prompts. This action addresses the challenge of producing high-quality visuals without the need for extensive graphic design skills. By inputting a simple text description, users can generate unique images that reflect their creative vision.

Input Requirements

To use this action, you need to provide the following input parameters:

  • Width: Specifies the image width in pixels (default: 1024, range: 512-2048).
  • Height: Specifies the image height in pixels (default: 1024, range: 512-2048).
  • Prompt: A string that describes the desired content of the image (e.g., "A photo of a lavender cat").
  • Random Seed: Optional numeric seed for deterministic outputs.
  • Output Format: The desired file format for the image (options: 'webp', 'jpg', 'png', default: 'webp').
  • Guidance Scale: A scale from 0 to 20 indicating how closely the image should adhere to the prompt (default: 3.5).
  • Output Quality: Quality of the generated image from 0 to 100 (default: 80).
  • Time Step Shift: Adjusts timestep scheduling for noise management (default: 1.73).
  • Negative Prompt: Elements to exclude from the image.
  • Number of Images: Quantity of images to generate (range: 1-10, default: 1).
  • Sampling Method: Specifies the method used for image generation (default: 'uni_pc').
  • Scheduling Algorithm: Defines the scheduling algorithm for processing steps (default: 'normal').

Expected Output

The output will be a URL linking to the generated image, which can be easily accessed and integrated into your projects.

Use Cases for this Action

  • Marketing Campaigns: Quickly generate unique visuals for advertisements or social media posts, enhancing engagement with your audience.
  • Content Creation: Create custom images for blogs, articles, or product listings, making your content more visually appealing.
  • Concept Development: Explore creative ideas and generate illustrations for pitches or presentations, facilitating the visualization of concepts.
import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "c49afd1d-9243-4542-8a72-7cb20a9af865" # Action ID for: Generate Images from Text with AuraFlow

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "width": 1024,
  "height": 1024,
  "prompt": "A photo of a lavender cat",
  "outputFormat": "webp",
  "guidanceScale": 3.5,
  "outputQuality": 80,
  "timeStepShift": 1,
  "negativePrompt": "",
  "numberOfImages": 1,
  "samplingMethod": "uni_pc",
  "schedulingAlgorithm": "normal"
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    print(json.dumps(result, indent=2))

except requests.exceptions.RequestException as e:
    print(f"Error executing action {action_id}: {e}")
    if e.response is not None:
        print(f"Response status: {e.response.status_code}")
        try:
            print(f"Response body: {e.response.json()}")
        except json.JSONDecodeError:
            print(f"Response body (non-JSON): {e.response.text}")
    print("------------------------------------------------")

Conclusion

Aura Flow V0.2 offers developers a powerful tool for generating high-quality images from text prompts, simplifying the creative process while providing extensive customization options. With its versatility, you can use this action for various applications, from marketing materials to content creation and concept development. Start integrating Aura Flow V0.2 into your projects today and unlock a new realm of creative possibilities.