Create Stunning 90s Anime-Style Images with Cognitive Actions

In the realm of creative content generation, the levelsio/90s-anime-aesthetics spec stands out by offering a unique set of Cognitive Actions aimed at generating captivating images that evoke the nostalgic charm of 1990s anime. These pre-built actions simplify the process for developers looking to incorporate anime aesthetics into their applications, whether for art, gaming, or social media content. By leveraging these Cognitive Actions, you can quickly create visually stunning images that resonate with fans of retro anime.
Prerequisites
Before you dive into using the Cognitive Actions for generating 90s anime-style images, ensure you have the following:
- An API key for accessing the Cognitive Actions platform.
- Basic familiarity with JSON formatting and making HTTP requests.
Authentication typically involves including your API key in the request headers when calling the Cognitive Actions API.
Cognitive Actions Overview
Generate 90s Anime Style Images
The Generate 90s Anime Style Images action allows you to create images that capture the essence of 1990s anime aesthetics. You can customize various aspects of the generated images, including dimensions, aspect ratios, and output formats. The action employs optimized models to cater to different creative inputs and inference speeds.
Input
The input for this action is structured as a JSON object and requires the following fields:
- prompt (required): A descriptive text prompt to guide the image generation.
- aspectRatio (optional): The desired aspect ratio for the image (default is
1:1). - outputFormat (optional): Format of the output image (default is
webp). - mainLoraScale (optional): Scale for the main LoRA application (default is
1). - outputQuality (optional): Quality setting for the output image (default is
80). - inferenceModel (optional): The model to use for inference (default is
dev). - outputQuantity (optional): Number of images to generate (default is
1). - promptStrength (optional): Intensity of the prompt in image generation (default is
0.8). - inferenceStepsCount (optional): Number of denoising steps (default is
28). - diffusionGuidanceScale (optional): Guidance scale for the diffusion process (default is
3).
Here’s an example input JSON payload:
{
"prompt": "90s anime of a narrow, bustling alleyway lined with traditional Japanese restaurants. Bright, colorful paper lanterns hang overhead, casting a warm glow on the scene. Neon signs and banners display Japanese characters, and menus or advertisements are posted outside the eateries. Models can be seen walking or standing, contributing to the lively atmosphere. The setting is vibrant and inviting, suggesting a lively night market or dining district in the style of ANM",
"aspectRatio": "16:9",
"outputFormat": "jpg",
"mainLoraScale": 1.1,
"outputQuality": 90,
"inferenceModel": "dev",
"outputQuantity": 1,
"promptStrength": 0.8,
"inferenceStepsCount": 28,
"diffusionGuidanceScale": 3.5
}
Output
The action returns a URL pointing to the generated image. For example, a successful output might look like this:
[
"https://assets.cognitiveactions.com/invocations/bf986a72-7a2b-4fec-b813-d208f37ed808/b73a87e0-65be-45a7-a668-c934b434fab5.jpg"
]
This URL can be used to display or access the generated image directly.
Conceptual Usage Example (Python)
Below is a conceptual example of how you might invoke the Generate 90s Anime Style Images action using Python. This snippet demonstrates how to structure your request to the Cognitive Actions API:
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 = "ce3a82ea-c7db-4ac8-8640-1e3eb9011802" # Action ID for Generate 90s Anime Style Images
# Construct the input payload based on the action's requirements
payload = {
"prompt": "90s anime of a narrow, bustling alleyway lined with traditional Japanese restaurants. Bright, colorful paper lanterns hang overhead, casting a warm glow on the scene. Neon signs and banners display Japanese characters, and menus or advertisements are posted outside the eateries. Models can be seen walking or standing, contributing to the lively atmosphere. The setting is vibrant and inviting, suggesting a lively night market or dining district in the style of ANM",
"aspectRatio": "16:9",
"outputFormat": "jpg",
"mainLoraScale": 1.1,
"outputQuality": 90,
"inferenceModel": "dev",
"outputQuantity": 1,
"promptStrength": 0.8,
"inferenceStepsCount": 28,
"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, replace the placeholder API key and endpoint with your actual credentials. The payload is structured using the example input provided, allowing you to generate a stunning anime-style image directly through the API.
Conclusion
The levelsio/90s-anime-aesthetics Cognitive Actions provide a powerful toolset for developers looking to create anime-inspired visuals. By leveraging the ability to customize prompts, aspect ratios, and output formats, you can generate unique, nostalgic images that resonate with a wide audience. Explore the possibilities and integrate these actions into your applications to enhance your creative projects!