Create Stunning Canine Artwork with klovistore2 Mini Pinscher Cognitive Actions

Integrating advanced image generation capabilities into your applications has never been easier with the klovistore2/mini-pinscher Cognitive Actions. This API offers a powerful set of pre-built actions designed to generate dog-inspired images with a high level of customization and detail. Whether you’re looking to create unique artwork or enhance your pet-related applications, these Cognitive Actions will help you achieve your goals effortlessly.
Prerequisites
Before diving into the integration of these Cognitive Actions, ensure you have:
- An API key for the Cognitive Actions platform, which will be used for authentication.
- Basic knowledge of JSON payload structures and HTTP requests.
Authentication is typically handled by passing your API key in the headers of your requests, allowing you to securely access the image generation services.
Cognitive Actions Overview
Generate Dog-Inspired Advanced Images
This operation generates images inspired by dogs using a flux model. It allows customization through various parameters, enabling users to produce realistic and detailed images with adjustable inference steps and guidance scale.
Input
The input for this action is defined by the following schema:
- prompt (required): A textual input guiding the image generation. Including specific trigger words can help activate trained objects, styles, or concepts.
- mask (optional): URI of an image mask for inpainting mode; overrides dimensions.
- seed (optional): An integer for deterministic image generation.
- image (optional): URI of an input image for image-to-image or inpainting mode; overrides dimensions.
- width (optional): Desired width of the generated image (256 - 1440).
- height (optional): Desired height of the generated image (256 - 1440).
- fastMode (optional): Enables faster generation; defaults to false.
- imageFormat (optional): Specifies the output format (webp, jpg, png); defaults to webp.
- outputCount (optional): Number of image outputs (1 - 4); defaults to 1.
- imageQuality (optional): Quality level of output images (0 - 100); defaults to 80.
- inferenceModel (optional): Selects the model for inference (dev or schnell); defaults to dev.
- imageAspectRatio (optional): Defines aspect ratio; defaults to 1:1.
- guidanceIntensity (optional): Controls guidance scale for the diffusion process; defaults to 3.
- inferenceStepCount (optional): Number of denoising steps (1 - 50); defaults to 28.
- inputPromptIntensity (optional): Strength of the input prompt (0 - 1); defaults to 0.8.
- safetyCheckerDisabled (optional): Disables the safety checker; defaults to false.
Here’s an example JSON payload for this action:
{
"prompt": "TOKNAZCA Photo of a small brown dog, playing ball, near the north pole, the dog look on the side, and show his profil",
"imageFormat": "webp",
"outputCount": 4,
"imageQuality": 90,
"loraIntensity": 1,
"inferenceModel": "dev",
"imageAspectRatio": "1:1",
"guidanceIntensity": 3.5,
"inferenceStepCount": 50,
"inputPromptIntensity": 0.8,
"additionalLoraIntensity": 1
}
Output
The action typically returns an array of URIs pointing to the generated images. For instance, a successful response might look like this:
[
"https://assets.cognitiveactions.com/invocations/1f36a1e5-940b-4a00-bd9a-3bedf60b0d88/73bd72a1-c979-4aeb-908e-b726ecf3d816.webp",
"https://assets.cognitiveactions.com/invocations/1f36a1e5-940b-4a00-bd9a-3bedf60b0d88/a0fa09bb-6574-4afc-b295-940d1811c22e.webp",
"https://assets.cognitiveactions.com/invocations/1f36a1e5-940b-4a00-bd9a-3bedf60b0d88/8ab64049-9ef2-47ce-9e51-324f2a628838.webp",
"https://assets.cognitiveactions.com/invocations/1f36a1e5-940b-4a00-bd9a-3bedf60b0d88/17e13f60-1810-491b-825a-81f45af86298.webp"
]
Conceptual Usage Example (Python)
Here’s a conceptual Python snippet demonstrating how to call this action using a hypothetical Cognitive Actions endpoint:
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 = "7bfe85c5-ccaf-4a8b-aa4b-4db7f0f19389" # Action ID for Generate Dog-Inspired Advanced Images
# Construct the input payload based on the action's requirements
payload = {
"prompt": "TOKNAZCA Photo of a small brown dog, playing ball, near the north pole, the dog look on the side, and show his profil",
"imageFormat": "webp",
"outputCount": 4,
"imageQuality": 90,
"loraIntensity": 1,
"inferenceModel": "dev",
"imageAspectRatio": "1:1",
"guidanceIntensity": 3.5,
"inferenceStepCount": 50,
"inputPromptIntensity": 0.8,
"additionalLoraIntensity": 1
}
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}
)
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 YOUR_COGNITIVE_ACTIONS_API_KEY and the hypothetical endpoint URL with your actual API key and endpoint. The example demonstrates how to construct the input payload and handle the response effectively.
Conclusion
The klovistore2/mini-pinscher Cognitive Actions provide developers with a robust way to generate unique dog-inspired images tailored to their applications. By utilizing the Generate Dog-Inspired Advanced Images action, you can create visually appealing content that captivates your audience. Explore the various parameters available to customize your images, and consider how these capabilities could enhance your projects today!