feat: full format compatibility adaptation for model downloads

- Add get_model_urls() and download_model() to api.py and api_complete.py
  supporting all 14 discovered urlResult format keys (glb, obj, pbr maps, etc.)
- Update generator.py to extract full urlResult dict instead of just modelUrl
- Add CLI subcommands: formats (list available formats) and download (fetch by key)
- Update reverse engineering docs with complete format key table and CLI examples
This commit is contained in:
KawasakiAkasei
2026-05-27 11:59:48 +08:00
parent 58ab0d6655
commit ad3c86b8ba
6 changed files with 261 additions and 9 deletions

View File

@@ -131,6 +131,16 @@ api = Hunyuan3DAPIComplete()
result = api.generate_from_image(resource_url, title="My Model")
```
### 4. CLI Download
```bash
# List available formats for a creation
hunyuan3dweb formats <creation_id>
# Download a specific format (default: glb)
hunyuan3dweb download <creation_id> --format glb -o model.glb
```
---
## API Endpoints
@@ -150,6 +160,27 @@ result = api.generate_from_image(resource_url, title="My Model")
| Global config | GET | `/config` | Query params |
| Animation templates | GET | `/workflow/action/templates` | Query params |
### Model Download Formats
The `urlResult` field in `/creations/detail` contains up to 14 format keys:
| Key | Description |
|-----|-------------|
| `glb` | GLB binary model with PBR textures |
| `obj` | OBJ model (usually zipped) |
| `mtl` | MTL material file |
| `obj_url` | Standalone OBJ file URL |
| `geometryGlb` | Geometry-only GLB (no materials) |
| `textureGlb` | GLB texture pack |
| `textureObj` | OBJ texture pack |
| `image_url` | Preview / thumbnail image |
| `pbrImage` | Combined PBR texture map |
| `pbrMetallicImage` | PBR metallic map |
| `pbrRoughnessImage` | PBR roughness map |
| `pbrNormalImage` | PBR normal map |
| `invisible_wall` | Invisible collision wall |
| `air_wall` | Air wall (collision body) |
---
## Technical Details