Create Stunning Images Effortlessly with Illust3relustion

25 Apr 2025
Create Stunning Images Effortlessly with Illust3relustion

The Illust3relustion service provides developers with a powerful API to generate high-quality, detailed images tailored to user-defined prompts. This service leverages advanced image generation techniques, allowing you to create visually appealing graphics quickly and efficiently. Whether you're building applications that require unique artwork, enhancing creative projects, or developing marketing materials, Illust3relustion offers a robust solution to meet your needs.

With its flexibility and customization options, this service can transform simple text prompts into intricate images that align closely with your vision. You can specify various parameters such as dimensions, refinement settings, and even the type of Variational Autoencoder (VAE) to use, ensuring that the output meets your specific requirements.

Prerequisites

To get started with Illust3relustion, you will need a valid Cognitive Actions API key and a basic understanding of making API calls.

Generate Illust3Relustion Image

The "Generate Illust3Relustion Image" action is designed to create high-quality images based on detailed prompts provided by the user. This action addresses the challenge of generating unique artwork that aligns with specific creative visions, providing a streamlined process to achieve professional results without needing extensive graphic design skills.

Input Requirements

  • seed: An integer to control randomness; set to -1 for a random seed.
  • steps: Number of generation steps (1 to 100); defaults to 16.
  • width: Width of the generated image (1 to 4096 pixels); defaults to 1024.
  • height: Height of the generated image (1 to 4096 pixels); defaults to 1024.
  • prompt: A descriptive text that guides the image generation.
  • VAEType: Specifies the VAE to use; options include 'default', 'Liquid111', and others.
  • refiner: Boolean to enable image refinement.
  • modelType: Must be 'Illust3Relustion'.
  • addPreprompt: Boolean to prepend a preformatted prompt.
  • clipLayerSkip: Number of CLIP layers to skip (0 or more).
  • combinePrompt: Boolean for conjunction syntax on prompts.
  • schedulerType: Specifies the scheduling strategy for generation steps.
  • upscaleFactor: Determines the upscaling factor of the image.
  • negativePrompt: Specifies elements to avoid in the image.
  • refinerIntensity: Intensity of the refinement process (0.0 to 1.0).
  • Additional options for fine-tuning image details.

Expected Output

The output will be a URL pointing to the generated image, which can be directly used in applications or further processed as needed.

Use Cases for this Specific Action

  • Creative Projects: Generate unique illustrations for stories, blogs, or art portfolios.
  • Marketing Materials: Create custom graphics for advertisements or social media posts.
  • Product Design: Visualize product concepts or prototypes using tailored imagery.
  • Game Development: Produce character designs or game assets that fit specific themes and styles.
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 = "3622208c-362a-4056-b3bd-a67f474e685b" # Action ID for: Generate Illust3Relustion 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,
  "steps": 20,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, people\ndark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile",
  "VAEType": "default",
  "refiner": true,
  "modelType": "Illust3Relustion",
  "addPreprompt": true,
  "clipLayerSkip": 2,
  "combinePrompt": true,
  "schedulerType": "Euler a beta",
  "upscaleFactor": "x2",
  "negativePrompt": "nsfw, naked",
  "refinerIntensity": 0.6,
  "useAdetailerFace": false,
  "useAdetailerHand": false,
  "cfgAttentionScale": 5.5,
  "pagAttentionScale": 0,
  "useAdetailerPerson": false,
  "adetailerFacePrompt": "",
  "adetailerHandPrompt": "",
  "refinerCustomPrompt": "",
  "guidanceNoiseRescale": 1,
  "adetailerPersonPrompt": "",
  "combineNegativePrompt": false,
  "adetailerFaceNegativePrompt": "",
  "adetailerHandNegativePrompt": "",
  "adetailerPersonNegativePrompt": ""
}

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 Illust3relustion service empowers developers to create stunning, customized images quickly and effortlessly. With its array of input parameters and refinement options, you can produce high-quality visuals that cater to various applications, from marketing to creative projects. Start integrating Illust3relustion today to elevate your image generation capabilities and enhance your projects with unique artwork!