Generate Stunning Pony Images with Aisha AI's Pony-Realism v2.2 Actions

24 Apr 2025
Generate Stunning Pony Images with Aisha AI's Pony-Realism v2.2 Actions

In the realm of image generation, Aisha AI's Pony-Realism v2.2 offers a powerful way to create visually stunning and highly realistic pony images using customizable text prompts. This specification features a pre-built action that simplifies the process of generating images tailored to user preferences, making it an ideal choice for developers looking to enhance their applications with unique visual content.

Prerequisites

Before you start using the Cognitive Actions in the Pony-Realism v2.2 spec, ensure that you have the following:

  • An API key for accessing the Cognitive Actions platform.
  • Basic understanding of JSON and API requests.

Authentication is typically handled by including the API key in the headers of your HTTP requests. For example, you would pass the API key in the Authorization header.

Cognitive Actions Overview

Generate Realistic Pony Image

The Generate Realistic Pony Image action allows you to produce high-quality pony images based on descriptive text prompts. This action is categorized under image generation and provides a wide array of customization options, including resolution, adherence to prompts, and image quality.

Input

The input schema for this action is a JSON object containing several fields:

  • seed (integer): A value for generating variability in output. Default is -1 for a random seed.
  • model (string): Specifies the model version. Default is "Pony-Realism-v2.2".
  • steps (integer): Number of processing steps for generation. Ranges from 1 to 100, defaulting to 30.
  • width (integer): Width of the image in pixels (1 to 4096). Default is 1024.
  • height (integer): Height of the image in pixels (1 to 4096). Default is 1024.
  • prompt (string): Text prompt guiding the image generation. Default includes descriptive features.
  • cfgScale (number): Controls adherence to the prompt (1 to 50). Default is 5.
  • clipSkip (integer): Number of CLIP layers to skip. Default is 2.
  • pagScale (number): Enhances image quality (0 to 50). Default is 3.
  • vaeModel (string): Specifies the Variational Autoencoder model. Default is "default".
  • batchSize (integer): Number of images generated per batch (1 to 4). Default is 1.
  • scheduler (string): Transition scheduler for generation. Default is "Euler a".
  • negativePrompt (string): Specifies elements to exclude from the image. Default is "nsfw, naked".
  • guidanceRescale (number): Adjusts noise control (0 to 5). Default is 0.5.
  • prependPreprompt (boolean): Whether to prepend a standardized preprompt. Default is true.

Example Input:

{
  "seed": -1,
  "model": "Pony-Realism-v2.2",
  "steps": 30,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
  "cfgScale": 5,
  "clipSkip": 2,
  "pagScale": 3,
  "vaeModel": "default",
  "batchSize": 1,
  "scheduler": "Euler a",
  "negativePrompt": "nsfw, naked",
  "guidanceRescale": 0.5,
  "prependPreprompt": true
}

Output

The action typically returns a URL pointing to the generated image. For example:

[
  "https://assets.cognitiveactions.com/invocations/5d174e4a-8683-482f-8061-8cef72fe78b0/78912cb5-43bd-494f-92c0-4061282dc07f.png"
]

Conceptual Usage Example (Python)

Here is how you might structure a call to the Cognitive Actions execution endpoint using Python:

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 = "99804ac1-c570-4d94-af6a-782ef3851774"  # Action ID for Generate Realistic Pony Image

# Construct the input payload based on the action's requirements
payload = {
    "seed": -1,
    "model": "Pony-Realism-v2.2",
    "steps": 30,
    "width": 1024,
    "height": 1024,
    "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, V",
    "cfgScale": 5,
    "clipSkip": 2,
    "pagScale": 3,
    "vaeModel": "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"
}

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 is set to the ID of the Generate Realistic Pony Image action, and the input payload is structured according to the specified requirements.

Conclusion

The Aisha AI Pony-Realism v2.2 action is a powerful tool for developers looking to integrate realistic image generation into their applications. By leveraging customizable parameters, users can create unique pony images that meet specific needs. Whether you’re building a game, an art project, or a creative application, this action opens up exciting possibilities for enhanced visual storytelling. Start experimenting today to take your projects to the next level!