Create Stunning Images with Aisha AI's Alchemist Mix Illustrious Realism V4

23 Apr 2025
Create Stunning Images with Aisha AI's Alchemist Mix Illustrious Realism V4

In the world of AI-driven creativity, the Aisha AI's Alchemist Mix Illustrious Realism V4 offers developers a powerful toolset to generate photorealistic images. With enhanced image quality and customizable parameters, this set of Cognitive Actions allows for precise control over the image generation process, making it an invaluable resource for developers looking to integrate sophisticated image capabilities into their applications.

Prerequisites

Before diving into the integration of the Cognitive Actions, ensure that you have the following in place:

  • API Key: You will need an API key to authenticate your requests to the Cognitive Actions platform.
  • Basic Setup: Familiarity with making HTTP requests and handling JSON data is essential.

Authentication typically involves passing your API key in the request headers. This will ensure that your application can communicate securely with the Cognitive Actions service.

Cognitive Actions Overview

Generate Image with Alchemist Mix Illustrious Realism V4

The Generate Image with Alchemist Mix Illustrious Realism V4 action allows you to create high-quality, photorealistic images using the advanced Alchemist Mix model. This action provides a variety of parameters to control the image generation process, including steps, dimensions, and scheduling algorithms, ensuring that you can produce images tailored to your specific needs.

Input

The input for this action is defined by the following schema:

{
  "seed": 1328132913,
  "model": "Alchemist-Mix-Illustrious-Realism-v4",
  "steps": 30,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
  "batchSize": 1,
  "scheduler": "Euler a",
  "aDetailerFace": true,
  "aDetailerHand": false,
  "clipLayerSkip": 1,
  "negativePrompt": "nsfw, naked",
  "aDetailerPerson": false,
  "guidanceRescale": 1,
  "prependPrePrompt": true,
  "controlGuidanceScale": 5,
  "variationalAutoencoder": "default",
  "postAttentionGuidanceScale": 0
}
  • seed: (integer) Seed number for generation (default: -1).
  • model: (string) Specifies the model to use (default: "Alchemist-Mix-Illustrious-Realism-v4").
  • steps: (integer) Number of steps for image generation (default: 30).
  • width: (integer) Width of the image in pixels (default: 1024).
  • height: (integer) Height of the image in pixels (default: 1024).
  • prompt: (string) Description that guides the image creation (default: "street, 1girl, dark-purple short hair...").
  • batchSize: (integer) Number of images to generate (default: 1, max: 4).
  • scheduler: (string) Scheduling algorithm for generation (default: "Euler a").
  • aDetailerFace: (boolean) Enable ADetailer face model (default: true).
  • aDetailerHand: (boolean) Enable ADetailer hand model (default: false).
  • clipLayerSkip: (integer) Number of CLIP layers to skip (default: 1).
  • negativePrompt: (string) Specifies undesired elements in the image (default: "nsfw, naked").
  • aDetailerPerson: (boolean) Enable ADetailer person model (default: false).
  • guidanceRescale: (number) Rescale CFG-generated noise (default: 1).
  • prependPrePrompt: (boolean) Prepend a predefined text to the prompt (default: true).
  • controlGuidanceScale: (number) Attention level to the prompt (default: 5).
  • variationalAutoencoder: (string) VAE model to use (default: "default").
  • postAttentionGuidanceScale: (number) PAG scale to enhance quality (default: 0).

Output

The output of this action typically returns a URL of the generated image. For example:

[
  "https://assets.cognitiveactions.com/invocations/9741f258-b5bf-402b-9b07-75568e4d8ad2/ddbe6912-17c9-45dd-9bb2-09932d5c8a85.png"
]

Conceptual Usage Example (Python)

Here’s a conceptual Python snippet illustrating how to call the Cognitive Actions execution endpoint for this action:

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 = "1ce6edbc-e4e3-4dc2-ae98-4b309f559c5c"  # Action ID for Generate Image with Alchemist Mix Illustrious Realism V4

# Construct the input payload based on the action's requirements
payload = {
    "seed": 1328132913,
    "model": "Alchemist-Mix-Illustrious-Realism-v4",
    "steps": 30,
    "width": 1024,
    "height": 1024,
    "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
    "batchSize": 1,
    "scheduler": "Euler a",
    "aDetailerFace": True,
    "aDetailerHand": False,
    "clipLayerSkip": 1,
    "negativePrompt": "nsfw, naked",
    "aDetailerPerson": False,
    "guidanceRescale": 1,
    "prependPrePrompt": True,
    "controlGuidanceScale": 5,
    "variationalAutoencoder": "default",
    "postAttentionGuidanceScale": 0
}

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 payload is structured according to the action's requirements, ensuring that you can generate stunning images seamlessly.

Conclusion

The Aisha AI's Alchemist Mix Illustrious Realism V4 Cognitive Actions provide developers with a robust framework to create unique, photorealistic images tailored to their specifications. By leveraging the customizable parameters and advanced features, you can enhance user engagement and creativity in your applications. Consider experimenting with various prompts and configurations to unlock the full potential of this powerful AI toolset!