npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hi3d-cli

v0.1.25

Published

CLI tool and AI Agent skill for Hi3D API (hitem3d.ai): generate 3D models (GLB, OBJ, STL, FBX, USDZ, 3MF) from images, reliefs, model splitting, and multicolor

Readme

  _  _ _ _____  ___    ____ _     ___
 | || (_)___ / |  _ \  / ___| |   |_ _|
 | || | | |_ \ | | | || |   | |    | |
 | || | |___) || |_| || |___| |___ | |
 |_||_|_|____/ |____/  \____|_____|___|

Hi3D CLI (hi3d)

Generate 3D models from text or image in one command — CLI for HI3D (GLB/OBJ/STL/FBX/USDZ) for Humans & AI Agents.

npm node license

A lightweight Node.js CLI tool and AI Agent Skill for generating 3D models (GLB, OBJ, STL, FBX, USDZ, 3MF, EXR, PNG, BMP) via the Hi3D API (https://api.hitem3d.ai).

Supports single & multi-view image-to-3D, 3D relief generation, model splitting, and multicolor 3D mesh creation.

Zero runtime dependencies — requires only Node.js >= 18.


🚀 Quick Start & Setup

The executable command is hi3d:

npx -y hi3d-cli setup

The interactive setup wizard guides you through:

  1. Hi3D API Keys — Access Key (ak_...) & Secret Key (sk_...) from https://platform.hi3d.ai/console/apiKey, saved to ~/.hi3d/config.json.
  2. AI Agent Skill — offers installation of hi3d-generate skill via npx -y skills add MIt9/hi3d-skills/hi3d-generate.

🔑 Setting API Credentials

Get your API credentials from the Hi3D Console.

Set credentials via CLI or Environment Variables:

# Option 1: Interactive Wizard
hi3d setup

# Option 2: Config command
hi3d config --set-access-key ak_... --set-secret-key sk_...

# Option 3: Environment Variables
export HI3D_ACCESS_KEY=ak_...
export HI3D_SECRET_KEY=sk_...

Verify account balance:

hi3d balance

📐 Models, Resolutions & Capabilities

Generation Categories:

• image-to-3d — Single or Multi-view Image to 3D

  • Modes: Geometry-only (1), Texture staged (2), All-in-One (3)
  • Export Formats: obj, glb, stl, fbx, usdz, 3mf
    • relief — Image to 3D Relief (/open-api/v1/depth/create-task)
  • Models: pro (2K), base (1K)
  • Export Formats: exr, png, stl, glb, 3mf, bmp
  • Parameters: --height-relief (0.1..50.0), --rmbg (0/1), --degree-rmbg (0.00..1.00), --shape-base (0:square, 1:circle), --thickness-base (0.1..20.0 mm), --width (20..600 mm), --sculpmode (0:emboss, 1:engrave)
    • split — 3D Model Split (/open-api/v1/split/create-task)
  • Models: character (with --part a..f, --joint none/ball/dovetail/pin, --merge yes/no), general (with --level low/medium/high)
  • Export Formats: obj, glb, stl, fbx, usdz, 3mf
    • multicolor — 3D Model Multicolor (/open-api/v1/muilticolor/create-task)
  • Models: multicolor (with --number-color 1..8 or 0 max)
  • Export Formats: obj, glb, fbx, 3mf

Model Versions & Resolutions:

• General Models:

  • hi3dv3.0: 2048quality, 2048master (PBR support)
  • hitem3dv2.1: 1536fast, 1536pro (PBR support)
  • hitem3dv2.0: 1536, 1536pro (PBR support)
  • hitem3dv1.5: 512, 1024, 1536, 1536pro
    • Portrait Models:
  • scene-portraitv2.1: 1536profast, 1536pro (PBR support)
  • scene-portraitv2.0: 1536pro
  • scene-portraitv1.5: 1536
    • Depth Map / Relief Models:
  • pro: Higher quality model (2K)
  • base: Standard quality model (1K)
    • Split Models: character, general
    • Multicolor Models: multicolor

💻 Usage & Examples

1. Single Image to 3D

hi3d run image-to-3d \
  --image ./chair.png \
  --model hi3dv3.0 \
  --format obj \
  --resolution 2048quality \
  --wait \
  --download ./output

2. Multi-View Image to 3D

hi3d run image-to-3d \
  --multi-images ./front.jpg,./left.jpg \
  --multi-images-bit 1010 \
  --format stl \
  --wait \
  --download ./models

3. Image to 3D Relief

hi3d run relief \
  --image ./portrait.png \
  --model pro \
  --height-relief 2.5 \
  --format stl \
  --wait \
  --download ./reliefs

4. 3D Model Split & Multicolor

# Character Split
hi3d run split \
  --mesh ./character.glb \
  --model character \
  --part a \
  --joint ball \
  --format fbx \
  --wait \
  --download ./parts

# Multicolor Mesh Generation
hi3d run multicolor \
  --mesh ./model.glb \
  --number-color 4 \
  --format 3mf \
  --wait \
  --download ./multicolor

5. Query Task Status & Download

hi3d status <task_id> --download ./models

6. Safe Retries & Idempotency (paid generations)

Network drops after the API accepts a task but before the CLI saves task_id can cause duplicate paid generations on retry.

hi3d prevents this locally:

  • 10-minute recovery — identical request (same image content + model/format/resolution etc.) within 10m reuses the previous task_id: ♻️ Recovered previous task <id> submitted Xs ago … Use --force to submit a new task anyway. It queryTasks the cached ID first; if that task is still pending/success it is reused.
  • 5-minute pending lock — if the previous identical request failed before task_id was received (network timeout), the next identical request is blocked: ⚠️ Previous submission … failed before task_id was received … Use --force to override. This covers the ambiguous window where the job may have succeeded server-side.
  • --force — bypass both guards and force a new submission: hi3d run image-to-3d --image ./chair.png --wait --force
  • X-Idempotency-Key — every submit sends X-Idempotency-Key: sha256(params+imageHash) (first 32 hex chars) for server-side deduplication if the API honors it; no effect otherwise.
  • API errors (e.g. balance is not enough code=30010000) clear the pending marker immediately, so retry without --force is allowed — only network-level failures keep the lock.
  • Dry-run shows the would-be behavior: --dry-run prints _idempotencyKey and hints (dry-run) Would recover task … / Would block due to pending …

Cache: ~/.hi3d/task-cache.json (TTL 24h, last 50 entries, chmod 600). Delete it to clear history.

# Normal retry is safe — reuses previous task
hi3d run image-to-3d --image ./chair.png --wait
# → ♻️ Recovered previous task abc123 submitted 23s ago …

# Force duplicate (you accept double charge)
hi3d run image-to-3d --image ./chair.png --wait --force

# Dry-run shows key without spending credits
hi3d run image-to-3d --image ./chair.png --model hitem3dv1.5 --resolution 512 --dry-run --json
# → { ..., "_idempotencyKey": "a08013ac..." }

🤖 AI Agent Skill Integration

Install the hi3d-generate skill into your AI Agent environment (Antigravity, Cursor, Claude, etc.):

npx -y skills add MIt9/hi3d-skills/hi3d-generate