{"version":1,"resources":["https://stablemesh.dev/api/text-to-3d","https://stablemesh.dev/api/text-to-3d/{id}","DELETE https://stablemesh.dev/api/text-to-3d/{id}","https://stablemesh.dev/api/image-to-3d","https://stablemesh.dev/api/image-to-3d/{id}","DELETE https://stablemesh.dev/api/image-to-3d/{id}","https://stablemesh.dev/api/multi-image-to-3d","https://stablemesh.dev/api/multi-image-to-3d/{id}","DELETE https://stablemesh.dev/api/multi-image-to-3d/{id}","https://stablemesh.dev/api/retexture","https://stablemesh.dev/api/retexture/{id}","DELETE https://stablemesh.dev/api/retexture/{id}","https://stablemesh.dev/api/remesh","https://stablemesh.dev/api/remesh/{id}","DELETE https://stablemesh.dev/api/remesh/{id}","https://stablemesh.dev/api/rigging","https://stablemesh.dev/api/rigging/{id}","DELETE https://stablemesh.dev/api/rigging/{id}","https://stablemesh.dev/api/animation","https://stablemesh.dev/api/animation/{id}","DELETE https://stablemesh.dev/api/animation/{id}","https://stablemesh.dev/api/animation/catalog"],"mppResources":["https://stablemesh.dev/api/text-to-3d","https://stablemesh.dev/api/image-to-3d","https://stablemesh.dev/api/multi-image-to-3d","https://stablemesh.dev/api/retexture","https://stablemesh.dev/api/remesh","https://stablemesh.dev/api/rigging","https://stablemesh.dev/api/animation"],"description":"Pay-per-request AI 3D model generation powered by Meshy. Text to 3D, Image to 3D, retexturing, remeshing, rigging, and animation.","instructions":"# StableMesh API Reference\n\n## Authentication\n\nAll creation endpoints require micropayment. Include payment headers as per the HTTP 402 specification. Payments are processed on Base mainnet (eip155:8453), Solana, or Tempo.\n\nRetrieval (GET) and deletion (DELETE) endpoints are free but require SIWX wallet authentication. Only the wallet that created a task can retrieve or delete it.\n\n## Base URL\n\nhttps://stablemesh.dev\n\nAll endpoints are relative to this base URL.\n\n## Workflow\n\nAll 3D generation tasks are **asynchronous**:\n1. **Create** a task via POST (paid) — returns a task ID\n2. **Poll** the task via GET `/api/{type}/{id}` (free, SIWX) until status is SUCCEEDED\n3. **Download** model URLs from the completed task response\n\n**Important:** Store the task ID returned from POST — there is no list endpoint.\n\n## Recommended Pipelines\n\n### Static object (no animation needed)\n`text-to-3d` or `image-to-3d` — done.\n\n### Animated character (standard)\n`image-to-3d` → `remesh` → `rigging` → `animation`\n\n### Animated character with restyled appearance\n`image-to-3d` → `remesh` → `retexture` → `rigging` → `animation`\n\n### Character with face/likeness preservation\n`image-to-3d` → `remesh` → `rigging` → `animation` (skip retexture — see notes below)\n\n**Retexture is optional.** If your source image already has the correct colors and outfit, skipping retexture often produces better results — especially for faces. Retexturing replaces the original texture entirely.\n\n## Important: Retexture Limitations\n\nThe `image_style_url` parameter on `/api/retexture` performs **color palette and texture style transfer** — it does NOT transfer specific facial features or likeness from the reference image. For character likeness, invest in the quality of your input image to `/api/image-to-3d`. The face texture is mapped directly from the source image. Retexturing replaces it.\n\n## Important: Remesh Before Rigging\n\nRigging requires models with **fewer than 300K faces**. If your model exceeds this, remesh before rigging. Recommended polycount: 50K–250K for web/real-time use, up to 290K for offline rendering. Set `target_polycount` in the remesh request accordingly.\n\n## Important: Pose Requirements for Rigging\n\nThe auto-rigger requires a detectable humanoid pose. If you specify `pose_mode: \"t-pose\"` during generation but the output model's pose doesn't match, rigging will fail. When using `/api/multi-image-to-3d`, pose issues may not surface until the rigging step. Verify your generated model visually before investing in downstream steps (remesh, retexture, rig).\n\n## Best Practices for Character Likeness\n\nWhen using AI image generation to create T-pose inputs for `/api/image-to-3d`:\n- Use minimal prompts to preserve the face. Describing facial features (\"blue eyes, angular jaw\") causes the generator to reinterpret the face.\n- Prefer simple prompts like \"same person, T-pose, white background\" over detailed feature descriptions.\n- The quality of the input image is the single highest-leverage factor for face quality. Everything downstream either preserves or degrades it.\n\n## Animation Action IDs\n\nThe `action_id` parameter for `/api/animation` selects from a library of **678 preset animations**.\n\n**Use `GET /api/animation/catalog` to search the catalog (free, no payment required):**\n- `?q=dance` — search by name\n- `?category=Fighting` — filter by category\n- `?subcategory=Punching` — filter by subcategory\n- Combine filters: `?q=walk&category=WalkAndRun`\n\nCategories: DailyActions, WalkAndRun, Fighting, Dancing, BodyMovements.\nSubcategories include: Idle, Interacting, LookingAround, Sleeping, Walking, Running, CrouchWalking, Swimming, AttackingWithWeapon, Punching, Blocking, CastingSpell, Dying, GettingHit, Dancing, Acting, Climbing, Jumping, PerformingStunt, and more.\n\nAlways call the catalog endpoint to find the right `action_id` before creating an animation task.\n\n## Endpoints\n\n### Text to 3D\n- `POST /api/text-to-3d` — Create text-to-3d task (preview or refine mode). $0.20–$0.80\n- `GET /api/text-to-3d/{id}` — Get task status\n- `DELETE /api/text-to-3d/{id}` — Delete task\n\n### Image to 3D\n- `POST /api/image-to-3d` — Create image-to-3d task. $0.20–$1.20\n- `GET /api/image-to-3d/{id}` — Get task status\n- `DELETE /api/image-to-3d/{id}` — Delete task\n\n### Multi Image to 3D\n- `POST /api/multi-image-to-3d` — Create multi-image-to-3d task (1-4 images). $0.20–$1.20\n- `GET /api/multi-image-to-3d/{id}` — Get task status\n- `DELETE /api/multi-image-to-3d/{id}` — Delete task\n\n### Retexture\n- `POST /api/retexture` — Retexture an existing 3D model. $0.40. **Note:** Style reference (`image_style_url`) influences color palette, material properties, and texture tone — it does not transfer facial features or likeness.\n- `GET /api/retexture/{id}` — Get task status\n- `DELETE /api/retexture/{id}` — Delete task\n\n### Remesh\n- `POST /api/remesh` — Re-topology and format conversion. $0.20. **Required before rigging** if model exceeds 300K faces.\n- `GET /api/remesh/{id}` — Get task status\n- `DELETE /api/remesh/{id}` — Delete task\n\n### Rigging\n- `POST /api/rigging` — Auto-rig a humanoid character. $0.20. Requires < 300K face model in a detectable humanoid pose.\n- `GET /api/rigging/{id}` — Get task status\n- `DELETE /api/rigging/{id}` — Delete task\n\n### Animation\n- `GET /api/animation/catalog` — Search the animation catalog (free). Use query params: `q`, `category`, `subcategory`.\n- `POST /api/animation` — Animate a rigged character. $0.12. Use `action_id` from the catalog.\n- `GET /api/animation/{id}` — Get task status\n- `DELETE /api/animation/{id}` — Delete task\n\n## Output Formats\n\n3D models are returned as download URLs in formats: GLB, FBX, OBJ, STL, USDZ.\n"}