Updated and supported automatically if there are no breaking changes
All modern .NET features - nullability, trimming, NativeAOT, etc.
Support .Net Framework/.Net Standard 2.0
Usage
123
usingMeshy;usingvarclient=newMeshyClient(apiKey);
Text to 3D
Shows how to create a text-to-3D preview task and poll for completion.
1 2 3 4 5 6 7 8 9101112131415
usingvarclient=newMeshyClient(apiKey);// Create a text-to-3D preview task using an implicit conversion.varresponse=awaitclient.TextTo3d.CreateTextTo3DTaskAsync(newTextTo3DPreviewRequest{Mode=TextTo3DPreviewRequestMode.Preview,Prompt="a wooden treasure chest",AiModel=AiModel.Latest,});Console.WriteLine($"Task ID: {response.Result}");// Poll the task until it completes.vartask=awaitclient.TextTo3d.GetTextTo3DTaskAsync(response.Result!);Console.WriteLine($"Status: {task.Status}, Progress: {task.Progress}%");
Image to 3D
Shows how to create an image-to-3D task from a URL.
1 2 3 4 5 6 7 8 910111213
usingvarclient=newMeshyClient(apiKey);// Create an image-to-3D task from an image URL.varresponse=awaitclient.ImageTo3d.CreateImageTo3DTaskAsync(newImageTo3DRequest{ImageUrl="https://example.com/chair.png",AiModel=AiModel.Latest,});Console.WriteLine($"Task ID: {response.Result}");// Retrieve the task status.vartask=awaitclient.ImageTo3d.GetImageTo3DTaskAsync(response.Result!);Console.WriteLine($"Status: {task.Status}, Progress: {task.Progress}%");
Check Balance
Shows how to check the current credit balance.
12345
usingvarclient=newMeshyClient(apiKey);// Retrieve the current credit balance.varbalance=awaitclient.Balance.GetBalanceAsync();Console.WriteLine($"Credits: {balance.Balance}");