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.
Wypróbuj model
PNG, JPEG, WebP lub GIF · maksymalnie 20 MiB

Co chcesz zrobić dalej?
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"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.
Zacznij tworzyć
Prześlij ten model przez SandBase Unified Run 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": "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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
seedintegerRandom seed for reproducibility
imagestringwymaganeURL of the image to reconstruct in 3D
promptstringwymaganeText prompt for auto-segmentation when no masks provided (e.g., 'chair', 'lamp')
Domyślnie: "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.
Domyślnie: []
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
Domyślnie: []
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.
Domyślnie: 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
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
[
{
"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"
}
]