Create Stunning Custom Images with Gtonizuka

26 Apr 2025
Create Stunning Custom Images with Gtonizuka

Gtonizuka is an innovative image generation service that allows developers to create visually captivating images tailored to their specific needs. With the power of customizable parameters, Gtonizuka simplifies the process of image creation, enabling users to generate high-quality visuals quickly and efficiently. Whether you're designing promotional materials, developing immersive game environments, or crafting unique artwork, Gtonizuka provides the tools necessary to bring your creative visions to life.

Imagine being able to generate images with intricate details based on your prompts, adjusting settings like aspect ratios, resolutions, and even model speeds to suit your project. Gtonizuka caters to a variety of use cases, from marketing and advertising to game development and artistic projects, making it an invaluable asset for any developer looking to enhance their work with stunning visuals.

Prerequisites

To utilize Gtonizuka's capabilities, you'll need an API key for the Cognitive Actions service and a basic understanding of making API calls.

Generate Images with Custom Parameters

The "Generate Images with Custom Parameters" action allows you to create images using detailed prompts while offering extensive customization options. This action solves the problem of producing high-quality, tailored images that meet specific requirements for various applications.

Input Requirements

The input for this action must be provided in a structured format, including a required prompt that guides the image generation. Optional parameters allow further customization, including:

  • mask: URI of an image mask for inpainting.
  • seed: Random seed for reproducibility.
  • image: Input image for transformation.
  • width and height: Custom dimensions for the output image, when aspect ratio is set to custom.
  • fastMode: Boolean toggle for faster predictions.
  • modelType: Choose between different inference models.
  • imageFormat: Specify output formats like webp, jpg, or png.
  • outputCount: Number of images to generate, ranging from 1 to 4.

Expected Output

The output will be a generated image or images based on the input prompt and parameters. For example, an output might look like this:

  • https://assets.cognitiveactions.com/invocations/4affd9db-e009-4f65-8ff7-c08929b8261c/c7efbc59-7249-4c97-abfe-52fb7fe5e40d.jpg

Use Cases for this Action

  • Marketing Campaigns: Create unique visuals tailored to specific products or services, enhancing engagement and appeal.
  • Game Development: Generate character designs or environments that fit the desired aesthetic of the game.
  • Art Projects: Allow artists to experiment with different styles and concepts without the need for extensive manual creation.
  • Social Media Content: Quickly produce eye-catching graphics for posts, stories, and advertisements.

This action empowers developers to leverage the full potential of AI-driven image generation, making it easier than ever to produce stunning visuals that resonate with audiences.

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 = "03f54204-cf04-4615-860b-a2ef934caefb" # Action ID for: Generate Images with Custom Parameters

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "prompt": "GTOnizuka from GTO (Great Teacher Onizuka), sitting in a Japanese squat, dressed in a white suit. He is smoking a cigarette and sporting a fierce smile. It is the middle of the night in Tokyo, and we can see behind him the neon lights and the vibrant city life. The neon lights reflect on his face. He looks very classy and exudes a charismatic aura. He is smoking a cigarette. The camera is positioned in a low-angle shot, making him appear even more imposing. He is the king of the night, the king of the city. He is the boss. He is the Great Teacher Onizuka. Best quality. Masterpiece. Impressing. Dynamic pose. Very dynamic scene. Anime 2d drawing. vintage. blond hairs. anime. smoking. sitting. portrait. dynamic pose.",
  "fastMode": false,
  "modelType": "dev",
  "layerScale": 1,
  "imageFormat": "jpg",
  "outputCount": 1,
  "imageQuality": 80,
  "additionalLayer": "https://civitai.com/api/download/models/806265?type=Model&format=SafeTensor&token=bb80c9ad0ffb2845b4a52850ca18af1d",
  "imageResolution": "1",
  "promptIntensity": 0.8,
  "imageAspectRatio": "2:3",
  "guidanceIntensity": 3,
  "inferenceStepCount": 28,
  "additionalLayerScale": 1
}

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

Gtonizuka's image generation capabilities offer a powerful tool for developers looking to create custom images with ease. By providing flexible parameters for customization, it opens up new possibilities for various projects, from marketing to artistic endeavors. As you explore Gtonizuka, consider how these image generation features can enhance your work and streamline your creative process. Start integrating Gtonizuka into your projects today and unlock the potential for breathtaking visuals tailored to your unique vision.