PrintPal 3D Generation
Scanned@plebbyd
npx machina-cli add skill @plebbyd/printpal-3d --openclawPrintPal 3D Model Generator
Generate 3D models from images or text prompts for 3D printing.
Quick Start
From an image path or URL:
python3 {baseDir}/scripts/generate_3d.py --image /path/to/image.png
From text prompt:
python3 {baseDir}/scripts/generate_3d.py --prompt "a cute robot toy"
Workflow
-
Get the image:
- If user provides a file path → use it directly
- If user provides a URL → download it
- If user pastes an image → use it directly (it will be available as a file path or URL in context)
- If user provides text → generate image via WaveSpeed first
-
Generate 3D model:
- Use PrintPal API with
superquality (768 cubed) - Default output format: STL
- Save to
printpal-output/directory in workspace
- Use PrintPal API with
-
Provide downloads:
- Start file server if needed
- Return clickable URLs
Default Settings
| Setting | Default | Options |
|---|---|---|
| Quality | super | default, high, ultra, super, super_texture, superplus, superplus_texture |
| Format | stl | stl, glb, obj, ply, fbx |
Scripts
generate_3d.py
Main script for generating 3D models.
python3 scripts/generate_3d.py [OPTIONS]
Options:
-i, --image PATH Input image file path or URL
-p, --prompt TEXT Text prompt (uses WaveSpeed to generate image first)
-q, --quality TEXT Quality level (default: super)
-f, --format TEXT Output format (default: stl)
-o, --output-dir DIR Output directory
--json Output results as JSON
serve_files.py
Start HTTP server for file downloads.
python3 scripts/serve_files.py [OPTIONS]
Options:
-d, --directory DIR Directory to serve (default: printpal-output/)
-p, --port PORT Port number (default: 8765)
Quality Levels
| Quality | Resolution | Credits | Est. Time |
|---|---|---|---|
| default | 256³ | 4 | 20 sec |
| high | 384³ | 6 | 30 sec |
| ultra | 512³ | 8 | 60 sec |
| super | 768³ | 20 | 3 min |
| superplus | 1024³ | 30 | 4 min |
Output Formats
| Format | Best For |
|---|---|
| STL | 3D printing (default) |
| GLB | Web/games |
| OBJ | Universal compatibility |
| PLY | Point clouds |
| FBX | Autodesk software |
API Keys
Required environment variables (configure in ~/.openclaw/openclaw.json under env):
PRINTPAL_API_KEY- Get from https://printpal.io/api-keysWAVESPEED_API_KEY- Get from https://wavespeed.ai/accesskey (optional, for text-to-image)
Output Directory
Files are saved to printpal-output/ in the workspace.
Error Handling
| Error | Solution |
|---|---|
| WAVESPEED_API_KEY not set | Provide image directly or configure API key |
| PRINTPAL_API_KEY not set | Configure in OpenClaw settings |
| Insufficient credits | Purchase at printpal.io/buy-credits |
| Package not installed | Run pip install printpal wavespeed |
Reference
For detailed API documentation, see api-reference.md.
Overview
PrintPal 3D Model Generator creates STL/GLB/OBJ files from images or text prompts for 3D printing. It supports text-to-image generation via WaveSpeed when a WAVESPEED_API_KEY is configured and saves outputs to the printpal-output/ folder for easy access.
How This Skill Works
It accepts input as a local image path, a URL, a pasted image, or a text prompt. If you provide a text prompt and WaveSpeed is configured, it generates an image first, then calls the PrintPal API with the default super quality (768 cubed) to produce an STL by default, saving results to printpal-output/.
When to Use It
- Convert an image path or URL into a printable STL model for prototyping.
- Generate a 3D asset from a descriptive prompt, optionally via WaveSpeed-generated imagery.
- Export models in STL, GLB, OBJ, PLY, or FBX for different workflows.
- Save outputs to printpal-output/ for easy download and sharing.
- Enable text-to-image generation by configuring WAVESPEED_API_KEY when using prompts.
Quick Start
- Step 1: Use an input method, e.g., python3 {baseDir}/scripts/generate_3d.py --image /path/to/image.png or --prompt a cute robot toy
- Step 2: Run with desired options, e.g., python3 scripts/generate_3d.py -q super -f stl -o printpal-output/
- Step 3: Start the file server to share downloads, e.g., python3 scripts/serve_files.py -d printpal-output/
Best Practices
- Provide a clean input image or a precise, concise prompt to minimize edits.
- Start with quality set to super for high detail; adjust based on file size and print needs.
- Choose the output format to match downstream tools (STL for printing, GLB/OBJ for apps).
- Ensure PRINTPAL_API_KEY is configured; enable WAVESPEED_API_KEY if doing text-to-image generation.
- After generation, verify files in printpal-output/ and use serve_files.py for shareable links.
Example Use Cases
- Create a cute robot toy from a text prompt and export STL for 3D printing.
- Convert a product photo into an STL file for rapid prototyping.
- Generate a character bust from a description and export OBJ for sculpting software.
- Produce a web-ready GLB asset from concept art for a lightweight game scene.
- Publish a cosplay prop model by generating a high-detail STL and sharing via a local server.