Create Stunning Custom Images with Anillustrious V3

26 Apr 2025
Create Stunning Custom Images with Anillustrious V3

In the realm of digital content creation, the ability to generate high-quality, customized images is a powerful asset. The Anillustrious V3 service empowers developers to harness the capabilities of advanced AI-driven image generation. By utilizing its Cognitive Actions, you can create vivid and tailored visuals that meet your specific needs. This not only accelerates your creative process but also simplifies the intricate tasks of image design.

Imagine scenarios where you need unique visuals for marketing campaigns, social media posts, or even game design. With Anillustrious V3, you can easily produce images that are not only aesthetically pleasing but also aligned with your project requirements. Whether you are a game developer looking for character designs or a content creator in need of eye-catching graphics, the flexibility and customization options available through the image generation action can significantly enhance your workflow.

Prerequisites

Before you start using Anillustrious V3, ensure you have an API key for Cognitive Actions and a basic understanding of how to make API calls.

Generate Customized Image

The "Generate Customized Image" action allows you to create high-quality images tailored to your specifications. This action addresses the need for unique, visually appealing content, eliminating the limitations of stock images and generic graphics.

Input Requirements

To use this action, you will need to provide a JSON object that includes various parameters:

  • seed: An integer that determines the randomness of the generated image. Set to -1 for a random seed.
  • model: Specify "Anillustrious-v3" to utilize the model for generation.
  • steps: An integer between 1 and 100 that defines the number of processing steps during generation (default is 30).
  • width: The width of the image in pixels, ranging from 1 to 4096 (default is 1024).
  • height: The height of the image in pixels, also ranging from 1 to 4096 (default is 1024).
  • prompt: A string that describes the desired content of the image using Compel weighting syntax.
  • cfgScale: A number between 1 and 50 that influences how closely the output adheres to the prompt (default is 7).
  • clipSkip: An integer for the number of CLIP layers to skip (default is 2).
  • pagScale: A number from 0 to 50 that enhances the generation outcome (default is 3).
  • visualAE: Specify the Variational Autoencoder to use, either "default" or "Anillustrious-v3".
  • batchSize: An integer between 1 and 4 that indicates how many images to generate at once (default is 1).
  • scheduler: Choose from various scheduling algorithms to use during generation (default is "Euler a").
  • negativePrompt: A string to discourage specific attributes from appearing in the image.
  • guidanceRescale: A number from 0 to 5 to adjust the CFG-generated noise (default is 0.5).
  • prependPreprompt: A boolean to indicate whether to prepend a predefined preprompt (default is true).

Expected Output

Upon successful execution, the action will return a URL to the generated image, allowing you to easily access and utilize the visual content in your projects.

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/4c7b5c33-dd19-4f3b-b832-7486e0516541/bc884faa-aa05-4e8b-a1ed-dc7f58cbd2be.png"
]

Use Cases for this Action

The "Generate Customized Image" action is perfect for:

  • Marketing Campaigns: Create unique visuals tailored to specific themes or audience demographics.
  • Social Media Content: Generate eye-catching images that stand out in a crowded feed.
  • Game Development: Design characters, environments, or promotional materials that fit your game’s narrative.
  • Artistic Projects: Produce original artwork for personal or commercial use, exploring various styles and concepts.
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 = "72c5ecf7-3699-4605-b388-847a7e90d269" # Action ID for: Generate Customized Image

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "seed": -1,
  "model": "Anillustrious-v3",
  "steps": 30,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
  "cfgScale": 7,
  "clipSkip": 2,
  "pagScale": 3,
  "visualAE": "default",
  "batchSize": 1,
  "scheduler": "Euler a",
  "negativePrompt": "nsfw, naked",
  "guidanceRescale": 0.5,
  "prependPreprompt": true
}

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("------------------------------------------------")

Conclusion

The Anillustrious V3 service offers developers an innovative way to generate customized images that meet a wide array of needs. By leveraging this powerful Cognitive Action, you can enhance your creative projects with unique visuals that save time and effort. Whether you’re looking to create marketing materials, social media content, or game assets, Anillustrious V3 equips you with the tools necessary to bring your ideas to life. Start exploring the possibilities today!