model_urlstringआवश्यक
URL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB).
tripo3d/tripo/segmentTripo Segment splits an existing 3D model into named parts. Accepts GLB, OBJ, FBX or STL input.
model को आज़माएँ
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"model_url": "https://static.sandbase.ai/examples/5d486446-c09b-4862-9387-00f6850d4373/input/992f8521-7777-4c3c-8d73-e11004b95d99.glb"
}Tripo Segment splits an existing 3D model into named parts. Accepts GLB, OBJ, FBX or STL input.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB). |
model_version | v1.0-20250506 / v2.0-20260430 | v1.0-20250506 | v1.0-20250506 splits by geometry; v2.0-20260430 (beta) splits by meaning. |
segmentation_granularity | simple / balanced / detailed | balanced | v2.0 only. |
split_by_connectivity | boolean | true | v2.0 only. Also split disconnected pieces. |
ref_image | string | — | v2.0 only. Reference image guiding the parts; granularity and split_by_connectivity are then ignored. |
url: Segmented GLB; parts are nodes named tripo_part_0, tripo_part_1, ...thumbnail: Preview render.$0.40 per model. Failed runs are not charged.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ कोई भी समर्थित API चुनें.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "tripo3d/tripo/segment",
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"ref_image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"model_version": "v1.0-20250506",
"split_by_connectivity": true,
"segmentation_granularity": "balanced"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
model_urlstringआवश्यकURL of the input 3D model (GLB, GLTF, FBX, OBJ or STL, up to 150 MB).
ref_imagestringv2.0 only. Reference image guiding the parts; granularity and split_by_connectivity are then ignored.
model_versionstringv1.0-20250506 splits by geometry; v2.0-20260430 (beta) splits by meaning.
डिफ़ॉल्ट: "v1.0-20250506"
संभावित मान: "v1.0-20250506", "v2.0-20260430"
split_by_connectivitybooleanv2.0 only. Also split disconnected pieces.
डिफ़ॉल्ट: true
segmentation_granularitystringv2.0 only.
डिफ़ॉल्ट: "balanced"
संभावित मान: "simple", "balanced", "detailed"
{
"model": "tripo3d/tripo/segment",
"model_url": "https://static.sandbase.ai/examples/tripo3d/tripo/shared/object.glb",
"ref_image": "https://static.sandbase.ai/examples/tripo3d/tripo-h3.1/image-to-3d/input_image_0.png",
"model_version": "v1.0-20250506",
"split_by_connectivity": true,
"segmentation_granularity": "balanced"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"poster": "https://static.sandbase.ai/examples/5d486446-c09b-4862-9387-00f6850d4373/output/4a02b9d4-3a65-4894-b75f-c762157f660d.png",
"thumbnail": "https://static.sandbase.ai/examples/5d486446-c09b-4862-9387-00f6850d4373/output/4a02b9d4-3a65-4894-b75f-c762157f660d.png",
"url": "https://static.sandbase.ai/examples/5d486446-c09b-4862-9387-00f6850d4373/output/28c71329-b3b3-44d0-adcd-b5e6851a8186.glb"
}
]यह model Tripo के v3 API पर भी उपलब्ध है। Request bodies, task objects और error codes Tripo के अनुरूप हैं, इसलिए base URL को https://api.sandbase.ai/tripo/v3 में बदलने और Authorization: Bearer के रूप में SandBase API key भेजने के बाद मौजूदा Tripo code काम करेगा। Requests Tripo के official channel पर /v1/run के समान मूल्य पर चलती हैं।
POST https://api.sandbase.ai/tripo/v3/mesh/segment। model वैकल्पिक है और Tripo algorithm version चुनता है; इसे छोड़े जाने पर Tripo का default लागू होता है। ऊपर Tripo v3 API के अंतर्गत दिया गया request example एक पूर्ण call दिखाता है।
Tripo इन inputs को नीचे दिए गए Schema से अलग नाम देता है। बाकी सभी फ़ील्ड अपने नाम बनाए रखते हैं।
| स्कीमा फ़ील्ड | Tripo फ़ील्ड |
|---|---|
model_url | input |
model_version | model |
Inputs सार्वजनिक URLs होते हैं, या तो string के रूप में या url फ़ील्ड वाले object के रूप में। Tripo task ids और file_token मान अभी स्वीकार नहीं किए जाते, file upload उपलब्ध नहीं है, और webhook_url को अनदेखा किया जाता है।
Submission से data.task_id लौटता है। data.status के success, failed या cancelled होने तक poll करें। Success पर, data.output में model_url जैसे Tripo field names होते हैं, और credits_consumed 1 credit = $0.01 पर SandBase charge है।
curl "https://api.sandbase.ai/tripo/v3/tasks/$TASK_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"POST /tripo/v3/tasks/list को {"task_ids": [...]} के साथ उपयोग करने पर अधिकतम 100 tasks लौटते हैं। GET /tripo/v3/account/balance आपके SandBase balance को credits में लौटाता है।
Tripo अपने envelope का उपयोग करता है: {"code": 1004, "status": "error", "message": "..."}।
| code | अर्थ |
|---|---|
2 / 1002 | SandBase API key अनुपस्थित, अमान्य या अधिकृत नहीं है |
1003 | बॉडी JSON object नहीं है |
1004 | पैरामीटर अनुपस्थित या अमान्य है। संदेश Tripo फ़ील्ड का नाम बताता है |
1007 / 2000 | Rate limit या concurrency limit पहुँच गई है |
2001 | Task नहीं मिला, या किसी अन्य API key से बनाया गया था |
2002 | Endpoint या feature SandBase पर समर्थित नहीं है |
2010 | SandBase balance अपर्याप्त है या API key spending limit पहुँच गई है |
4001 | अज्ञात endpoint |
जब Tripo किसी task को अस्वीकार करता है या विफल करता है, तो वह Tripo के error_code और error_message के साथ failed पर समाप्त होता है। आपके अनुरोध या content से संबंधित codes बिना बदलाव के पास किए जाते हैं; upstream Tripo account से संबंधित codes को 1000 के रूप में रिपोर्ट किया जाता है।