Generate Stunning Images with the EpicRealismXL-Lightning Hades Cognitive Action

25 Apr 2025
Generate Stunning Images with the EpicRealismXL-Lightning Hades Cognitive Action

In the world of AI-powered image generation, the EpicRealismXL-Lightning Hades Cognitive Actions provide developers with a powerful tool to create high-quality images quickly and easily. By leveraging this API, you can customize image dimensions, formats, and quality, enabling you to integrate stunning graphics into your applications without the need for complex algorithms or extensive training data.

Prerequisites

Before you start using the Cognitive Actions, you'll need to ensure you have the following:

  • An API key for accessing the Cognitive Actions platform.
  • Basic familiarity with making API calls and handling JSON data.
  • An understanding of how to authenticate requests, typically by passing the API key in the headers of your HTTP request.

Cognitive Actions Overview

Generate Lightning Hades Images

The Generate Lightning Hades Images action allows you to create fast and high-quality images using the epiCRealismXL-Lightning Hades model. This action is particularly useful for generating visually compelling content based on descriptive prompts, although it does not support negative prompts.

Input

The action accepts the following input fields:

  • seed (optional, integer): Set a seed for reproducibility. Random by default.
  • width (optional, integer): Width of the image in pixels. Default is 1024.
  • height (optional, integer): Height of the image in pixels. Default is 1024.
  • prompt (required, string): Descriptive text input used to generate the image (e.g., "A portrait photo, pink hair, lightning storm").
  • outputFormat (optional, string): Specifies the file format for the generated images. Options include webp, jpg, and png. Default is webp.
  • outputQuality (optional, integer): Quality of the output images on a scale from 0 to 100. Default is 80.
  • negativePrompt (optional, string): Elements to exclude from the generated image, though this action does not respond to negative prompts.
  • numberOfImages (optional, integer): The total number of images to generate. Must be between 1 and 10. Default is 1.
  • disableSafetyChecker (optional, boolean): If set to true, the safety checker for generated images is disabled. Use with caution.

Example Input:

{
  "width": 1024,
  "height": 1024,
  "prompt": "A portrait photo, pink hair, lightning storm",
  "outputFormat": "webp",
  "outputQuality": 80,
  "negativePrompt": "",
  "numberOfImages": 1
}

Output

This action typically returns a URL to the generated image(s). Here’s an example of the output you might receive:

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/3c22575d-042f-4951-82a2-877fc345fd51/d8653613-185c-4dbe-aada-63bfb5200719.webp"
]

Conceptual Usage Example (Python)

Here’s how you might call the Generate Lightning Hades Images 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 = "06b38ce4-3c71-490d-bccc-1a2a8368ffed" # Action ID for Generate Lightning Hades Images

# Construct the input payload based on the action's requirements
payload = {
    "width": 1024,
    "height": 1024,
    "prompt": "A portrait photo, pink hair, lightning storm",
    "outputFormat": "webp",
    "outputQuality": 80,
    "negativePrompt": "",
    "numberOfImages": 1
}

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 code snippet, you’ll see how to structure the input JSON payload and make a request to the Cognitive Actions endpoint. Be sure to replace the placeholder values with your actual API key and the hypothetical endpoint URL.

Conclusion

The EpicRealismXL-Lightning Hades Cognitive Actions offer developers a straightforward way to integrate high-quality image generation into their applications. With customizable options for dimensions, formats, and quality, you can create visually appealing content tailored to your needs. Start experimenting with these actions today and unlock new creative possibilities for your projects!