Create Stunning Images with the immanencer/mirquo Cognitive Actions

23 Apr 2025
Create Stunning Images with the immanencer/mirquo Cognitive Actions

In the rapidly evolving field of image generation, the immanencer/mirquo API provides powerful tools for developers to create stunning visuals effortlessly. With its specialized Cognitive Actions, developers can generate unique images using customizable parameters that enhance creativity and efficiency. This guide will walk you through a specific action available within this API, detailing its capabilities and how to integrate it into your applications.

Prerequisites

Before getting started with the Cognitive Actions, ensure you have the following:

  • An API key for the immanencer/mirquo platform, which is required for authentication.
  • Basic knowledge of JSON and API requests.
  • A development environment set up for making HTTP requests, preferably with Python.

To authenticate, you will typically pass the API key in the request headers.

Cognitive Actions Overview

Generate Holographic Neon Black Forest Image

This action generates captivating images depicting a holographic neon black pine forest theme. It offers features for image inpainting, aspect ratio customization, and model inference using either the 'dev' or 'schnell' models. Additionally, it supports various settings such as image dimensions, seed values for reproducibility, and output quality adjustments.

Input

The input for this action is structured as follows:

  • Required Fields:
    • prompt: A text prompt that guides the image generation process.
  • Optional Fields:
    • mask: URI to an image mask for inpainting.
    • seed: Random seed for consistent results.
    • image: URI to an input image for image-to-image or inpainting.
    • model: Choose between dev (default) or schnell.
    • width: Image width if using a custom aspect ratio.
    • height: Image height if using a custom aspect ratio.
    • goFast: Enables fast mode for quicker predictions.
    • guidanceScale: Affects the diffusion process; suggested values are around 2 to 3.5.
    • outputQuality: Quality setting for the saved output.
    • numberOfOutputs: Specifies how many images to generate in one request.
    • imageAspectRatio: Defines the aspect ratio of the generated image.
    • imageOutputFormat: Format of the output image (webp, jpg, png).
    • Additional parameters for advanced customization such as extraLora, loraWeights, promptStrength, and more.

Example Input:

{
  "model": "dev",
  "prompt": "MRQ mirquo the void goblin holographic neon black forest   MRQ",
  "loraScale": 1,
  "guidanceScale": 3.5,
  "outputQuality": 90,
  "extraLoraScale": 1,
  "promptStrength": 0.8,
  "numberOfOutputs": 1,
  "imageAspectRatio": "1:1",
  "imageOutputFormat": "webp",
  "numInferenceSteps": 28
}

Output

Upon successful execution, the action returns a URL pointing to the generated image. The output will typically be a link to the resulting image file.

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/97289a33-d145-463c-8cec-20a05a917104/3280c423-ccea-4c87-9909-67b73171086d.webp"
]

Conceptual Usage Example (Python)

Here’s a conceptual example of how to invoke the action using Python:

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 = "fb51b22d-fa5b-4d0d-9554-c2d77bf709b4"  # Action ID for Generate Holographic Neon Black Forest Image

# Construct the input payload based on the action's requirements
payload = {
    "model": "dev",
    "prompt": "MRQ mirquo the void goblin holographic neon black forest   MRQ",
    "loraScale": 1,
    "guidanceScale": 3.5,
    "outputQuality": 90,
    "extraLoraScale": 1,
    "promptStrength": 0.8,
    "numberOfOutputs": 1,
    "imageAspectRatio": "1:1",
    "imageOutputFormat": "webp",
    "numInferenceSteps": 28
}

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 Python code snippet, you will need to replace the COGNITIVE_ACTIONS_API_KEY with your actual API key. The action_id corresponds to the action you want to execute. The payload is constructed based on the input schema, ensuring all required fields are provided.

Conclusion

The immanencer/mirquo Cognitive Actions offer developers a robust framework for generating stunning images with ease. By leveraging the capabilities of the "Generate Holographic Neon Black Forest Image" action, you can create unique visuals tailored to your needs. Explore further by experimenting with different parameters, and consider the possibilities for integrating this functionality into your applications for enhanced creativity and user engagement.