Create Stunning Images with Zeke's ZIKI Flux Cognitive Actions

22 Apr 2025
Create Stunning Images with Zeke's ZIKI Flux Cognitive Actions

In the world of AI-driven creativity, the Zeke/Ziki-Flux API opens up exciting possibilities for developers looking to generate unique images using the Flux fine-tuning model. By harnessing the power of customizable image attributes and the distinctive "ZIKI" style, these pre-built Cognitive Actions allow you to create stunning artwork tailored to your specifications. Whether you're developing a content creation tool, a personalized art generator, or an engaging storytelling application, integrating these actions can elevate your project with visually striking results.

Prerequisites

Before diving into the Cognitive Actions, ensure you have the following ready:

  • An API key for the Cognitive Actions platform, which you will need to authenticate your requests.
  • Familiarity with JSON for structuring your input and output data.

Authentication typically involves passing your API key in the request headers, allowing you to securely access the action endpoints.

Cognitive Actions Overview

Generate Flux Image with ZIKI Style

The Generate Flux Image with ZIKI Style action utilizes a fine-tuned model to create images inspired by the real-life human Zeke. This action allows for a high degree of customization, enabling developers to specify various image attributes to achieve desired artistic results.

Input

The input for this action requires a well-defined structure, as shown below. The prompt is essential, guiding the image generation process.

{
  "model": "dev",
  "prompt": "ZIKI, a rugged adult man with weather-beaten features, standing atop Mount Everest at dawn, his oxygen mask removed to reveal his triumphant smile as he surveys the breathtaking view below.",
  "loraScale": 1,
  "guidanceScale": 3.5,
  "numberOfOutputs": 1,
  "imageOutputFormat": "webp",
  "numInferenceSteps": 28,
  "aspectRatioSetting": "1:1",
  "imageOutputQuality": 80,
  "additionalLoraScale": 0.8
}

Output

Upon successful execution, the action returns an array of URLs pointing to the generated images. Here’s a sample output:

[
  "https://assets.cognitiveactions.com/invocations/97787cd8-440c-43da-bd6f-889ab601f5b4/03255cba-e274-4964-9d41-2efbd279e81d.webp"
]

Conceptual Usage Example (Python)

Here is a conceptual Python code snippet demonstrating how to invoke the Generate Flux Image with ZIKI Style action. Ensure to replace placeholders with actual values:

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 = "4b08109b-a9ce-41bc-8199-e17fdf37ee76"  # Action ID for Generate Flux Image with ZIKI Style

# Construct the input payload based on the action's requirements
payload = {
    "model": "dev",
    "prompt": "ZIKI, a rugged adult man with weather-beaten features, standing atop Mount Everest at dawn, his oxygen mask removed to reveal his triumphant smile as he surveys the breathtaking view below.",
    "loraScale": 1,
    "guidanceScale": 3.5,
    "numberOfOutputs": 1,
    "imageOutputFormat": "webp",
    "numInferenceSteps": 28,
    "aspectRatioSetting": "1:1",
    "imageOutputQuality": 80,
    "additionalLoraScale": 0.8
}

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 snippet:

  • Replace "YOUR_COGNITIVE_ACTIONS_API_KEY" with your actual API key.
  • The action ID is specified, and the input payload is structured according to the required schema.
  • The response is handled gracefully, and any errors are reported clearly.

Conclusion

Integrating the Zeke/Ziki-Flux Cognitive Actions into your applications empowers you to generate captivating images with ease. The ability to customize various attributes ensures that your generated content aligns with your creative vision. Explore these actions further, experiment with different prompts, and see how they can enhance your projects. Happy coding!