Generate Stunning Art with the biguloff/adriana-arturovna Cognitive Actions

22 Apr 2025
Generate Stunning Art with the biguloff/adriana-arturovna Cognitive Actions

In the world of digital art and creative applications, the biguloff/adriana-arturovna API offers powerful tools to generate high-quality custom art images. With the Generate Custom Art Image action, developers can leverage advanced inpainting modes, image transformations, and various customization options to create unique visual content. This article will guide you through how to utilize this action effectively in your own applications.

Prerequisites

To get started with the Cognitive Actions, you'll need to ensure you have the following:

  • An API key for the Cognitive Actions platform. This key is essential for authenticating your requests.
  • Basic knowledge of JSON and HTTP requests, as you'll be interacting with a web API.

Authentication typically involves passing your API key in the request headers to authorize your access to the Cognitive Actions.

Cognitive Actions Overview

Generate Custom Art Image

The Generate Custom Art Image action allows you to create unique art images using an advanced inpainting mode. You can perform image-to-image transformations, tweak model parameters, and customize various aspects of the generated image to suit your creative needs.

Input

The input for this action requires a JSON object with the following fields:

  • prompt (required): A detailed description of the image you want to generate.
  • mask (optional): An image mask for inpainting mode.
  • seed (optional): A random seed for reproducible results.
  • image (optional): An input image for transformations.
  • model (optional): Model selection, with options like "dev" and "schnell".
  • width (optional): Width of the generated image.
  • height (optional): Height of the generated image.
  • loraScale (optional): Strength of the main LoRA application.
  • speedMode (optional): A boolean to run faster predictions.
  • outputCount (optional): Number of images to generate.
  • guidanceScale (optional): Guidance scale for the diffusion process.
  • outputQuality (optional): Quality level of the output images.
  • promptStrength (optional): Strength of the prompt.
  • imageAspectRatio (optional): Aspect ratio for the generated image.
  • imageOutputFormat (optional): Desired output format (webp, jpg, png).
  • inferenceStepCount (optional): Number of denoising steps.
  • disableSafetyChecker (optional): A flag to disable safety checks.
  • additionalLoraWeights (optional): Additional weights for LoRA application.
  • approximateMegapixels (optional): Indicates the megapixel count.
  • additionalLoraStrength (optional): Strength of additional LoRA weights.

Example Input:

{
  "model": "dev",
  "prompt": "Vibrantly vulgar and avant-garde fashion editorial photography for NUMERO magazine. Style of CHUANDO & FREY.",
  "loraScale": -0.97,
  "outputCount": 4,
  "guidanceScale": 2.67,
  "outputQuality": 90,
  "promptStrength": 0.8,
  "imageAspectRatio": "9:16",
  "imageOutputFormat": "png",
  "inferenceStepCount": 28,
  "additionalLoraStrength": 1
}

Output

Upon successful execution, this action returns an array of URLs pointing to the generated images.

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/e4c70f45-eb65-4d70-97f1-f9872c1d5c13/0a735b5f-ce1c-4dea-97bb-7371124a7822.png",
  "https://assets.cognitiveactions.com/invocations/e4c70f45-eb65-4d70-97f1-f9872c1d5c13/b336a98c-5c97-47d5-ae3d-08bf1a1cc9bd.png",
  "https://assets.cognitiveactions.com/invocations/e4c70f45-eb65-4d70-97f1-f9872c1d5c13/c111ea42-5863-4815-9fb8-ffae2b762275.png",
  "https://assets.cognitiveactions.com/invocations/e4c70f45-eb65-4d70-97f1-f9872c1d5c13/e69adc83-89bd-414a-9d7c-79fa88a5ecd7.png"
]

Conceptual Usage Example (Python)

Here’s a conceptual Python code snippet to help you get started with making requests 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 = "c417cdba-531c-41e4-b126-29caee963472"  # Action ID for Generate Custom Art Image

# Construct the input payload based on the action's requirements
payload = {
    "model": "dev",
    "prompt": "Vibrantly vulgar and avant-garde fashion editorial photography for NUMERO magazine. Style of CHUANDO & FREY.",
    "loraScale": -0.97,
    "outputCount": 4,
    "guidanceScale": 2.67,
    "outputQuality": 90,
    "promptStrength": 0.8,
    "imageAspectRatio": "9:16",
    "imageOutputFormat": "png",
    "inferenceStepCount": 28,
    "additionalLoraStrength": 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}  # 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 YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key.
  • The action_id corresponds to the Generate Custom Art Image action.
  • The input payload is structured according to the requirements outlined above.

Conclusion

The biguloff/adriana-arturovna Cognitive Actions provide a robust framework for generating stunning custom art images. By integrating the Generate Custom Art Image action into your applications, you can harness the power of AI to create unique visual content tailored to your needs. Whether for artistic endeavors, client projects, or personal experimentation, the possibilities are endless. Start exploring these capabilities today!