Create Stunning Videos in the Style of Westworld with Hunyuan

26 Apr 2025
Create Stunning Videos in the Style of Westworld with Hunyuan

Hunyuan Westworld offers developers an innovative way to generate captivating videos inspired by the visual aesthetics of the popular series "Westworld." Utilizing advanced AI-driven video generation techniques, this service simplifies the creative process, allowing you to produce high-quality videos that echo the show's distinctive style. Whether you're working on a marketing campaign, a short film, or simply exploring creative possibilities, Hunyuan Westworld provides a powerful toolset to bring your visions to life.

Imagine being able to create an atmospheric video that captures the essence of Westworld with just a few lines of descriptive text. This cognitive action not only saves time but also enhances your creative capacity by providing a rich, stylistic foundation. Common use cases include generating promotional content, artistic expressions, or even experimental projects that require unique video styles.

Generate Westworld Style Video

The "Generate Westworld Style Video" action enables you to create videos that reflect the stylistic elements of the Westworld series. By leveraging the Hunyuan-Video model, this action solves the challenge of producing visually striking content that resonates with fans and viewers alike.

Input Requirements

To utilize this action, you'll need to provide several input parameters:

  • Prompt: A detailed description of the video scene you wish to create, ideally starting with "A video in the style of WSTWR, WSTWR."
  • Seed: An integer that helps ensure consistency across video generations (optional).
  • Steps: Specifies the number of diffusion steps for video generation, ranging from 1 to 150.
  • Width and Height: Dimensions of the output video in pixels.
  • Frame Count: Total frames in the generated video, from 1 to 1440.
  • Frame Rate: Number of frames displayed per second.
  • Scheduler: The algorithm for scheduling video frames.
  • Lora Strength: The scale applied to your LoRA model.
  • Additional parameters like flowShift, denoiseStrength, and enhancement settings to fine-tune the output.

Expected Output

The output will be a video file that captures the essence of your prompt, available as a URL link. For example, a successful invocation might return a link to a video like this:
https://assets.cognitiveactions.com/invocations/9f46d1e6-c7f9-4053-8902-a940172f6e8b/e7d60768-2451-4f9c-b0d9-56fdfdd22ee5.mp4

Use Cases for this Specific Action

  • Marketing Campaigns: Create promotional videos that align with the themes of Westworld to engage your audience.
  • Creative Projects: Experiment with video art or storytelling by generating clips that reflect a specific narrative or emotional tone.
  • Content Creation: Enhance your social media presence by producing visually stunning video content that draws in viewers.

```python
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 = "cba21b02-58d4-4811-aa7e-8a5134b20731" # Action ID for: Generate Westworld Style Video

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "seed": 12345,
  "steps": 50,
  "width": 640,
  "height": 360,
  "prompt": "A video in the style of WSTWR, WSTWR The video clip depicts a detailed portrait of a woman's face. She has fair skin and bright, intense blue eyes that gaze directly ahead. Her hair is dark and wavy, cascading down her shoulders in a curly pattern. She is dressed in a dark dress with a square neckline adorned with intricate metallic accents. The dress has a detailed, almost mosaic-like pattern, suggesting a ceremonial or formal attire.\nThe woman's expression is stoic and serious, conveying a sense of determination or resolve. The background is dark, contrasting with the intricate details of her dress and the brightness of her eyes. The lighting is soft and diffused, casting a warm glow on",
  "modelUrl": "",
  "flowShift": 9,
  "frameRate": 16,
  "scheduler": "DPMSolverMultistepScheduler",
  "frameCount": 66,
  "forceOffload": true,
  "loraStrength": 1,
  "guidanceScale": 6,
  "qualityFactor": 19,
  "denoiseStrength": 1,
  "enhancementEndTime": 1,
  "enhancementIntensity": 0.3,
  "enhancementStartTime": 0,
  "doubleFrameEnhancement": true,
  "singleFrameEnhancement": true
}

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

Hunyuan Westworld empowers developers to craft visually compelling videos with minimal effort. By harnessing the capabilities of AI-driven video generation, you can focus on creative storytelling while leaving the technical complexities to the model. Whether you're creating art, marketing content, or exploring new video concepts, this action opens up exciting possibilities. 

To get started, ensure you have your Cognitive Actions API key and familiarize yourself with the API call structure. Dive into the world of video creation today and let your imagination run wild!