feat(rsplat): upgrade to Trellis 2 for higher quality 3D generation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fbed19d3c5
commit
88b20f13f5
|
|
@ -989,13 +989,13 @@ app.post("/api/3d-gen", async (c) => {
|
|||
if (!image_url) return c.json({ error: "image_url required" }, 400);
|
||||
|
||||
try {
|
||||
const res = await fetch("https://fal.run/fal-ai/trellis", {
|
||||
const res = await fetch("https://fal.run/fal-ai/trellis-2", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Key ${FAL_KEY}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ image_url }),
|
||||
body: JSON.stringify({ image_url, resolution: 1024 }),
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
|
|
@ -1014,8 +1014,7 @@ app.post("/api/3d-gen", async (c) => {
|
|||
}
|
||||
|
||||
const data = await res.json();
|
||||
// Trellis returns glb_url and/or model_mesh — download the GLB
|
||||
const modelUrl = data.glb_url || data.model_mesh?.url || data.output?.url;
|
||||
const modelUrl = data.model_glb?.url || data.glb_url || data.model_mesh?.url;
|
||||
if (!modelUrl) return c.json({ error: "No 3D model returned" }, 502);
|
||||
|
||||
// Download the model file
|
||||
|
|
|
|||
Loading…
Reference in New Issue