Create Stunning Art with Neurogen's Image Generation Capabilities

25 Apr 2025
Create Stunning Art with Neurogen's Image Generation Capabilities

Neurogen is an innovative service designed to revolutionize the way developers create and manipulate images. Utilizing advanced algorithms, Neurogen's Cognitive Actions allow for the generation of unique Splurge Art images tailored to your specifications. Whether you’re looking to create eye-catching visuals for marketing materials, game design, or simply to explore the creative possibilities of AI-generated art, Neurogen simplifies the process, enabling rapid generation of high-quality images.

Imagine being able to input a detailed prompt and receive multiple artworks that reflect your vision, all while having control over various parameters like dimensions, image quality, and elements to avoid. This flexibility is invaluable for developers seeking to enhance user engagement or to streamline their creative workflows.

Prerequisites

To get started with Neurogen, you will need a Cognitive Actions API key and a basic understanding of how to make API calls.

Generate Splurge Art Image

The Generate Splurge Art Image action allows you to create stunning, one-of-a-kind images based on your descriptive prompts. By adjusting parameters like size, denoising steps, and guidance scales, you can refine the output to match your artistic vision.

Input Requirements

To use this action, you’ll need to provide the following parameters:

  • Width: The width of the output image in pixels (default is 786).
  • Height: The height of the output image in pixels (default is 786).
  • Prompt: A detailed description of the image you want to generate (e.g., “a tiny mushroom person with a mushroom for a head walking by a stream in a lush forest”).
  • Scheduler: The algorithm for scheduling denoising steps (default is 'DPMSolverMultistep').
  • Guidance Scale: A scale factor for classifier-free guidance (default is 7.5, range 1-20).
  • Negative Prompt: Elements you want to exclude from the image (e.g., “extra fingers”).
  • Number of Outputs: The number of images to generate (default is 1, max 4).
  • Number of Inference Steps: The total denoising steps used in image generation (default is 50, max 500).

Expected Output

The output will consist of URLs to the generated images, allowing you to easily access and utilize them in your projects.

Example Input

{
  "width": 768,
  "height": 768,
  "prompt": "a tiny mushroom person with a mushroom for a head walking by a stream in a lush forest. cgsociety masterpiece, artstation trending, by rossdraws, ghibli, Kimi no Na wa, greg rutkowski",
  "scheduler": "DPMSolverMultistep",
  "guidanceScale": 7.5,
  "negativePrompt": "easynegative, extra fingers, fewer fingers, (low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2), bad composition, inaccurate eyes, extra digit,fewer digits,(extra arms:1.2)",
  "numberOfOutputs": 4,
  "numberOfInferenceSteps": 50
}

Example Output

[
  "https://assets.cognitiveactions.com/invocations/157174e5-f8ab-4509-803a-e2cfb8fc6848/d362a265-6f4f-414b-bed7-59749332fd03.png",
  "https://assets.cognitiveactions.com/invocations/157174e5-f8ab-4509-803a-e2cfb8fc6848/7bf7c2bf-4408-4779-bbba-aa3eaa8d6c15.png",
  "https://assets.cognitiveactions.com/invocations/157174e5-f8ab-4509-803a-e2cfb8fc6848/f358f319-976a-40f0-b812-5bd51c93b71a.png",
  "https://assets.cognitiveactions.com/invocations/157174e5-f8ab-4509-803a-e2cfb8fc6848/149ad2ac-1c39-469d-878c-8ce2b905b152.png"
]
import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "a8cb0a6d-fec9-4aeb-8d13-92cb143fd5a7" # Action ID for: Generate Splurge Art Image

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "width": 768,
  "height": 768,
  "prompt": "a tiny mushroom person with a mushroom for a head walking by a stream in a lush forest. cgsociety masterpiece, artstation trending, by rossdraws, ghibli, Kimi no Na wa, greg rutkowski",
  "scheduler": "DPMSolverMultistep",
  "guidanceScale": 7.5,
  "negativePrompt": "easynegative, extra fingers, fewer fingers, (low quality, worst quality:1.4), (bad anatomy), (inaccurate limb:1.2), bad composition, inaccurate eyes, extra digit,fewer digits,(extra arms:1.2)",
  "numberOfOutputs": 4,
  "numberOfInferenceSteps": 50
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    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 (non-JSON): {e.response.text}")
    print("------------------------------------------------")

Use Cases for this Action

  • Creative Projects: Artists and designers can use this action to quickly generate visuals for their projects, brainstorming concepts without the need for extensive manual labor.
  • Marketing Materials: Marketers can create unique images for campaigns, social media, and other digital content to capture audience attention.
  • Game Development: Game developers can generate assets for characters, backgrounds, or promotional materials, facilitating rapid prototyping and iterative design.

Conclusion

Neurogen's Generate Splurge Art Image action opens up a world of creative possibilities, allowing developers to harness the power of AI in their projects. With customizable inputs and the ability to generate multiple outputs, this tool simplifies the art creation process while enhancing the quality and uniqueness of the images produced.

To get started, integrate Neurogen into your applications and explore the potential of AI-generated art for your projects!