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.
Modell testen
PNG, JPEG, WebP oder GIF · maximal 20 MiB
Was möchten Sie als Nächstes tun?
Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
{
"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.
Jetzt loslegen
Senden Sie dieses Modell über die 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"Erstellen Sie einen SandBase API-Schlüssel und legen Sie ihn in Ihrer Serverumgebung fest. Alle Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie den Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis und committen Sie ihn nicht in ein Repository.
POST an /v1/run mit dieser Modell-ID und ihren Eingaben. Das obige Anfragebeispiel umfasst Übermittlung und Polling.
Verwenden Sie die zurückgegebene Run-ID zum Polling, bis der Status completed, failed oder timeout ist. Lesen Sie die Ausgabe erst nach completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Übergeben Sie eine öffentlich zugängliche Date-URL im Bild-, Video- oder Audiofeld des Modells. Unterstützte Formate und Limits werden neben jedem Playground-Eingabefeld angezeigt.
Verwenden Sie im Playground bei unterstützten Bildfeldern die Steuerung zum Hochladen oder Ersetzen. Video-URL-Felder akzeptieren ein gehostetes Fahrvideo; sie implizieren keine Unterstützung für Video-Uploads.
seedintegerRandom seed for reproducibility
imagestringerforderlichURL of the image to reconstruct in 3D
promptstringerforderlichText prompt for auto-segmentation when no masks provided (e.g., 'chair', 'lamp')
Standard: "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.
Standard: []
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
Standard: []
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
Maximum: 1
export_textured_glbbooleanIf True, exports GLB with baked texture and UVs instead of vertex colors.
Standard: 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
}Ein abgeschlossener Run stellt sein Ergebnis in der Ausgabe bereit. Das Folgende ist das gespeicherte Beispiel des Modells, keine neue Generierung.
[
{
"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"
}
]