Skip to content

Repository files navigation

Tripo

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK for Tripo API V3 using AutoSDK
  • Same day update to support new features
  • 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

using Tripo;

using var api = new TripoClient(apiKey);

TaskCreatedResponse response = await api.ThreeDGeneration.TextToModelAsync(new TextToModelRequest
{
    Prompt = "Generate a stylized explorer character",
    Model = "v3.1-20260211",
    Texture = true,
});

Console.WriteLine($"Code: {response.Code}");
Console.WriteLine($"TaskId: {response.Data.TaskId}");

await System.Threading.Tasks.Task.Delay(TimeSpan.FromMinutes(1));

TaskResponse taskResponse = await api.Tasks.GetTaskAsync(response.Data.TaskId);

Console.WriteLine($"Code: {taskResponse.Code}");
Console.WriteLine($"Status: {taskResponse.Data.Status}");
Console.WriteLine($"RenderedImage: {taskResponse.Data.Output?.RenderedImageUrl}");
Console.WriteLine($"Model: {taskResponse.Data.Output?.ModelUrl}");

Result

Migrating from Tripo API V2

This SDK now targets https://openapi.tripo3d.ai/v3. Tripo ends V2 maintenance on October 1, 2026 and disables all V2 endpoints on November 1, 2026, both at 00:00 UTC.

  • Replace the single V2 CreateTaskAsync call with the capability client, such as api.ThreeDGeneration.TextToModelAsync(...).
  • Supply Model for text-, image-, and multiview-to-model requests. Use v2.5-20250123 to preserve V2's former default behavior, or opt into a newer model deliberately.
  • Read V3 task outputs from ModelUrl, RenderedImageUrl, and GeneratedImageUrl; V2 output names such as PbrModel, Model, and BaseModel are retired.
  • Read uploaded file references from FileToken, and poll api.Tasks.GetTaskAsync(...) because V2 WebSocket watch endpoints have no V3 equivalent.

See Tripo's V2 to V3 migration guide for the complete endpoint and payload mapping.

Webhooks

Webhook requests include a Tripo-Webhook-Signature header. Verify it against the exact raw request body before deserializing the JSON:

using var buffer = new MemoryStream();
await httpContext.Request.Body.CopyToAsync(buffer);
byte[] payload = buffer.ToArray();
string signature = httpContext.Request.Headers["Tripo-Webhook-Signature"].ToString();

if (!TripoWebhookSignature.Verify(payload, signature, webhookSecret))
{
    httpContext.Response.StatusCode = StatusCodes.Status401Unauthorized;
    return;
}

// The webhook event payload is under the JSON "data" property.

The verifier uses HMAC-SHA256, a constant-time comparison, and a five-minute timestamp tolerance by default. Configure the webhook URL and obtain its whsec_... signing secret in the Tripo developer console.

Authenticated V3 smoke test

Create an ignored .env file containing TRIPO_API_KEY=..., then run:

./scripts/test-v3-smoke.sh

The explicitly gated test checks account balance, file upload, and a low-cost untextured model generation. It reports the balance difference and task-reported credit usage when complete.

CLI

dotnet tool install --global Tripo.CLI --prerelease
tripo api --help

Support

Priority place for bugs: https://github.com/tryAGI/Tripo/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Tripo/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.

About

C# SDK for the Tripo API -- AI 3D model generation

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages

Generated from tryAGI/SdkTemplate