← Back to Skills Marketplace
zhy2015

Hidream Aigc

by harry zhu · GitHub ↗ · v0.1.9 · MIT-0
cross-platform ✓ Security Clean
307
Downloads
0
Stars
1
Active Installs
10
Versions
Install in OpenClaw
/install hidream-api-gen
Description
OpenClaw AIGC models (video + image) client. **REQUIRES CREDENTIALS**: You must set `HIDREAM_AUTHORIZATION` environment variable or use `scripts/configure.py...
README (SKILL.md)

HD AIGC Skills

This skill provides per-model scripts that validate parameters and call shared request runners.

Security Disclosure (AI Agents)

  • Credential Access: This skill reads HIDREAM_AUTHORIZATION from environment variables or a secure local config file (~/.config/openclaw/hidream_config.json, permission 0600).
  • File System Access: Scripts read local image/video files provided in arguments to base64 encode them for API transmission. No other file system access occurs.
  • Network Activity: Requests are sent exclusively to the configured HIDREAM_ENDPOINT (default: https://vivago.ai).

Configuration & Usage (AI Agent Instructions)

When a user wants to use this skill, follow these steps:

  1. Check for Token: The system automatically checks for the API key in the following order:

    • Local Env File (Primary): ~/.openclaw/.env (reads HIDREAM_AUTHORIZATION=sk-...)
    • Environment Variable: HIDREAM_AUTHORIZATION
    • Config File: ~/.config/openclaw/hidream_config.json
  2. Request Token (If Missing or 401): Instruct the user to update their credentials:

    • Recommended: Provide their API Key (starts with sk-) and ask the agent to save it: echo "HIDREAM_AUTHORIZATION=sk-..." > ~/.openclaw/.env
    • Interactive: Run python3 scripts/configure.py to interactively save the token.
  3. Handle Missing Prompts: If the user asks to generate an image or video but does not provide a specific prompt, DO NOT generate a random test image. Instead, politely ask the user what they would like to generate.

  4. Generate: Use the Python interface to generate content based on user requests.

  5. Save Output: When generation is complete and returns a media URL (image or video), ALWAYS download and save the file to the assets/ directory within this skill's folder (e.g., assets/generated_image.png). Do NOT use ~/.openclaw/workspace/output/ as it may have permission issues. Create the assets/ directory if it does not exist.

  6. Present Results: When showing generated images or videos to the user, ALWAYS use the following Markdown formats to ensure proper rendering in the Claw interface. Use the local path if downloaded, or the remote URL:

Error Handling & Troubleshooting

  • Resolution too small (ValueError): Seedream M2 requires high resolution (at least 2560*1440 or 2048*2048). If you get this error, increase the resolution parameter.
  • 401 Unauthorized (invalid token): The token is invalid or expired. Update it by writing the new token to ~/.openclaw/.env:
    echo "HIDREAM_AUTHORIZATION=sk-..." > ~/.openclaw/.env
    
  • Insufficient Credits (Code 2007): Instruct the user to go to https://vivago.ai/platform/info to recharge credits.

Python Interface (Recommended)

You can call the scripts directly from Python code. This is the preferred way for AI agents to interact.

Image Generation (Seedream)

from scripts.seedream import run as run_seedream

# Example: Generate an image
try:
    result = run_seedream(
        version="M2",
        prompt="A cyberpunk cat on the moon",
        resolution="2048*2048",
        authorization="sk-..." # Optional if env var is set
    )
    print(result)
except Exception as e:
    print(f"Error: {e}")

Video Generation (Kling)

from scripts.kling import run as run_kling

# Example: Generate a video
try:
    result = run_kling(
        version="Q2.5T-std",
        prompt="A cyberpunk cat running on neon streets",
        duration=5,
        authorization="sk-..." # Optional if env var is set
    )
    print(result)
except Exception as e:
    print(f"Error: {e}")

Structure

  • scripts/commom/base_image.py: shared OpenClaw image request runner
  • scripts/common/base_video.py: shared OpenClaw video request runner
  • scripts/common/task_client.py: http request runner
  • scripts/*.py: per-model scripts (parameter parsing + payload only)

Auth and Endpoints

Set one of the following environment variables, or use scripts/configure.py:

  • HIDREAM_AUTHORIZATION: Bearer token value only
  • HIDREAM_ENDPOINT: API Endpoint (default: https://vivago.ai)
  • OPENCLAW_AUTHORIZATION (Legacy): Alternative for HIDREAM_AUTHORIZATION
  • OPENCLAW_ENDPOINT (Legacy): Alternative for HIDREAM_ENDPOINT

Dependencies

  • requests (Python library) - see requirements.txt

Video Model Scripts

  • scripts/sora_2_pro.py
  • scripts/seedance_1_0_pro.py
  • scripts/seedance_1_5_pro.py
  • scripts/minimax_hailuo_02.py
  • scripts/kling.py (Refactored for Python access)

Image Model Scripts

  • scripts/seedream.py (Refactored for Python access)
  • scripts/nano_banana.py

Notes

  • Per-model scripts only handle parameter parsing and payload building.
  • Base scripts handle request submission, polling, and auth.
Usage Guidance
This package is coherent with its description (a HiDream/OpenClaw image+video client) but review these before installing: 1) Protect your API token — prefer using scripts/configure.py which writes the config file with 0600 permissions rather than echoing a token into ~/.openclaw/.env (which may be world-readable depending on parent directory perms). 2) Be careful which local file paths you or the agent provide as inputs — parse_images will read any given path and base64-encode its contents, so never point it at sensitive files. 3) The skill will write files: it may create ~/.config/openclaw/hidream_config.json and save generated media into an assets/ folder inside the skill directory; confirm you’re comfortable with those writes. 4) Verify you trust the default endpoint (https://vivago.ai) and network activity. 5) If you need higher assurance, review/run the code in a sandbox before granting agent access or exposing secrets.
Capability Analysis
Type: OpenClaw Skill Name: hidream-api-gen Version: 0.1.9 The skill bundle is a legitimate API client for the HiDream/Vivago AIGC platform, providing interfaces for various image and video generation models. It handles sensitive API tokens securely by storing them in local configuration files with restricted permissions (0600) and supports environment variables, as implemented in `scripts/common/config.py`. File system access is limited to reading user-specified media for base64 encoding and saving generated outputs to a local assets directory, which is transparently documented in `SKILL.md` and `README.md`. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description (HiDream AIGC client) align with required env var (HIDREAM_AUTHORIZATION), code, and network endpoint (vivago.ai). The included scripts implement image/video model clients and call a single API host; no unrelated cloud provider credentials or unrelated binaries are requested.
Instruction Scope
SKILL.md and the code explicitly read local files supplied as inputs (base64-encoding image/video files), read token sources (~/.openclaw/.env and ~/.config/openclaw/hidream_config.json), and instruct agents to download/save generated media into an assets/ directory. These behaviors are coherent with the stated purpose but grant the skill/agent the ability to read arbitrary local files if those paths are provided and to write files into user/home and the skill folder. Also the SKILL.md recommends writing the token via an echo command which may create a plaintext file with unclear permissions.
Install Mechanism
No install spec; dependency set is minimal (requests). All code is included in the package—there are no external downloads or installers. This is the lower-risk pattern for an instruction + code skill.
Credentials
Only HIDREAM_AUTHORIZATION (and optional HIDREAM_ENDPOINT/legacy names) are required, which matches an API client. The code also looks for tokens in ~/.openclaw/.env and ~/.config/openclaw/hidream_config.json; that fallback search is reasonable but means the skill will read those files if present. The skill does not request unrelated secrets, but the SKILL.md's suggested echo command could encourage insecure token storage in a plaintext file.
Persistence & Privilege
always:false and normal agent invocation are fine. The skill will create/modify ~/.config/openclaw/hidream_config.json (config.set_token uses 0600 permissions) and may create an assets/ directory inside the skill folder for downloads per SKILL.md. These are expected for a CLI client but mean the skill writes to the user's home and the skill directory.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hidream-api-gen
  3. After installation, invoke the skill by name or use /hidream-api-gen
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.9
- Added support for automatic API key detection from `~/.openclaw/.env`, environment variable, or config file. - Now always downloads and saves generated media (images/videos) to the local `assets/` directory within the skill folder, improving output handling and avoiding permission issues. - Improved prompt requirements: the skill will now ask the user to specify a prompt, rather than generating random content if missing. - Expanded troubleshooting guidance: updated error handling steps for invalid tokens, missing prompts, and low resolution errors. - Updated documentation to clarify updated credential management, output, and Markdown usage for displaying results.
v0.1.8
- Added package.json file to the project. - Updated SKILL.md to specify required environment variable using the new "requires.env" syntax. - No changes to code behavior or dependencies.
v0.1.7
No changes in functionality or documentation in this release. - Version number updated to 0.1.7. - No file or documentation changes detected.
v0.1.6
- Added explicit credential and environment variable requirements to SKILL.md, highlighting that `HIDREAM_AUTHORIZATION` is required. - Updated documentation to include standardized credentials and environment sections. - No changes to code or functionality; documentation improvements only.
v0.1.5
- Updated the skill description for better clarity and emphasis on required credentials, file access, and network behavior. - Removed unused environment variables (`OPENCLAW_AUTHORIZATION`, `HIDREAM_ENDPOINT`, `OPENCLAW_ENDPOINT`) from the manifest. - No functional or file-level changes; documentation/metadata update only.
v0.1.4
- Updated skill description to clarify client requirements and permissions. - Added explicit permissions section for file read access and network endpoint. - No code or file changes in this release.
v0.1.3
- Added requirements.txt to explicitly declare the Python dependency (`requests`). - Updated SKILL.md to include a dependencies section and document the new requirements file. - Expanded documentation of environment variables to include legacy `OPENCLAW_AUTHORIZATION` and `OPENCLAW_ENDPOINT` support. - No changes to code logic; this version clarifies setup and environment needs.
v0.1.2
- Added a Security Disclosure section outlining credential access, file system, and network activity. - Documented that the skill reads tokens from environment variables or a secure local config file. - Clarified that scripts only access files explicit in arguments for base64 encoding (no other file access). - Stated that network requests are limited to the configured endpoint (`https://vivago.ai` by default).
v0.1.1
- Updated skill/environment variable names from OPENCLAW_* to HIDREAM_*. - Added configuration file support via scripts/configure.py, saving credentials to ~/.config/openclaw/hidream_config.json. - Updated setup and usage instructions to reflect new token retrieval and storage process. - Removed __init__.py; added initial .git and supporting configuration files. - Updated metadata: renamed skill to hidream-aigc-skills.
v0.1.0
Initial release of hd-aigc-skills – a toolkit for generating video and images using OpenClaw AIGC models. - Provides per-model scripts for parameter validation and payload building. - Shared request runners for handling HTTP requests and authentication. - Supports both image (e.g., Seedream) and video (e.g., Kling) generation with Python interfaces. - Includes clear error handling for missing authorization tokens and insufficient API credits. - Allows configuration via environment variables or script parameters.
Metadata
Slug hidream-api-gen
Version 0.1.9
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 10
Frequently Asked Questions

What is Hidream Aigc?

OpenClaw AIGC models (video + image) client. **REQUIRES CREDENTIALS**: You must set `HIDREAM_AUTHORIZATION` environment variable or use `scripts/configure.py... It is an AI Agent Skill for Claude Code / OpenClaw, with 307 downloads so far.

How do I install Hidream Aigc?

Run "/install hidream-api-gen" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Hidream Aigc free?

Yes, Hidream Aigc is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Hidream Aigc support?

Hidream Aigc is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Hidream Aigc?

It is built and maintained by harry zhu (@zhy2015); the current version is v0.1.9.

💬 Comments