Create Stunning Anime Images with Nova-Anime-ILXL-v5 Cognitive Actions

22 Apr 2025
Create Stunning Anime Images with Nova-Anime-ILXL-v5 Cognitive Actions

The Nova-Anime-ILXL-v5 is a powerful API designed for developers looking to create high-quality anime images through customizable parameters. By utilizing the Cognitive Actions provided in this spec, you can generate unique anime visuals tailored to your specifications. This blog post will guide you through the capabilities of the Generate Anime Image with Nova action, enabling you to seamlessly integrate it into your own applications.

Prerequisites

Before diving into the implementation, ensure that you have the following:

  • An API key for accessing the Cognitive Actions platform.
  • Basic knowledge of JSON format for structuring your API requests.

Authentication typically involves passing your API key in the headers of your HTTP requests, allowing you to securely access the Cognitive Actions.

Cognitive Actions Overview

Generate Anime Image with Nova

This action utilizes the Nova-Anime-ILXL-v5 model to generate high-quality anime images based on customizable prompts and settings. You can control various aspects of the image generation, including dimensions, batch size, and model attention.

Input

The input for this action is structured as follows:

{
  "seed": -1,
  "model": "Nova-Anime-ILXL-v5",
  "steps": 30,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
  "scheduler": "Euler a",
  "configScale": 5,
  "clipLayerSkip": 2,
  "imageBatchSize": 1,
  "negativePrompt": "nsfw, naked",
  "prependInitialPrompt": true,
  "guidanceRescaleAmount": 1,
  "variationalAutoencoder": "default",
  "progressiveAttentionGuidanceScale": 0
}

Key Input Fields:

  • seed: (integer) The seed for generating random outputs. Use -1 to select a random seed.
  • model: (string) Specifies the model to be used in generation. Default is "Nova-Anime-ILXL-v5".
  • steps: (integer) Number of steps to execute during generation (1-100).
  • width: (integer) Output image width in pixels (1-4096).
  • height: (integer) Output image height in pixels (1-4096).
  • prompt: (string) The input prompt for generation, using Compel weighting syntax.
  • scheduler: (string) Scheduler algorithm to employ, default is "Euler a".
  • configScale: (number) Controls model attention to prompts during generation (1-50).
  • imageBatchSize: (integer) Count of images to produce per batch (1-4).

Output

Upon successful execution, the action returns a URL link to the generated anime image. For example:

[
  "https://assets.cognitiveactions.com/invocations/80c62ea7-a372-4c7e-aefe-a8d59f584c33/e77f2838-7aab-472f-bc57-272e8a45289c.png"
]

This URL will point to the newly created anime image, allowing you to display or utilize it as needed.

Conceptual Usage Example (Python)

Here’s how you can theoretically call the Cognitive Actions execution endpoint 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 = "98c4d37e-27c7-4fbe-b8f5-1750e7c82113" # Action ID for Generate Anime Image with Nova

# Construct the input payload based on the action's requirements
payload = {
    "seed": -1,
    "model": "Nova-Anime-ILXL-v5",
    "steps": 30,
    "width": 1024,
    "height": 1024,
    "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
    "scheduler": "Euler a",
    "configScale": 5,
    "clipLayerSkip": 2,
    "imageBatchSize": 1,
    "negativePrompt": "nsfw, naked",
    "prependInitialPrompt": True,
    "guidanceRescaleAmount": 1,
    "variationalAutoencoder": "default",
    "progressiveAttentionGuidanceScale": 0
}

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, replace the placeholder for your API key and adjust the endpoint URL to match your actual setup. The action ID and input payload should be structured as shown.

Conclusion

The Generate Anime Image with Nova action provides a robust solution for developers looking to create customized anime images programmatically. By leveraging its flexible input parameters, you can generate unique visuals that fit your application's needs. Next steps could involve experimenting with different prompts and configurations to fully explore the capabilities of the Nova-Anime-ILXL-v5 model. Happy coding!