Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The Meshy SDK provides AIFunction tool wrappers compatible with Microsoft.Extensions.AI. These tools can be used with any IChatClient to give AI models access to Meshy's AI-powered 3D model generation capabilities.
Installation
1 | |
Available Tools
| Method | Tool Name | Description |
|---|---|---|
AsTextTo3DTool() |
TextTo3D |
Generates a 3D model from a text prompt. Returns a task ID for status polling. |
AsImageTo3DTool() |
ImageTo3D |
Generates a 3D model from an image URL. Returns a task ID for status polling. |
AsRetextureTool() |
Retexture |
Retextures an existing 3D model with a new style. Returns a task ID. |
AsGetTextTo3DTaskTool() |
GetTextTo3DTask |
Retrieves status and result of a text-to-3D task by ID. |
AsGetImageTo3DTaskTool() |
GetImageTo3DTask |
Retrieves status and result of an image-to-3D task by ID. |
AsGetRetextureTaskTool() |
GetRetextureTask |
Retrieves status and result of a retexture task by ID. |
Text-to-3D Tool
Use AsTextTo3DTool() to create an AIFunction that generates 3D models from text descriptions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Image-to-3D Tool
Use AsImageTo3DTool() to create a 3D model from an image:
1 2 3 4 5 6 7 | |
Retexture Tool
Use AsRetextureTool() to retexture an existing 3D model:
1 2 3 4 5 6 7 | |
Task Status Tools
Meshy uses an async task pattern -- creation endpoints return a task ID, and you poll for results. The AsGet*TaskTool() methods let the AI agent check task status:
1 2 3 4 5 6 7 8 | |
Combining All Tools
All tools can be used together to give the AI agent full 3D generation and status-checking capabilities:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Async Task Pattern
Meshy generation tasks are asynchronous. The creation tools (AsTextTo3DTool, AsImageTo3DTool, AsRetextureTool) return a task ID. The status tools (AsGetTextTo3DTaskTool, AsGetImageTo3DTaskTool, AsGetRetextureTaskTool) can then be used to poll for completion. Task statuses are:
PENDING-- Task is queuedIN_PROGRESS-- Generation is in progressSUCCEEDED-- Generation complete, 3D model URLs availableFAILED-- Generation failedCANCELED-- Task was canceled