r/UnityHelp • u/179589 • 17m ago
How do i call a 3D generation API from Unity at runtime ?
Calling a generation API from Unity at runtime is less about the request itself and more about everything around it. The request side is plain HTTP. Your game sends a prompt or an image, and the API starts an asynchronous task. On the Tripo Studio API, an image to 3D task costs 20 to 30 credits, with 1 credit at $0.01, so each runtime generation carries a real per call cost of roughly twenty to thirty cents, before texture or rigging calls get added. The task doesn't return a model in the same breath. It return a task ID, and your client has to poll for completion or get the result another way, since a webhook, can reach our server but not a player's running game. That gap shaped the design. The player needs something to look at while the model generates, and a failure path if it doesn't complete. Then the model arrives as GLB or FBX, and unity still has a load that file at runtime, which means a runtime loader on your side and a decision about where the file gets cached. Documented pricing says failed generation aren't charged, which softens the cost of retries. Are you generating at runtime for user created content, or pre generating during development ? And how long can your game keep a player waiting before the wait itself becomes the problem ?