seedinteger
Random seed for reproducibility
meta/sam-3/3d-objectsSam 3 3d Objects by Meta - convert 2D images into 3D models with AI. Generate textured 3D assets from single photos for games, AR/VR, e-commerce, and digital content creation.
Modeli deneyin
PNG, JPEG, WebP veya GIF · en fazla 20 MiB

Sırada ne yapmak istersiniz?
Bir örnek seçerek girdilerini ve sonucunu playground'a yükleyin.
{
"image": "https://static.sandbase.ai/examples/adec1dd5-efca-4f0a-bb23-01f828c4988c/input/01b105f2-a252-49d4-bea2-b473619d9110.jpeg",
"prompt": "car"
}SAM 3D Objects reconstructs a segmented object from a single image as a 3D model.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | car | What to reconstruct. |
image | image URL, required | — | Image containing the object. JPEG, PNG, or WebP URL. |
point_prompts | object[] | [] | Point prompts for auto-segmentation when no masks provided |
detection_threshold | number 0.1–1 | — | Detection confidence threshold (0.1-1.0). |
box_prompts | object[] | [] | Box prompts for auto-segmentation when no masks provided. |
pointmap_url | string | — | Optional URL to external pointmap/depth data (NPY or NPZ format) for improved 3D reconstruction depth estimation |
export_textured_glb | boolean | false | Export a textured GLB. |
mask_urls | image URL[] | — | Optional list of mask URLs (one per object). |
seed | integer | random | Fix it to compare prompt changes. |
$0.024 per object.
| Request | Price |
|---|---|
| One object | $0.024 |
Failed runs are not charged.
Related: meta/sam-3/image.
Geliştirmeye başlayın
Bu modeli SandBase Unified Run API üzerinden gönderin.
# 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": "meta/sam-3/3d-objects",
"image": "https://static.sandbase.ai/examples/meta/sam-3/3d-objects/input_image_0.jpeg",
"prompt": "car",
"box_prompts": [],
"point_prompts": [],
"export_textured_glb": false
}
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"Bir SandBase API anahtarı oluşturun ve sunucu ortamınıza ayarlayın. Tüm istekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın veya bir depoya commit etmeyin.
Bu model kimliği ve girdileriyle /v1/run adresine POST gönderin. Yukarıdaki istek örneği gönderme ve yoklamayı içerir.
Durum completed, failed veya timeout olana kadar verilen run ID ile yoklama yapın. Çıktıyı yalnızca completed olduktan sonra okuyun.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Modelin image, video veya audio alanına herkese açık erişilebilir bir dosya URL'si verin. Desteklenen formatlar ve sınırlar her Playground girişinin yanında gösterilir.
Playground'daki desteklenen image alanlarında yükleme veya değiştirme kontrolünü kullanın. Video URL alanları barındırılan bir sürüş videosu kabul eder; video yükleme desteği anlamına gelmez.
seedintegerRandom seed for reproducibility
imagestringzorunluURL of the image to reconstruct in 3D
promptstringzorunluText prompt for auto-segmentation when no masks provided (e.g., 'chair', 'lamp')
Varsayılan: "car"
mask_urlsarrayOptional list of mask URLs (one per object). If not provided, use prompt/point_prompts/box_prompts to auto-segment, or entire image will be used.
box_promptsarrayBox prompts for auto-segmentation when no masks provided. Multiple boxes supported - each produces a separate object mask for 3D reconstruction.
Varsayılan: []
pointmap_urlstringOptional URL to external pointmap/depth data (NPY or NPZ format) for improved 3D reconstruction depth estimation
point_promptsarrayPoint prompts for auto-segmentation when no masks provided
Varsayılan: []
detection_thresholdnumberDetection confidence threshold (0.1-1.0). Lower = more detections but less precise. If not set, uses the model's default.
Minimum: 0.1
Maksimum: 1
export_textured_glbbooleanIf True, exports GLB with baked texture and UVs instead of vertex colors.
Varsayılan: false
{
"model": "meta/sam-3/3d-objects",
"image": "https://static.sandbase.ai/examples/meta/sam-3/3d-objects/input_image_0.jpeg",
"prompt": "car",
"box_prompts": [],
"point_prompts": [],
"export_textured_glb": false
}Tamamlanan bir run, sonucunu output içinde gösterir. Aşağıdaki, modelin kaydedilmiş örneğidir; yeni bir üretim değildir.
[
{
"poster": "https://static.sandbase.ai/examples/adec1dd5-efca-4f0a-bb23-01f828c4988c/output/15642b8b-3842-4520-bf1b-11fb2c0e98fd.png",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/adec1dd5-efca-4f0a-bb23-01f828c4988c/output/733c862a-794e-4e7d-8013-dfa65d8c126f.glb"
}
]