Generate Stunning Uncensored Images with Aisha AI's Flux Cognitive Actions

23 Apr 2025
Generate Stunning Uncensored Images with Aisha AI's Flux Cognitive Actions

In the world of AI-generated content, the aisha-ai-official/flux.1schnell-uncensored-rasch3 API offers a powerful set of tools for developers looking to create high-quality, uncensored images based on textual prompts. The Cognitive Actions provided by this API streamline the process of image generation, allowing developers to leverage advanced models with customizable parameters. With these pre-built actions, you can quickly integrate sophisticated image creation capabilities into your applications.

Prerequisites

Before diving into the Cognitive Actions, make sure you have the following:

  • API Key: You’ll need an API key for accessing the Cognitive Actions platform. This key typically needs to be passed in the request headers for authentication.
  • Basic Knowledge of JSON: Familiarity with JSON format will help you understand the input and output structures of the actions.

Authentication is generally handled by including your API key in the request headers as follows:

Authorization: Bearer YOUR_COGNITIVE_ACTIONS_API_KEY

Cognitive Actions Overview

Generate Uncensored Image with Flux

The Generate Uncensored Image with Flux action allows you to create high-quality, uncensored images using a text prompt. This action is particularly useful for applications that require artistic image generation, enabling customizable dimensions, reproducibility via seeds, and various denoising algorithms for enhanced output quality.

Input

The input for this action requires the following parameters:

  • prompt (required): A string describing the desired elements and style of the image.
  • seed (optional): An integer to ensure reproducibility; set to -1 for a random seed.
  • steps (optional): An integer between 4 and 50 that specifies the number of generation steps. Defaults to 20.
  • width (optional): An integer (512 to 2048) defining the width of the resulting image in pixels. Defaults to 1024.
  • height (optional): An integer (512 to 2048) defining the height of the resulting image in pixels. Defaults to 1024.
  • cfgScale (optional): A number (0 to 20) that determines how closely the model adheres to the prompt. Defaults to 5.
  • imageScheduler (optional): A string indicating the denoising algorithm to use. Options include "default", "Euler flux Karras", "Euler flux simple", "Euler flux exponential", and "Euler flux beta". Defaults to "default".

Here’s an example of the JSON payload you would send to this action:

{
  "seed": -1,
  "steps": 10,
  "width": 768,
  "height": 768,
  "prompt": "Portrait of a woman with dark-purple short hair and purple eyes. She is on a street, wearing casual clothes. She is holding a big sign that says \"Flux Uncensored 💜\" when she winks and smile to the viewer",
  "cfgScale": 5,
  "imageScheduler": "Euler flux beta"
}

Output

The output will typically consist of a URL pointing to the generated image. Here’s an example of a potential response:

[
  "https://assets.cognitiveactions.com/invocations/fda89a22-87ef-493a-83ec-ca6eebf7ba45/de7f7197-d6d2-446a-94df-aea7e24fc6b0.png"
]

This URL links directly to the created image, ready for use in your applications.

Conceptual Usage Example (Python)

To invoke this action programmatically, you can use the following conceptual Python code snippet:

import requests
import json

# Replace with your Cognitive Actions API key and endpoint
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute" # Hypothetical endpoint

action_id = "1581d284-96d3-4db4-bb31-f87427182586" # Action ID for Generate Uncensored Image with Flux

# Construct the input payload based on the action's requirements
payload = {
    "seed": -1,
    "steps": 10,
    "width": 768,
    "height": 768,
    "prompt": "Portrait of a woman with dark-purple short hair and purple eyes. She is on a street, wearing casual clothes. She is holding a big sign that says \"Flux Uncensored 💜\" when she winks and smile to the viewer",
    "cfgScale": 5,
    "imageScheduler": "Euler flux beta"
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json"
}

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json={"action_id": action_id, "inputs": payload} # Hypothetical structure
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully:")
    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: {e.response.text}")

In this snippet, replace YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key. The action_id corresponds to the action you want to execute, and the payload is constructed according to the input schema. The endpoint URL and request structure are illustrative and should be adapted to match the actual API documentation.

Conclusion

The Generate Uncensored Image with Flux action from the aisha-ai-official/flux.1schnell-uncensored-rasch3 API provides developers with a powerful tool for creating artistic and customized images directly from textual descriptions. By leveraging the flexibility of customizable parameters, you can enhance the creativity and functionality of your applications. Consider exploring additional use cases, such as incorporating user-generated prompts or generating images for social media content. With these Cognitive Actions, the possibilities are limitless!