Create Engaging Tarot Videos with the aramintak/ettienne-tarot-style Cognitive Actions

23 Apr 2025
Create Engaging Tarot Videos with the aramintak/ettienne-tarot-style Cognitive Actions

In the realm of digital creativity, the aramintak/ettienne-tarot-style API offers developers powerful Cognitive Actions to bring tarot-themed animated videos to life. With just a few inputs, you can transform an image into an engaging video narrative, tapping into the allure of tarot imagery combined with your unique text prompts. This article explores how to leverage these actions effectively, focusing on one primary action that allows you to generate captivating tarot videos.

Prerequisites

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

  • An API key from the Cognitive Actions platform, which will be required for authentication.
  • Familiarity with making HTTP requests and handling JSON data in your preferred programming language.
  • Basic understanding of video generation concepts and how image transformation works.

Authentication is typically managed by passing your API key in the request headers, enabling secure interactions with the Cognitive Actions service.

Cognitive Actions Overview

Generate Tarot Video from Image

The Generate Tarot Video from Image action allows you to create a tarot-themed animated video based on an initial image frame and a customizable text prompt. This action is particularly useful for developers looking to add dynamic, visually appealing content to their applications.

Input

The input for this action consists of several parameters that allow customization of the video generation process:

  • prompt (required): A text prompt for video generation (e.g., "a solar priestess woman holding the moon aloft, illustration style").
  • seed (optional): An integer seed for consistent output.
  • image (optional): URI of the image to initiate image-to-video transformation.
  • frameCount (optional): Choose the number of frames to generate (default is 81).
  • generationSpeed (optional): Choose a speed for video generation (default is "Balanced").
  • videoResolution (optional): Select the video resolution (default is "480p").
  • videoAspectRatio (optional): Determine the aspect ratio for the video (default is "16:9").
  • numberOfSampleSteps (optional): Define the number of steps for video generation (default is 30).
  • samplingShiftFactor (optional): A factor used in sampling shift during the generation process (default is 8).
  • clipModelLoraStrength (optional): Strength of the LoRA applied in the CLIP model (default is 1).
  • guidanceScalingFactor (optional): A scale influencing adherence to the prompt (default is 5).
  • overallModelLoraStrength (optional): Specify the overall LoRA strength applied to the model (default is 1).
  • undesiredContentDescription (optional): Outline elements to exclude from the video output.

Here’s an example of the JSON payload needed to invoke this action:

{
  "prompt": "a solar priestess woman holding the moon aloft, illustration style",
  "frameCount": 81,
  "generationSpeed": "Balanced",
  "videoResolution": "480p",
  "videoAspectRatio": "16:9",
  "numberOfSampleSteps": 30,
  "samplingShiftFactor": 8,
  "clipModelLoraStrength": 1,
  "guidanceScalingFactor": 5,
  "overallModelLoraStrength": 1,
  "undesiredContentDescription": ""
}

Output

When the action is successfully executed, it returns a URL pointing to the generated video. For example:

[
  "https://assets.cognitiveactions.com/invocations/c71dae0c-84e1-4139-843c-60ebd234df07/e7b9e704-9dd9-4e5a-bee9-f45d9676575a.mp4"
]

This URL can be used to access and display the video in your application.

Conceptual Usage Example (Python)

Here’s a conceptual Python snippet demonstrating how to invoke the Generate Tarot Video from Image action:

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 = "b4885d15-f930-48c4-acc9-8920c16b5fa3" # Action ID for Generate Tarot Video from Image

# Construct the input payload based on the action's requirements
payload = {
    "prompt": "a solar priestess woman holding the moon aloft, illustration style",
    "frameCount": 81,
    "generationSpeed": "Balanced",
    "videoResolution": "480p",
    "videoAspectRatio": "16:9",
    "numberOfSampleSteps": 30,
    "samplingShiftFactor": 8,
    "clipModelLoraStrength": 1,
    "guidanceScalingFactor": 5,
    "overallModelLoraStrength": 1,
    "undesiredContentDescription": ""
}

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 corresponds to the Generate Tarot Video from Image action.
  • The payload is constructed using the required and optional parameters as explained earlier.

Conclusion

The aramintak/ettienne-tarot-style Cognitive Actions provide an exciting opportunity for developers to create tarot-themed videos with minimal effort. By utilizing the Generate Tarot Video from Image action, you can engage users with captivating visual content tailored to your specifications. Explore further applications, experiment with different prompts and settings, and integrate this powerful video generation capability into your projects!