Private Image Segmentation API Deployed on DGX Spark

How GenAI Protos packaged SAM 3.1 into a private segmentation service that accepts text prompts, boxes, and point clicks to return object masks through a governed API.

AI Answer Summary

GenAI Protos deployed a private image segmentation API using SAM 3.1 on DGX Spark. The service supports text-prompted, box-prompted, and point-click segmentation, returns PNG masks, and includes lazy loading, idle unload, health checks, and gateway pass-through access.

01

Executive Summary

GenAI Protos deployed a private image segmentation API using SAM 3.1 on DGX Spark. The service supports text-prompted, box-prompted, and point-click segmentation, returns PNG masks, and includes lazy loading, idle unload, health checks, and gateway pass-through access.

The focus is practical deployment: model packaging, gateway integration, operational controls, and reusable API access for product and engineering teams.

The content stays close to the documented technical build and avoids unsupported adoption or ROI claims.

02

At a Glance

Use case
Private object segmentation API for image workflows.
Prompt types
Text prompts, bounding boxes, and point clicks.
Output
PNG masks with object metadata.
Model size
848M-parameter segmentation model.
Lifecycle
Lazy load on first request and idle unload after inactivity.
Gateway role
Authenticated pass-through routes for segmentation and operations
03

The Challenge

  • Segmentation models are valuable only when they can be integrated into annotation tools, asset systems, document pipelines, or product workflows.
  • Different users need different prompt modes: plain-language object prompts, bounding boxes, or point clicks.
  • The build needed to support private image processing while exposing enough operational controls for reliable use.
04

What GenAI Protos Built

  • Packaged SAM 3.1 behind a FastAPI segmentation API.
  • Supported text, bounding-box, and point-click segmentation inputs.
  • Returned mask PNGs and segmentation metadata for downstream workflows.
  • Added preload, unload, model listing, and health routes through the private gateway.
  • Used lazy loading and idle unload behavior to reduce resource use when inactive.
05

Solution Architecture

The architecture separates the application interface, gateway layer, model service, runtime, and operations lane so the model can be consumed as a reusable private AI capability rather than a one-off local experiment.

Private Image Segmentation API Deployed on DGX Spark Architecture Diagram
User interface
Annotation, image-processing, document, or product workflow submits images and prompts.
Gateway layer
Provides authenticated routing and consistent private model access.
Segmentation API
Accepts image files and prompt parameters, validates input, and returns structured output.
SAM 3.1 runtime
Generates masks from text, boxes, or points.
Output layer
Returns PNG masks and metadata for downstream editing or extraction.
Operations lane
Lazy load, idle unload, preload, and health controls support service operations.
06

Prompt-to-Output Workflow

The segmentation workflow shows how images and prompt types move through the private gateway, segmentation API, SAM runtime, mask output, and downstream visual workflows.

1
Image and Prompt Input

An application submits an image with a text prompt, bounding box, or point-click instruction.

2
Gateway Forwarding

The gateway forwards the request to the segmentation API.

3
Model Activation

The model loads on first use if not already active.

4
Mask Generation

SAM 3.1 generates one or more masks and returns results as encoded PNG assets with metadata.

5
Downstream Use

The downstream workflow uses the masks for extraction, editing, annotation, or analysis.

07

Implementation Highlights

This section captures prompt flexibility, reusable mask output, on-demand lifecycle controls, custom gateway routes, and operational visibility for the private segmentation service.

Prompt flexibility
The API supports text, box, and point prompts so different user interfaces can share one model service.
Mask output
Segmentation results are returned as reusable PNG masks and structured result metadata.
On-demand lifecycle
Lazy loading and idle unload avoid keeping memory occupied when segmentation is inactive.
Custom gateway routes
Pass-through routes expose segmentation because the workflow is not a standard chat or speech endpoint.
Operational visibility
Health and model routes make the service easier to monitor and preload.
08

Measured Technical Details

The value of this service is not only mask generation. The stronger pattern is making segmentation available as a private computer vision API that can support real annotation, editing, extraction, and analysis workflows.

Model scale
848M parameters.
Checkpoint size
Approximately 3.4 GB.
Prompt capacity
Up to 16 object prompts per request as described in the source model notes.
Idle lifecycle
Default idle unload after 15 minutes of inactivity.
Rate limit
60 requests per minute configured.
Output format
PNG masks with segmentation metadata.
09

Why This Matters

The value of this service is not only mask generation. The stronger pattern is making segmentation available as a private computer vision API that can support real annotation, editing, extraction, and analysis workflows.

Computer Vision Workflow ReadinessApplications can submit images and receive reusable masks through a governed internal API.
Flexible PromptingText, bounding-box, and point-click prompts let different user interfaces share the same segmentation service.
Reusable Mask OutputsPNG masks and metadata can feed downstream editing, annotation, extraction, or visual analysis systems.
Resource-Aware ServingLazy loading, preload, health, and idle unload controls keep the service practical for bursty vision workloads.
10

Results

GenAI Protos delivered an API-ready private AI service that can be discovered, called, monitored, and operated through the same model-serving pattern used across the wider private AI catalog.

Outcome What changed
Private vision API Segmentation became available as a governed internal API instead of an isolated model.
Multiple interaction modes Teams can build text, box, or click-based segmentation workflows on one service.
Resource-aware serving Lazy load and idle unload reduce standing resource usage.
Reusable computer vision pattern The same API packaging pattern can support other visual AI services with custom inputs and outputs.
11

Reusable Pattern

This pattern can be reused for visual AI services that need custom image inputs, structured artifact outputs, on-demand loading, and downstream workflow integration.

  • Design APIs around how users actually prompt the model, not around model internals.
  • Return artifacts and metadata together so downstream systems can automate around the results.
  • Use on-demand lifecycle controls for visual models that may be used in bursts.
  • Avoid publishing internal routes while keeping the public story technically specific.

Build Private Computer Vision APIs for Real Product Workflows

GenAI Protos helps teams package segmentation and visual AI models into private services with clean APIs, lifecycle controls, and downstream integration.

Get custom solutions