Skip to content

Image to 3D

Shows how to create an image-to-3D task from a URL.

This example assumes using Meshy; is in scope and apiKey contains your Meshy API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using var client = new MeshyClient(apiKey);

// Create an image-to-3D task from an image URL.
var response = await client.ImageTo3d.CreateImageTo3DTaskAsync(new ImageTo3DRequest
{
    ImageUrl = "https://example.com/chair.png",
    AiModel = AiModel.Latest,
});
Console.WriteLine($"Task ID: {response.Result}");

// Retrieve the task status.
var task = await client.ImageTo3d.GetImageTo3DTaskAsync(response.Result!);
Console.WriteLine($"Status: {task.Status}, Progress: {task.Progress}%");