HY 3D Generation: Calling Hunyuan 3D Generation Models in Agents

Introduction

When creating 3D content, the common workflow involves manually constructing meshes in modeling software or integrating with cloud APIs and writing custom polling and download logic. Converting text, single images, or multi-view images into usable glb/obj files requires handling parameters such as task status, output format, and polygon count, resulting in high integration costs. Here, we introduce HY 3D Generation (@tencent-adm/hy-3d-generation) on SkillHub: it encapsulates Tencent Cloud Hunyuan 3D generation 3.0 and 3.1 capabilities into executable scripts and specifications for Agents, allowing you to trigger Text-to-3D, Image-to-3D, and other workflows via natural language within conversations.

About This

HY 3D Generation is an enterprise Skill (category design-media, current version 1.0.0) released by the Tencent Cloud Intelligent Creation Team. Based on the Tencent Hunyuan large model, it generates higher-precision and higher-quality 3D models from text or images. The Skill includes main.py, submit_job.py, and query_job.py, integrating with SubmitHunyuanTo3DProJob / QueryHunyuanTo3DProJob from tencentcloud.ai3d.v20250513 (Endpoint: ai3d.tencentcloudapi.com).

The SkillHub page marks requires_api_key=true: you need to activate the Hunyuan 3D service and configure API keys in Tencent Cloud before use.

Core Features

The following capabilities are consistent with the Skill summary and SKILL.md. Parameters can be selected based on the generation method:

Capability Description
Text to 3D --prompt, recommended in Chinese, up to 1024 characters
Image to 3D --image-url or --image-base64
Multi-view to 3D --multi-view JSON, views include left/right/back/top/bottom/left_front/right_front
Single Geometry (White Model) --generate-type Geometry
Sketch to 3D --generate-type Sketch, can be combined with images and prompts
Smart Topology --generate-type LowPoly, optional --polygon-type triangle/quadrilateral

Other documented options include: Model version 3.0 / 3.1 (3.1 does not support LowPoly), PBR (--enable-pbr), Polygon count 10,000–1,500,000 (--face-count), Output format STL / USDZ / FBX (default: obj+glb).

Script Specifications:

  1. main.py: Submits tasks and automatically polls; recommended for default use.
  2. submit_job.py: Only submits and returns a JobId.
  3. query_job.py: Queries or polls results by JobId.

Installation and Activation

1. Install SkillHub CLI

If it is not installed on your machine, check the version first:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub Installation Instructions (CLI only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

2. Install This Skill

When installing, you must use --dir to point to the skills directory of the current Agent; otherwise, it defaults to ./skills/ and may not be recognized. The installation method provided on the official page is: refer to https://skillhub.cn/install/skillhub.md to install @tencent-adm/hy-3d-generation.

The installation command in the CLI search index is:

skillhub install hy-3d-generation --namespace tencent-adm --dir <skills directory>

Common client skills paths (from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, record the Skill directory as <SKILL_DIR> (e.g., ~/.cursor/skills/@tencent-adm/hy-3d-generation). The script paths in the commands below are all relative to the scripts/ directory under this path.

3. Configure Tencent Cloud Keys

  1. Activate the Hunyuan 3D service at the Tencent Cloud 3D Visual Creation Console.
  2. Obtain SecretId and SecretKey at API Key Management.
  3. Set environment variables (Linux / macOS example):
export TENCENTCLOUD_SECRET_ID="your_SecretId"
export TENCENTCLOUD_SECRET_KEY="your_SecretKey"

The Skill depends on Python 3.7+ and tencentcloud-sdk-python; it will attempt to install the SDK automatically when running scripts for the first time, or you can manually run pip install tencentcloud-sdk-python.

Typical Usage

The default workflow uses the one-stop script. Replace <SKILL_DIR> with the actual installation path.

Text to 3D (Basic):

python3 <SKILL_DIR>/scripts/main.py --prompt "A cute cartoon cat"

Image to 3D:

python3 <SKILL_DIR>/scripts/main.py --image-url "https://example.com/cat.jpg"

Version 3.1 + PBR:

python3 <SKILL_DIR>/scripts/main.py --prompt "An exquisite teapot" --model 3.1 --enable-pbr

White Model (Geometry):

python3 <SKILL_DIR>/scripts/main.py --prompt "A robot" --generate-type Geometry

Submit Only, Query Later:

python3 <SKILL_DIR>/scripts/main.py --prompt "A castle" --no-poll
python3 <SKILL_DIR>/scripts/query_job.py "job-xxxxxxxxxxxx"

Upon success, the JSON will contain result_files (including download URLs and preview images for types such as glb and obj). Documentation notes: Generated file URLs are valid for 24 hours, and tasks typically take 1–5 minutes; Agent specifications require directly executing the script and returning real URLs, and fabricating results is prohibited if the API fails.

Use Cases and Precautions

Target Audience: Developers or designers in roles requiring 3D prototyping, asset generation, or multimodal sampling in Agent environments like Cursor, Claude Code, or Codex; teams that already have or can apply for a Tencent Cloud Hunyuan 3D account.

Precautions:

  • TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY must be configured. Do not write keys into the code repository.
  • Image-to-3D inputs: URL image resolution 128–5000, size ≤ 8MB; Base64 ≤ 6MB.
  • Model 3.1 and LowPoly cannot be used simultaneously (restriction from the parameter table).
  • For step-by-step scenarios, use submit_job.py + query_job.py; use query_job.py alone if a JobId already exists.

SkillHub Statistics (based on page scraping): Rating 100000, Downloads 6337, Installs 198.

Conclusion

HY 3D Generation consolidates the submission, polling, formatting, and generation types of Hunyuan 3D Generation into a set of Skill scripts and Agent execution specifications, reducing the cost of self-built integration. Official Entry Points: SkillHub Skill Page, API Coordinate Page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye