Create Stunning Horror Posters with the paappraiser/horrorposter Cognitive Action

22 Apr 2025
Create Stunning Horror Posters with the paappraiser/horrorposter Cognitive Action

Creating visually striking horror-themed posters can be a challenging task for many developers and designers. Fortunately, the paappraiser/horrorposter Cognitive Action simplifies this process by providing an efficient way to generate custom horror posters using a variety of parameters. In this article, we’ll explore how to leverage this powerful image generation action to bring your horror poster concepts to life.

Introduction

The paappraiser/horrorposter API is designed to generate high-quality horror-themed poster images. By utilizing customizable parameters such as prompt text, image size, format, and quality, developers can create unique images that capture the essence of horror. This action supports fast predictions and detailed image generation using different models, offering flexibility for various use cases, including inpainting and image-to-image transformation.

Prerequisites

Before you start using the Cognitive Actions, ensure you have:

  • An API key for the Cognitive Actions platform, which is necessary for authentication.
  • Familiarity with making HTTP requests, as you'll need to format your requests appropriately.

For authentication, you will typically pass your API key in the request headers, ensuring secure access to the service.

Cognitive Actions Overview

Generate Horror Poster

The Generate Horror Poster action allows users to create horror-themed poster images based on customizable inputs.

Purpose: This action generates a poster image featuring horror-themed elements, which can be personalized through various parameters such as prompts, dimensions, and output formats.

Category: image-generation

Input

The input for this action is structured as follows:

  • prompt (required): A string that provides the textual description for the image. Example:
    "prompt": "poster in style of TOK for a horror show, black and white, text on poster says \"MN Crew 2025 legally blond\", legally blonde. No gibberish, no other text"
    
  • mask (optional): A string representing an image mask for inpainting mode.
  • seed (optional): An integer for setting a random seed for reproducible generation.
  • image (optional): A string for an input image in image-to-image or inpainting modes.
  • model (optional): A string that can be either "dev" or "schnell" (default is "dev").
  • width (optional): An integer for the image width (between 256 and 1440).
  • height (optional): An integer for the image height (between 256 and 1440).
  • fastMode (optional): A boolean to enable faster predictions.
  • imageFormat (optional): A string for the output image format (default is "webp").
  • renderQuality (optional): An integer for the quality of the output image (0 to 100).
  • denoisingSteps (optional): An integer for the number of denoising steps (1 to 50).
  • numberOfOutputs (optional): An integer for the number of images to generate (1 to 4).
  • outputAspectRatio (optional): A string for the desired aspect ratio.
  • additionalLoraScale (optional): A number to adjust the extra LoRA application strength.
  • loraApplicationScale (optional): A number to adjust the main LoRA application strength.
  • promptEffectStrength (optional): A number to set the strength of the prompt effect.
  • safetyCheckerDisabled (optional): A boolean to disable the safety checker.

Example Input

{
  "model": "dev",
  "width": 640,
  "height": 480,
  "prompt": "poster in style of TOK for a horror show, black and white, text on poster says \"MN Crew 2025 legally blond\", legally blonde. No gibberish, no other text",
  "imageFormat": "webp",
  "renderQuality": 90,
  "denoisingSteps": 28,
  "numberOfOutputs": 1,
  "outputAspectRatio": "1:1",
  "additionalLoraScale": 1,
  "loraApplicationScale": 1,
  "promptEffectStrength": 0.8,
  "diffusionGuidanceScale": 3.5
}

Output

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

[
  "https://assets.cognitiveactions.com/invocations/4da301d9-494b-4181-8ea5-5953860e40f6/38f25ce0-3059-44e0-84e2-2c83272bf29b.webp"
]

Conceptual Usage Example (Python)

Here’s how you can call the Generate Horror Poster action using a conceptual Python 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 = "fb512ab4-4d8c-4248-8c42-bdecc5eebd66"  # Action ID for Generate Horror Poster

# Construct the input payload based on the action's requirements
payload = {
    "model": "dev",
    "width": 640,
    "height": 480,
    "prompt": "poster in style of TOK for a horror show, black and white, text on poster says \"MN Crew 2025 legally blond\", legally blonde. No gibberish, no other text",
    "imageFormat": "webp",
    "renderQuality": 90,
    "denoisingSteps": 28,
    "numberOfOutputs": 1,
    "outputAspectRatio": "1:1",
    "additionalLoraScale": 1,
    "loraApplicationScale": 1,
    "promptEffectStrength": 0.8,
    "diffusionGuidanceScale": 3.5
}

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 need to replace the API key and endpoint with your actual values. The input payload is structured according to the action's requirements, ensuring your request is correctly formatted.

Conclusion

The Generate Horror Poster action from the paappraiser/horrorposter API provides an innovative solution for developers looking to create eye-catching horror-themed images. With its customizable input parameters and flexible output options, you can generate unique posters tailored to your specific needs. Consider exploring this Cognitive Action for your next project, and unleash your creativity in the world of horror design!