Generate Ultra-Realistic Images with the Chilloutmix Cognitive Actions

23 Apr 2025
Generate Ultra-Realistic Images with the Chilloutmix Cognitive Actions

In today's digital landscape, creating stunning visuals has never been easier, thanks to advancements in artificial intelligence. The buddhiraz/chilloutmix-ni-pruned-fp32-fixx API offers a powerful suite of Cognitive Actions that allow developers to generate ultra-realistic images based on detailed prompts. By leveraging advanced control over quality and style through a classifier-free guidance system, these actions can enhance your applications with incredible imagery.

Prerequisites

To get started with the Chilloutmix Cognitive Actions, you'll need to have the following in place:

  • API Key: Register for access to the Cognitive Actions platform and obtain your API key.
  • Environment: Ensure you have a programming environment set up where you can make HTTP requests, such as Python.

Authentication is typically handled by passing your API key in the request headers, ensuring secure access to the Cognitive Actions.

Cognitive Actions Overview

Generate Ultra-Realistic Images

The Generate Ultra-Realistic Images action allows users to create high-quality images based on textual prompts, incorporating advanced features to fine-tune the generation process.

  • Category: Image Generation

Input

The input schema for this action is defined as follows:

{
  "seed": "integer (optional)",
  "prompt": "string (required)",
  "guidanceScale": "number (optional)",
  "numberOfSteps": "integer (optional)",
  "negativePrompt": "string (optional)",
  "disableSafetyChecker": "boolean (optional)"
}

Required and Optional Fields:

  • prompt: A descriptive phrase guiding the generation (e.g., "Indian Women in saree, POV, showing boobs, 8k, ultra-realistic").
  • guidanceScale: A numeric scale for classifier-free guidance, defaulting to 5 (range from 1 to 10).
  • numberOfSteps: Total steps for image processing, default is 20 (must be between 1 and 100).
  • negativePrompt: Terms to avoid in the generation (e.g., "nsfw, lowres, bad anatomy").
  • seed: An integer for randomization (optional).
  • disableSafetyChecker: A boolean to enable or disable the safety checker (default is false).

Example Input:

{
  "prompt": "sweet1-000050,nfsw,best quality, masterpiece, illustration, an extremely delicate and beautiful, extremely detailed, CG, unity, 8k wallpaper, Amazing, finely detail, masterpiece, best quality, official art, extremely detailed CG unity 8k wallpaper, huge filesize, ultra-detailed, highres",
  "guidanceScale": 5,
  "numberOfSteps": 20,
  "negativePrompt": "nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
}

Output

Upon successful execution, the action returns a URL pointing to the generated image.

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/66cc3d98-d5ce-47ea-b3ff-269968d3b040/f42536d0-5118-43e9-b16e-16463340ce38.png"
]

Conceptual Usage Example (Python)

Here’s a conceptual Python code snippet demonstrating how to invoke the Generate Ultra-Realistic Images 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 = "36745dd7-330d-4bbd-ac8b-169706062145" # Action ID for Generate Ultra-Realistic Images

# Construct the input payload based on the action's requirements
payload = {
    "prompt": "sweet1-000050,nfsw,best quality, masterpiece, illustration, an extremely delicate and beautiful, extremely detailed, CG, unity, 8k wallpaper, Amazing, finely detail, masterpiece, best quality, official art, extremely detailed CG unity 8k wallpaper, huge filesize, ultra-detailed, highres",
    "guidanceScale": 5,
    "numberOfSteps": 20,
    "negativePrompt": "nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
}

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 example, replace YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key. The action_id corresponds to the Generate Ultra-Realistic Images action, and the payload contains the required input formatted as a JSON object.

Conclusion

The buddhiraz/chilloutmix-ni-pruned-fp32-fixx Cognitive Actions provide an incredible toolset for developers looking to enhance their applications with ultra-realistic image generation. By utilizing the detailed prompts and fine-tuning options, you can create stunning visuals tailored to your specific needs. Start experimenting with these actions today to unlock the potential of AI-driven imagery in your projects!