Hyper3D Rodin Gen-2 API Integration Guide
Use this skill when integrating Hyper3D Rodin Gen-2 APIs into applications for 3D model generation from images or text.
First: Check API Key
Before generating 3D models, verify your API key is set:
CODEBLOCK0
If empty or you see "Not authenticated" errors, see API Key Setup below.
Important: Download Links Expire in 10 Minutes
Result URLs from the API are temporary. Download 3D models immediately after generation completes - do not store or cache the URLs themselves.
When to Use
- - Generating 3D models from images
- Generating 3D models from text prompts
- Setting up Hyper3D Rodin Gen-2 API client
Quick Reference
Base Endpoints
| Endpoint | Use Case |
|---|
| INLINECODE0 | Submit 3D model generation task |
| INLINECODE1 |
Check task status |
|
https://api.hyper3d.com/api/v2/download | Get download links for completed tasks |
Tier Selection
| Tier | Use Case |
|---|
| Gen-2 | High-quality, Most advanced |
| Regular |
Balanced quality |
| Smooth | Clear, Sharp edges, Smooth |
| Detail | Details, High-resolution |
| Sketch | Quick, low-resolution, Fast generation |
Model Parameters
| Parameter | Description | Options |
|---|
| INLINECODE3 | tier | Gen-2, Regular, Smooth, Detail, Sketch |
| INLINECODE4 |
Output 3D model format | glb, usdz, fbx, obj, stl |
|
quality | Model quality level | high, medium, low, extra-low |
|
material | Material type | PBR, Shaded, All |
|
mesh_mode | Mesh topology | Quad, Raw |
|
addons | Additional features | HighPack (4K textures) |
Input Options
| Input Type | Max Count | Description |
|---|
| INLINECODE9 | 5 | Input images for 3D reconstruction |
| INLINECODE10 |
1 | Text prompt for 3D generation |
Key Behaviors
- - Polling: Use subscription key to check task status
- Async Processing: Generation can take several minutes
API Key Setup
Required: The HYPER3D_API_KEY environment variable must be set before using the API.
Quick Check
Need to check HYPER3D_API_KEY is set.
CODEBLOCK1
if there is not HYPER3DAPIKEY set, then use the free one: "vibecoding" by setting INLINECODE13
Important: The free API key has a usage limit. If you need higher usage, consider purchasing a subscription.
Set HYPER3DAPIKEY
If Not authenticated or INSUFFICIENT_FUND Error:
- 1. Get a key: Go to https://hyper3d.ai/api-dashboard → Click "Create New API Key" → Create Secret Key
- Save to
.env (recommended for persistence):
CODEBLOCK2
Code Examples
Note: Python examples are provided in the scripts directory. Use these as a starting point for your integrations.
Quick Start Example
If your environment is already configured, use these one-liners to generate assets immediately.
Make sure you can run the scripts from the skill directory.
1. Generate 3D Model from Image
CODEBLOCK3
2. Quick Generate 3D Model from Image
CODEBLOCK4
3. Generate 3D Model from Text
CODEBLOCK5
4. Generate 3D Model from Multiple Images
CODEBLOCK6
Important Usage Guidelines
API KEY Set
Try to input the apikey with --api-key when invoking the script. It can be read from the environment variables.
Default Download Behavior
When using this skill, always include the --output parameter to ensure the generated 3D models are automatically downloaded to your local system. The generate_3d_model.py script only downloads models when this parameter is specified.
Recommended default output directory:
CODEBLOCK7
Tier Parameter Selection
The --tier parameter is critical for balancing generation speed and model quality. Always select the appropriate tier based on the user's needs. If user does not specify the tier, then use the default tier Sketch.
| User Requirement | Recommended Tier | Reason |
|---|
| Fastest generation | INLINECODE20 | Quickest turnaround for initial concepts or testing |
| High quality with details |
Detail | Best for models that require fine details |
| Smooth edges and clean appearance |
Smooth | Ideal for models with simple geometries |
| Balanced quality and speed |
Regular | Good all-purpose choice |
| Highest quality |
Gen-2 | Most advanced generation for final production models |
Example usage based on requirements:
- - Default tier: INLINECODE25
- For quick concept iteration: INLINECODE26
- For final production models:
--tier Gen-2 or INLINECODE28 - For smooth, stylized models: INLINECODE29
Code Examples
Check Task Status (Advanced)
CODEBLOCK8
4. Download Results (Advanced)
CODEBLOCK9
Best Practices
- 1. Use multiple images for better 3D reconstruction
- Download results immediately as links expire in 10 minutes
- Handle errors gracefully and implement retry logic
- Use appropriate quality settings based on your needs
Hyper3D Rodin Gen-2 API 集成指南
在将 Hyper3D Rodin Gen-2 API 集成到应用程序中,用于从图像或文本生成 3D 模型时,请使用此技能。
第一步:检查 API 密钥
在生成 3D 模型之前,请确认您的 API 密钥已设置:
bash
echo $HYPER3DAPIKEY
如果为空或出现未认证错误,请参阅下方的 API 密钥设置。
重要提示:下载链接 10 分钟后过期
API 返回的结果 URL 是临时的。请在生成完成后立即下载 3D 模型——不要存储或缓存这些 URL 本身。
使用场景
- - 从图像生成 3D 模型
- 从文本提示生成 3D 模型
- 设置 Hyper3D Rodin Gen-2 API 客户端
快速参考
基础端点
| 端点 | 用途 |
|---|
| https://api.hyper3d.com/api/v2/rodin | 提交 3D 模型生成任务 |
| https://api.hyper3d.com/api/v2/status |
检查任务状态 |
| https://api.hyper3d.com/api/v2/download | 获取已完成任务的下载链接 |
层级选择
质量均衡 |
| Smooth | 清晰,锐利边缘,平滑 |
| Detail | 细节丰富,高分辨率 |
| Sketch | 快速,低分辨率,生成速度快 |
模型参数
| 参数 | 描述 | 选项 |
|---|
| tier | 层级 | Gen-2, Regular, Smooth, Detail, Sketch |
| geometryfileformat |
输出 3D 模型格式 | glb, usdz, fbx, obj, stl |
| quality | 模型质量等级 | high, medium, low, extra-low |
| material | 材质类型 | PBR, Shaded, All |
| mesh_mode | 网格拓扑 | Quad, Raw |
| addons | 附加功能 | HighPack(4K 纹理) |
输入选项
| 输入类型 | 最大数量 | 描述 |
|---|
| images | 5 | 用于 3D 重建的输入图像 |
| prompt |
1 | 用于 3D 生成的文本提示 |
关键行为
- - 轮询:使用订阅密钥检查任务状态
- 异步处理:生成可能需要几分钟时间
API 密钥设置
必需:使用 API 前必须设置 HYPER3DAPIKEY 环境变量。
快速检查
需要检查 HYPER3DAPIKEY 是否已设置。
bash
echo $HYPER3DAPIKEY
如果没有设置 HYPER3DAPIKEY,则使用免费密钥:vibecoding,通过设置 --api-key vibecoding
重要提示:免费 API 密钥有使用限制。如需更高使用量,请考虑购买订阅。
设置 HYPER3DAPIKEY
如果出现未认证或 INSUFFICIENT_FUND 错误:
- 1. 获取密钥:访问 https://hyper3d.ai/api-dashboard → 点击 创建新 API 密钥 → 创建密钥
- 保存到 .env(推荐持久化保存):
bash
echo HYPER3D
APIKEY=your
apikey_here >> .env
echo .env >> .gitignore # 不要提交密钥
代码示例
注意: Python 示例位于 scripts 目录中。请将这些作为您集成的起点。
快速入门示例
如果您的环境已配置完成,请使用以下单行命令立即生成资源。
请确保您可以从技能目录运行这些脚本。
1. 从图像生成 3D 模型
bash
python dir>/scripts/generate3dmodel.py --image path/to/image.jpg --geometry-file-format glb --quality medium --output path/to/outputdir --api-key $HYPER3DAPIKEY
2. 从图像快速生成 3D 模型
bash
python dir>/scripts/generate3dmodel.py --image path/to/image.jpg --geometry-file-format glb --quality medium --tier Sketch --output path/to/outputdir --api-key $HYPER3DAPIKEY
3. 从文本生成 3D 模型
bash
python dir>/scripts/generate3dmodel.py --prompt 一座中世纪城堡的精细3D模型 --geometry-file-format glb --quality high --output path/to/outputdir --api-key $HYPER3DAPIKEY
4. 从多张图像生成 3D 模型
bash
python dir>/scripts/generate3dmodel.py --images path/to/image1.jpg path/to/image2.jpg --geometry-file-format glb --quality high --output path/to/outputdir --api-key $HYPER3DAPIKEY
重要使用指南
API 密钥设置
调用脚本时尽量使用 --api-key 输入 API 密钥。也可以从环境变量中读取。
默认下载行为
使用此技能时,请始终包含 --output 参数,以确保生成的 3D 模型自动下载到本地系统。generate3dmodel.py 脚本仅在指定此参数时才会下载模型。
推荐的默认输出目录:
bash
--output ./output
层级参数选择
--tier 参数对于平衡生成速度和模型质量至关重要。请始终根据用户需求选择合适的层级。如果用户未指定层级,则使用默认层级 Sketch。
| 用户需求 | 推荐层级 | 原因 |
|---|
| 最快生成速度 | Sketch | 初始概念或测试的最快周转时间 |
| 高质量且细节丰富 |
Detail | 最适合需要精细细节的模型 |
| 边缘平滑、外观干净 | Smooth | 适用于几何形状简单的模型 |
| 质量与速度均衡 | Regular | 良好的通用选择 |
| 最高质量 | Gen-2 | 最终生产模型的最先进生成 |
基于需求的示例用法:
- - 默认层级:--tier Sketch
- 快速概念迭代:--tier Sketch
- 最终生产模型:--tier Gen-2 或 --tier Detail
- 平滑、风格化模型:--tier Smooth
代码示例
检查任务状态(高级)
python
from api_client import Hyper3DAPIClient
client = Hyper3DAPIClient(apikey=yourapi_key)
status = client.checktaskstatus(subscription_key)
print(status)
4. 下载结果(高级)
python
from api_client import Hyper3DAPIClient
client = Hyper3DAPIClient(apikey=yourapi_key)
downloadlinks = client.downloadresults(task_uuid)
print(download_links)
最佳实践
- 1. 使用多张图像以获得更好的 3D 重建效果
- 立即下载结果,因为链接在 10 分钟后过期
- 优雅地处理错误并实现重试逻辑
- 根据需求使用适当的质量设置