Inference Server OpenAPI

Browse and test the HTTP API for a self-hosted Roboflow Inference Server.

A running Inference Server publishes an OpenAPI specification that matches the version of the server you are running.

Start a server, then open its API reference in your browser:

pip install inference-cli
inference server start
EndpointWhat it serves
http://localhost:9001/docsSwagger UI with an interactive request builder.
http://localhost:9001/redocReDoc reference for the same specification.

The API reference below uses http://localhost:9001, the default address for a local Inference Server. Replace this base URL with the address of the server you want to call:

This is the API for running models and Workflows. For the Roboflow Platform API for workspaces, projects, versions, and training, see the Platform API OpenAPI reference.

Server

Healthz

gethttp://localhost:9001/healthz

Health endpoint for Kubernetes liveness probe.

Verifies CUDA context health when running on GPU. Returns 503 if CUDA is corrupted (unrecoverable - requires process restart).

Responses
200Successful Responseapplication/json
anyOptional
get/healthz
GET /healthz HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Readiness

gethttp://localhost:9001/readiness

Readiness endpoint for Kubernetes readiness probe.

Responses
200Successful Responseapplication/json
anyOptional
get/readiness
GET /readiness HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Info

gethttp://localhost:9001/info

Get the server name and version number

Responses
200Successful Responseapplication/json
namestringRequired
Example: Roboflow Inference Server
versionstringRequired
Example: 0.0.1
uuidstringRequired
Example: 9c18c6f4-2266-41fb-8a0f-c12ae28f6fbe
get/info
GET /info HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
{
  "name": "Roboflow Inference Server",
  "version": "0.0.1",
  "uuid": "9c18c6f4-2266-41fb-8a0f-c12ae28f6fbe"
}

Metrics

gethttp://localhost:9001/metrics

Endpoint that serves Prometheus metrics.

Responses
200Successful Responseapplication/json
anyOptional
get/metrics
GET /metrics HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Get Recent Logs

gethttp://localhost:9001/logs

Get recent application logs for debugging

Query parameters
limitinteger · nullableOptional

Maximum number of log entries to return

Default: 100
levelstring · nullableOptional

Filter by log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)

sincestring · nullableOptional

Return logs since this ISO timestamp

Responses
200Successful Responseapplication/json
anyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
get/logs
GET /logs HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Dashboard Guard

gethttp://localhost:9001/dashboard.html
Responses
200Successful Responseapplication/json
anyOptional
get/dashboard.html
GET /dashboard.html HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Dashboard Guard

headhttp://localhost:9001/dashboard.html
Responses
200Successful Responseapplication/json
anyOptional
head/dashboard.html
HEAD /dashboard.html HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

Get model keys

gethttp://localhost:9001/model/registry

Get the ID of each loaded model

Responses
200Successful Responseapplication/json
modelsobject · ModelDescriptionEntity[]Required

List of models that are loaded by model manager.

Show properties
model_idstringRequired

Identifier of the model

Example: some-project/3
task_typestringRequired

Type of the task that the model performs

Example: classification
batch_sizeinteger · nullableOptional

Batch size accepted by the model (if registered).

input_heightinteger · nullableOptional

Image input height accepted by the model (if registered).

input_widthinteger · nullableOptional

Image input width accepted by the model (if registered).

vram_bytesinteger · nullableOptional

Estimated GPU VRAM consumed by this model in bytes (measured during load).

request_aliasesstring[]Optional

Other model IDs that resolved to this model.

request_pathsstring[]Optional

HTTP request paths that triggered inference on this model (e.g. /door-glyph-locator/10, /infer/object_detection).

total_vram_bytesinteger · nullableOptional

Total estimated VRAM consumed by all loaded models in bytes.

gpu_memory_usedinteger · nullableOptional

Current GPU memory in use in bytes (device-level, includes all runtimes).

gpu_memory_totalinteger · nullableOptional

Total GPU memory available in bytes.

torch_cuda_allocatedinteger · nullableOptional

Live tensor memory allocated by PyTorch's CUDA allocator in bytes.

torch_cuda_reservedinteger · nullableOptional

Total memory reserved by PyTorch's CUDA allocator in bytes.

torch_cuda_allocator_cacheinteger · nullableOptional

Reserved but currently unallocated PyTorch CUDA memory in bytes.

non_torch_gpu_memoryinteger · nullableOptional

Device memory not reserved by PyTorch in bytes. This includes native runtimes, CUDA context overhead, and allocations from other processes.

get/model/registry
GET /model/registry HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
{
  "models": [
    {
      "model_id": "some-project/3",
      "task_type": "classification",
      "batch_size": 1,
      "input_height": 1,
      "input_width": 1,
      "vram_bytes": 1,
      "request_aliases": [
        "text"
      ],
      "request_paths": [
        "text"
      ]
    }
  ],
  "total_vram_bytes": 1,
  "gpu_memory_used": 1,
  "gpu_memory_total": 1,
  "torch_cuda_allocated": 1,
  "torch_cuda_reserved": 1,
  "torch_cuda_allocator_cache": 1,
  "non_torch_gpu_memory": 1
}

Core inference

Legacy Infer From Request

gethttp://localhost:9001/{dataset_id}/{version_id}

Legacy inference endpoint for object detection, instance segmentation, and classification.

Args: background_tasks: (BackgroundTasks) pool of fastapi background tasks dataset_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID version_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID api_key (Optional[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval. # Other parameters described in the function signature...

Returns: Union[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.

Path parameters
dataset_idstringRequired

ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID

version_idstringRequired

ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

confidenceany ofOptional

The confidence threshold used to filter out predictions. Pass a float in [0, 1], or "best" to use F1-optimal thresholds from model evaluation, or "default" to use the model's built-in default.

Default: 0.4
Show properties
numberOptional
string · enumOptional
Possible values:bestdefault
keypoint_confidencenumberOptional

The confidence threshold used to filter out keypoints that are not visible based on model confidence

Default: 0
formatstringOptional

One of 'json' or 'image'. If 'json' prediction data is return as a JSON string. If 'image' prediction data is visualized and overlayed on the original input image.

Default: json
imagestring · nullableOptional

The publically accessible URL of an image to use for inference.

image_typestring · nullableOptional

One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference.

Default: base64
labelsboolean · nullableOptional

If true, labels will be include in any inference visualization.

Default: false
mask_decode_modestring · nullableOptional

One of 'accurate' or 'fast'. If 'accurate' the mask will be decoded using the original image size. If 'fast' the mask will be decoded using the original mask size. 'accurate' is slower but more accurate.

Default: accurate
tradeoff_factornumber · nullableOptional

The amount to tradeoff between 0='fast' and 1='accurate'

Default: 0
max_detectionsintegerOptional

The maximum number of detections to return. This is used to limit the number of predictions returned by the model. The model may return more predictions than this number, but only the top max_detections predictions will be returned.

Default: 300
overlapnumberOptional

The IoU threhsold that must be met for a box pair to be considered duplicate during NMS

Default: 0.3
strokeintegerOptional

The stroke width used when visualizing predictions

Default: 1
disable_preproc_auto_orientboolean · nullableOptional

If true, disables automatic image orientation

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, disables automatic contrast adjustment

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, disables automatic grayscale conversion

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, disables automatic static crop

Default: false
disable_active_learningboolean · nullableOptional

If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)

Default: false
active_learning_target_datasetstring · nullableOptional

Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id

sourcestring · nullableOptional

The source of the inference request

Default: external
source_infostring · nullableOptional

The detailed source information of the inference request

Default: external
response_mask_formatstring · enum · nullableOptional

The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models.

Default: polygon
Possible values:polygonrle
Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · InstanceSegmentationInferenceResponseOptional

Instance Segmentation inference response.

Attributes: predictions (List[Union[ inference.core.entities.responses.inference.InstanceSegmentationPrediction, inference.core.entities.responses.inference.InstanceSegmentationRLEPrediction ]]): List of instance segmentation predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsany[]Required
object · KeypointsDetectionInferenceResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · KeypointsPrediction[]Required
object · ObjectDetectionInferenceResponseOptional

Object Detection inference response.

Attributes: predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · ObjectDetectionPrediction[]Required

Object Detection prediction.

Attributes: x (float): The center x-axis pixel coordinate of the prediction. y (float): The center y-axis pixel coordinate of the prediction. width (float): The width of the prediction bounding box in number of pixels. height (float): The height of the prediction bounding box in number of pixels. confidence (float): The detection confidence as a fraction between 0 and 1. class_name (str): The predicted class label. class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1. class_id (int): The class id of the prediction

object · ClassificationInferenceResponseOptional

Classification inference response.

Attributes: predictions (List[inference.core.entities.responses.inference.ClassificationPrediction]): List of classification predictions. top (str): The top predicted class label. confidence (float): The confidence of the top predicted class label.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · ClassificationPrediction[]Required

Classification prediction.

Attributes: class_name (str): The predicted class label. class_id (int): Numeric ID associated with the class label. confidence (float): The class label confidence as a fraction between 0 and 1.

topstringOptional

The top predicted class label

Default:
confidencenumberOptional

The confidence of the top predicted class label

Default: 0
parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · MultiLabelClassificationInferenceResponseOptional

Multi-label Classification inference response.

Attributes: predictions (Dict[str, inference.core.entities.responses.inference.MultiLabelClassificationPrediction]): Dictionary of multi-label classification predictions. predicted_classes (List[str]): The list of predicted classes.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobjectRequired
predicted_classesstring[]Required

The list of predicted classes

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · SemanticSegmentationInferenceResponseOptional

Semantic Segmentation inference response.

Attributes: predictions (inference.core.entities.responses.inference.SemanticSegmentationPrediction): Semantic segmentation predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · SemanticSegmentationPredictionRequired
object · StubResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

is_stubbooleanRequired

Field to mark prediction type as stub

model_idstringRequired

Identifier of a model stub that was called

task_typestringRequired

Task type of the project

anyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
get/{dataset_id}/{version_id}
GET /{dataset_id}/{version_id} HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
{
  "visualization": "text",
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "predictions": [
    "anything"
  ]
}

Legacy Infer From Request

posthttp://localhost:9001/{dataset_id}/{version_id}

Legacy inference endpoint for object detection, instance segmentation, and classification.

Args: background_tasks: (BackgroundTasks) pool of fastapi background tasks dataset_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID version_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID api_key (Optional[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval. # Other parameters described in the function signature...

Returns: Union[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.

Path parameters
dataset_idstringRequired

ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID

version_idstringRequired

ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

confidenceany ofOptional

The confidence threshold used to filter out predictions. Pass a float in [0, 1], or "best" to use F1-optimal thresholds from model evaluation, or "default" to use the model's built-in default.

Default: 0.4
Show properties
numberOptional
string · enumOptional
Possible values:bestdefault
keypoint_confidencenumberOptional

The confidence threshold used to filter out keypoints that are not visible based on model confidence

Default: 0
formatstringOptional

One of 'json' or 'image'. If 'json' prediction data is return as a JSON string. If 'image' prediction data is visualized and overlayed on the original input image.

Default: json
imagestring · nullableOptional

The publically accessible URL of an image to use for inference.

image_typestring · nullableOptional

One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference.

Default: base64
labelsboolean · nullableOptional

If true, labels will be include in any inference visualization.

Default: false
mask_decode_modestring · nullableOptional

One of 'accurate' or 'fast'. If 'accurate' the mask will be decoded using the original image size. If 'fast' the mask will be decoded using the original mask size. 'accurate' is slower but more accurate.

Default: accurate
tradeoff_factornumber · nullableOptional

The amount to tradeoff between 0='fast' and 1='accurate'

Default: 0
max_detectionsintegerOptional

The maximum number of detections to return. This is used to limit the number of predictions returned by the model. The model may return more predictions than this number, but only the top max_detections predictions will be returned.

Default: 300
overlapnumberOptional

The IoU threhsold that must be met for a box pair to be considered duplicate during NMS

Default: 0.3
strokeintegerOptional

The stroke width used when visualizing predictions

Default: 1
disable_preproc_auto_orientboolean · nullableOptional

If true, disables automatic image orientation

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, disables automatic contrast adjustment

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, disables automatic grayscale conversion

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, disables automatic static crop

Default: false
disable_active_learningboolean · nullableOptional

If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)

Default: false
active_learning_target_datasetstring · nullableOptional

Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id

sourcestring · nullableOptional

The source of the inference request

Default: external
source_infostring · nullableOptional

The detailed source information of the inference request

Default: external
response_mask_formatstring · enum · nullableOptional

The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models.

Default: polygon
Possible values:polygonrle
Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · InstanceSegmentationInferenceResponseOptional

Instance Segmentation inference response.

Attributes: predictions (List[Union[ inference.core.entities.responses.inference.InstanceSegmentationPrediction, inference.core.entities.responses.inference.InstanceSegmentationRLEPrediction ]]): List of instance segmentation predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsany[]Required
object · KeypointsDetectionInferenceResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · KeypointsPrediction[]Required
object · ObjectDetectionInferenceResponseOptional

Object Detection inference response.

Attributes: predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · ObjectDetectionPrediction[]Required

Object Detection prediction.

Attributes: x (float): The center x-axis pixel coordinate of the prediction. y (float): The center y-axis pixel coordinate of the prediction. width (float): The width of the prediction bounding box in number of pixels. height (float): The height of the prediction bounding box in number of pixels. confidence (float): The detection confidence as a fraction between 0 and 1. class_name (str): The predicted class label. class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1. class_id (int): The class id of the prediction

object · ClassificationInferenceResponseOptional

Classification inference response.

Attributes: predictions (List[inference.core.entities.responses.inference.ClassificationPrediction]): List of classification predictions. top (str): The top predicted class label. confidence (float): The confidence of the top predicted class label.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · ClassificationPrediction[]Required

Classification prediction.

Attributes: class_name (str): The predicted class label. class_id (int): Numeric ID associated with the class label. confidence (float): The class label confidence as a fraction between 0 and 1.

topstringOptional

The top predicted class label

Default:
confidencenumberOptional

The confidence of the top predicted class label

Default: 0
parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · MultiLabelClassificationInferenceResponseOptional

Multi-label Classification inference response.

Attributes: predictions (Dict[str, inference.core.entities.responses.inference.MultiLabelClassificationPrediction]): Dictionary of multi-label classification predictions. predicted_classes (List[str]): The list of predicted classes.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobjectRequired
predicted_classesstring[]Required

The list of predicted classes

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · SemanticSegmentationInferenceResponseOptional

Semantic Segmentation inference response.

Attributes: predictions (inference.core.entities.responses.inference.SemanticSegmentationPrediction): Semantic segmentation predictions.

Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
predictionsobject · SemanticSegmentationPredictionRequired
object · StubResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

is_stubbooleanRequired

Field to mark prediction type as stub

model_idstringRequired

Identifier of a model stub that was called

task_typestringRequired

Task type of the project

anyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/{dataset_id}/{version_id}
POST /{dataset_id}/{version_id} HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
{
  "visualization": "text",
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "predictions": [
    "anything"
  ]
}

Depth Estimation

posthttp://localhost:9001/infer/depth-estimation

Run the depth estimation model to generate a depth map.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableOptional
model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

depth_version_idstring · nullableOptional

The version ID of the depth estimation model

Default: small
depth_map_formatstring · enumOptional

Serialization format for normalized_depth in the response: json (default, wire-compatible with older clients) returns the nested float list; png16 returns a base64 16-bit grayscale PNG (quantization step 1/65535, typically >10x smaller payload - inference_sdk decodes it back to a numpy array when requested via depth_map_format='png16'); png8 returns a base64 8-bit grayscale PNG (256 depth levels, roughly another order of magnitude smaller - fine for visualization/thresholding, lossy for geometric use).

Default: json
Possible values:jsonpng16png8
Responses
200Successful Responseapplication/json
normalized_depthany ofRequired

Per-image normalized ordinal depth as a 2D array of floats between 0 and 1, where 1 is nearest and 0 is farthest. Values are not physical distances or directly comparable across images or model families without calibration. The normalized depth map: a 2D array of floats between 0 and 1 (json format, default) or a base64 grayscale PNG string (png16/png8), per the request's depth_map_format

Show properties
stringOptional
number[][]Optional
depth_map_formatstring · enumOptional

The serialization format used for normalized_depth

Default: json
Possible values:jsonpng16png8
imagestring · nullableOptional

Base64 encoded visualization of the depth map if visualize_predictions is True

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/infer/depth-estimation
POST /infer/depth-estimation HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "text",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "depth_version_id": "small",
  "depth_map_format": "json"
}
200Successful Response
{
  "normalized_depth": "text",
  "depth_map_format": "json",
  "image": "text"
}

Depth Estimation with model ID in path

posthttp://localhost:9001/infer/depth-estimation/{model_id}

Run depth estimation. Model ID is specified in the URL path and can contain slashes.

Path parameters
model_idstringRequired
Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableOptional
model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

depth_version_idstring · nullableOptional

The version ID of the depth estimation model

Default: small
depth_map_formatstring · enumOptional

Serialization format for normalized_depth in the response: json (default, wire-compatible with older clients) returns the nested float list; png16 returns a base64 16-bit grayscale PNG (quantization step 1/65535, typically >10x smaller payload - inference_sdk decodes it back to a numpy array when requested via depth_map_format='png16'); png8 returns a base64 8-bit grayscale PNG (256 depth levels, roughly another order of magnitude smaller - fine for visualization/thresholding, lossy for geometric use).

Default: json
Possible values:jsonpng16png8
Responses
200Successful Responseapplication/json
normalized_depthany ofRequired

Per-image normalized ordinal depth as a 2D array of floats between 0 and 1, where 1 is nearest and 0 is farthest. Values are not physical distances or directly comparable across images or model families without calibration. The normalized depth map: a 2D array of floats between 0 and 1 (json format, default) or a base64 grayscale PNG string (png16/png8), per the request's depth_map_format

Show properties
stringOptional
number[][]Optional
depth_map_formatstring · enumOptional

The serialization format used for normalized_depth

Default: json
Possible values:jsonpng16png8
imagestring · nullableOptional

Base64 encoded visualization of the depth map if visualize_predictions is True

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/infer/depth-estimation/{model_id}
POST /infer/depth-estimation/{model_id} HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "text",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "depth_version_id": "small",
  "depth_map_format": "json"
}
200Successful Response
{
  "normalized_depth": "text",
  "depth_map_format": "json",
  "image": "text"
}

Large multi-modal model infer

posthttp://localhost:9001/infer/lmm

Run inference with the specified large multi-modal model

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableRequired

A unique model identifier

model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

disable_preproc_auto_orientboolean · nullableOptional

If true, the auto orient preprocessing step is disabled for this call.

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, the auto contrast preprocessing step is disabled for this call.

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, the grayscale preprocessing step is disabled for this call.

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, the static crop preprocessing step is disabled for this call.

Default: false
promptstring · nullableOptional

If set, use this prompt to guide the LMM

enable_thinkingbooleanOptional

If true, enables thinking/reasoning mode for models that support it (e.g. Qwen3.5). The model's reasoning will be included in the response.

Default: false
max_new_tokensinteger · nullableOptional

Maximum number of tokens to generate. If not set, the model's default will be used.

Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · LMMInferenceResponseOptional
Show properties
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
responseany ofRequired

Text/structured response generated by model

object · LMMInferenceResponse[]Optional
Show properties
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
responseany ofRequired

Text/structured response generated by model

object · StubResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

is_stubbooleanRequired

Field to mark prediction type as stub

model_idstringRequired

Identifier of a model stub that was called

task_typestringRequired

Task type of the project

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/infer/lmm
POST /infer/lmm HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "raccoon-detector-1",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "disable_preproc_auto_orient": false,
  "disable_preproc_contrast": false,
  "disable_preproc_grayscale": false,
  "disable_preproc_static_crop": false,
  "prompt": "caption",
  "enable_thinking": false,
  "max_new_tokens": 1
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "response": "text"
}

Large multi-modal model infer with model ID in path

posthttp://localhost:9001/infer/lmm/{model_id}

Run inference with the specified large multi-modal model. Model ID is specified in the URL path (can contain slashes).

Path parameters
model_idstringRequired
Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableRequired

A unique model identifier

model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

disable_preproc_auto_orientboolean · nullableOptional

If true, the auto orient preprocessing step is disabled for this call.

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, the auto contrast preprocessing step is disabled for this call.

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, the grayscale preprocessing step is disabled for this call.

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, the static crop preprocessing step is disabled for this call.

Default: false
promptstring · nullableOptional

If set, use this prompt to guide the LMM

enable_thinkingbooleanOptional

If true, enables thinking/reasoning mode for models that support it (e.g. Qwen3.5). The model's reasoning will be included in the response.

Default: false
max_new_tokensinteger · nullableOptional

Maximum number of tokens to generate. If not set, the model's default will be used.

Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · LMMInferenceResponseOptional
Show properties
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
responseany ofRequired

Text/structured response generated by model

object · LMMInferenceResponse[]Optional
Show properties
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
responseany ofRequired

Text/structured response generated by model

object · StubResponseOptional
Show properties
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

is_stubbooleanRequired

Field to mark prediction type as stub

model_idstringRequired

Identifier of a model stub that was called

task_typestringRequired

Task type of the project

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/infer/lmm/{model_id}
POST /infer/lmm/{model_id} HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "raccoon-detector-1",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "disable_preproc_auto_orient": false,
  "disable_preproc_contrast": false,
  "disable_preproc_grayscale": false,
  "disable_preproc_static_crop": false,
  "prompt": "caption",
  "enable_thinking": false,
  "max_new_tokens": 1
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "response": "text"
}

Embeddings and comparison

CLIP Compare

posthttp://localhost:9001/clip/compare

Run the Open AI CLIP model to compute similarity scores.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
clip_version_idstring · nullableOptional

The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: ViT-B-16
model_idstring · nullableOptional
subjectany ofRequired

The type of image data provided, one of 'url' or 'base64'

Example: url
Show properties
object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

stringOptional
subject_typestringOptional

The type of subject, one of 'image' or 'text'

Default: image
promptany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

stringOptional
string[]Optional
objectOptional
prompt_typestringOptional

The type of prompt, one of 'image' or 'text'

Default: text
Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the similarity scores including preprocessing

similarityany ofRequired
Show properties
number[]Optional
objectOptional
parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/clip/compare
POST /clip/compare HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "clip_version_id": "ViT-B-16",
  "model_id": "text",
  "subject": "url",
  "subject_type": "image",
  "prompt": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "prompt_type": "text"
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "similarity": [
    1
  ],
  "parent_id": "text"
}

CLIP Image Embeddings

posthttp://localhost:9001/clip/embed_image

Run the Open AI CLIP model to embed image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
clip_version_idstring · nullableOptional

The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: ViT-B-16
model_idstring · nullableOptional
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the embeddings including preprocessing

embeddingsnumber[][]Required

A list of embeddings, each embedding is a list of floats

Example: [[0.12, 0.23, 0.34, ..., 0.43]]
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/clip/embed_image
POST /clip/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "clip_version_id": "ViT-B-16",
  "model_id": "text",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ]
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

CLIP Text Embeddings

posthttp://localhost:9001/clip/embed_text

Run the Open AI CLIP model to embed text data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
clip_version_idstring · nullableOptional

The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: ViT-B-16
model_idstring · nullableOptional
textany ofRequired

A string or list of strings

Example: The quick brown fox jumps over the lazy dog
Show properties
string[]Optional
stringOptional
Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the embeddings including preprocessing

embeddingsnumber[][]Required

A list of embeddings, each embedding is a list of floats

Example: [[0.12, 0.23, 0.34, ..., 0.43]]
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/clip/embed_text
POST /clip/embed_text HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "clip_version_id": "ViT-B-16",
  "model_id": "text",
  "text": "The quick brown fox jumps over the lazy dog"
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Perception Encoder Compare

posthttp://localhost:9001/perception_encoder/compare

Run the Meta Perception Encoder model to compute similarity scores.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
perception_encoder_version_idstring · nullableOptional

The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: PE-Core-L14-336
model_idstring · nullableOptional
subjectany ofRequired

The type of image data provided, one of 'url' or 'base64'

Example: url
Show properties
object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

stringOptional
subject_typestringOptional

The type of subject, one of 'image' or 'text'

Default: image
promptany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

stringOptional
string[]Optional
objectOptional
prompt_typestringOptional

The type of prompt, one of 'image' or 'text'

Default: text
Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the similarity scores including preprocessing

similarityany ofRequired
Show properties
number[]Optional
objectOptional
parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/perception_encoder/compare
POST /perception_encoder/compare HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "perception_encoder_version_id": "PE-Core-L14-336",
  "model_id": "text",
  "subject": "url",
  "subject_type": "image",
  "prompt": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "prompt_type": "text"
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "similarity": [
    1
  ],
  "parent_id": "text"
}

PE Image Embeddings

posthttp://localhost:9001/perception_encoder/embed_image

Run the Meta Perception Encoder model to embed image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
perception_encoder_version_idstring · nullableOptional

The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: PE-Core-L14-336
model_idstring · nullableOptional
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the embeddings including preprocessing

embeddingsnumber[][]Required

A list of embeddings, each embedding is a list of floats

Example: [[0.12, 0.23, 0.34, ..., 0.43]]
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/perception_encoder/embed_image
POST /perception_encoder/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "perception_encoder_version_id": "PE-Core-L14-336",
  "model_id": "text",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ]
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Perception Encoder Text Embeddings

posthttp://localhost:9001/perception_encoder/embed_text

Run the Meta Perception Encoder model to embed text data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
perception_encoder_version_idstring · nullableOptional

The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.

Default: PE-Core-L14-336
model_idstring · nullableOptional
textany ofRequired

A string or list of strings

Example: The quick brown fox jumps over the lazy dog
Show properties
string[]Optional
stringOptional
Responses
200Successful Responseapplication/json
inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the embeddings including preprocessing

embeddingsnumber[][]Required

A list of embeddings, each embedding is a list of floats

Example: [[0.12, 0.23, 0.34, ..., 0.43]]
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/perception_encoder/embed_text
POST /perception_encoder/embed_text HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "perception_encoder_version_id": "PE-Core-L14-336",
  "model_id": "text",
  "text": "The quick brown fox jumps over the lazy dog"
}
200Successful Response
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Segmentation and detection

Grounding DINO inference.

posthttp://localhost:9001/grounding_dino/infer

Run the Grounding DINO zero-shot object detection model.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableOptional
model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

disable_preproc_auto_orientboolean · nullableOptional

If true, the auto orient preprocessing step is disabled for this call.

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, the auto contrast preprocessing step is disabled for this call.

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, the grayscale preprocessing step is disabled for this call.

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, the static crop preprocessing step is disabled for this call.

Default: false
textstring[]Required

A list of strings

Example: ["person","dog","cat"]
box_thresholdnumber · nullableOptional
Default: 0.5
grounding_dino_version_idstring · nullableOptional
Default: default
text_thresholdnumber · nullableOptional
Default: 0.5
class_agnostic_nmsboolean · nullableOptional
Default: false
Responses
200Successful Responseapplication/json
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
Show properties
object · InferenceResponseImage[]Optional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

object · InferenceResponseImageOptional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

predictionsobject · ObjectDetectionPrediction[]Required

Object Detection prediction.

Attributes: x (float): The center x-axis pixel coordinate of the prediction. y (float): The center y-axis pixel coordinate of the prediction. width (float): The width of the prediction bounding box in number of pixels. height (float): The height of the prediction bounding box in number of pixels. confidence (float): The detection confidence as a fraction between 0 and 1. class_name (str): The predicted class label. class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1. class_id (int): The class id of the prediction

Show properties
xnumberRequired

The center x-axis pixel coordinate of the prediction

ynumberRequired

The center y-axis pixel coordinate of the prediction

widthnumberRequired

The width of the prediction bounding box in number of pixels

heightnumberRequired

The height of the prediction bounding box in number of pixels

confidencenumberRequired

The detection confidence as a fraction between 0 and 1

classstringRequired

The predicted class label

class_confidencenumber · nullableOptional

The class label confidence as a fraction between 0 and 1

class_idintegerRequired

The class id of the prediction

tracker_idinteger · nullableOptional

The tracker id of the prediction if tracking is enabled

detection_idstringOptional

Unique identifier of detection

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/grounding_dino/infer
POST /grounding_dino/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "text",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "disable_preproc_auto_orient": false,
  "disable_preproc_contrast": false,
  "disable_preproc_grayscale": false,
  "disable_preproc_static_crop": false,
  "text": [
    "person",
    "dog",
    "cat"
  ],
  "box_threshold": 0.5,
  "grounding_dino_version_id": "default",
  "text_threshold": 0.5,
  "class_agnostic_nms": false
}
200Successful Response
{
  "visualization": "text",
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ]
}

Owlv2 image prompting

posthttp://localhost:9001/owlv2/infer

Run the google owlv2 model to few-shot object detect

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
owlv2_version_idstring · nullableOptional

The version ID of owlv2 to be used for this request.

Default: owlv2-large-patch14-ensemble
model_idstring · nullableOptional

Model id to be used in the request.

imageany ofRequired

Images to run the model on

Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

training_dataobject · TrainingImage[]Required

Training images for the owlvit model to learn form

Show properties
boxesobject · TrainBox[]Required

List of boxes and corresponding classes of examples for the model to learn from

Show properties
xintegerRequired

Center x coordinate in pixels of train box

yintegerRequired

Center y coordinate in pixels of train box

wintegerRequired

Width in pixels of train box

hintegerRequired

Height in pixels of train box

clsstringRequired

Class name of object this box encloses

negativebooleanOptional

Whether this object is a positive or negative example for this class

Default: false
imageobject · InferenceRequestImageRequired

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

confidencenumber · nullableOptional

Default confidence threshold for owlvit predictions. Needs to be much higher than you're used to, probably 0.99 - 0.9999

Default: 0.99
visualize_predictionsboolean · nullableOptional

If true, the predictions will be drawn on the original image and returned as a base64 string

Default: false
visualization_labelsboolean · nullableOptional

If true, labels will be rendered on prediction visualizations

Default: false
visualization_stroke_widthinteger · nullableOptional

The stroke width used when visualizing predictions

Default: 1
Responses
200Successful Responseapplication/json
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
Show properties
object · InferenceResponseImage[]Optional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

object · InferenceResponseImageOptional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

predictionsobject · ObjectDetectionPrediction[]Required

Object Detection prediction.

Attributes: x (float): The center x-axis pixel coordinate of the prediction. y (float): The center y-axis pixel coordinate of the prediction. width (float): The width of the prediction bounding box in number of pixels. height (float): The height of the prediction bounding box in number of pixels. confidence (float): The detection confidence as a fraction between 0 and 1. class_name (str): The predicted class label. class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1. class_id (int): The class id of the prediction

Show properties
xnumberRequired

The center x-axis pixel coordinate of the prediction

ynumberRequired

The center y-axis pixel coordinate of the prediction

widthnumberRequired

The width of the prediction bounding box in number of pixels

heightnumberRequired

The height of the prediction bounding box in number of pixels

confidencenumberRequired

The detection confidence as a fraction between 0 and 1

classstringRequired

The predicted class label

class_confidencenumber · nullableOptional

The class label confidence as a fraction between 0 and 1

class_idintegerRequired

The class id of the prediction

tracker_idinteger · nullableOptional

The tracker id of the prediction if tracking is enabled

detection_idstringOptional

Unique identifier of detection

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/owlv2/infer
POST /owlv2/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "owlv2_version_id": "owlv2-base-patch16-ensemble",
  "model_id": "text",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "training_data": [
    {
      "boxes": [
        {
          "x": 1,
          "y": 1,
          "w": 1,
          "h": 1,
          "cls": "text",
          "negative": false
        }
      ],
      "image": {
        "type": "url",
        "value": "http://www.example-image-url.com"
      }
    }
  ],
  "confidence": 0.99,
  "visualize_predictions": false,
  "visualization_labels": false,
  "visualization_stroke_width": 1
}
200Successful Response
{
  "visualization": "text",
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ]
}

YOLO-World inference.

posthttp://localhost:9001/yolo_world/infer

Run the YOLO-World zero-shot object detection model.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableOptional
model_typestring · nullableOptional

The type of the model, usually referring to what task the model performs

imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

disable_preproc_auto_orientboolean · nullableOptional

If true, the auto orient preprocessing step is disabled for this call.

Default: false
disable_preproc_contrastboolean · nullableOptional

If true, the auto contrast preprocessing step is disabled for this call.

Default: false
disable_preproc_grayscaleboolean · nullableOptional

If true, the grayscale preprocessing step is disabled for this call.

Default: false
disable_preproc_static_cropboolean · nullableOptional

If true, the static crop preprocessing step is disabled for this call.

Default: false
textstring[]Required

A list of strings

Example: ["person","dog","cat"]
yolo_world_version_idstring · nullableOptional
Default: l
confidencenumber · nullableOptional
Default: 0.4
Responses
200Successful Responseapplication/json
visualizationstring · nullableOptional

Base64 encoded string containing prediction visualization image data

inference_idstring · nullableOptional

Unique identifier of inference

frame_idinteger · nullableOptional

The frame id of the image used in inference if the input was a video

timenumber · nullableOptional

The time in seconds it took to produce the predictions including image preprocessing

imageany ofRequired
Show properties
object · InferenceResponseImage[]Optional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

object · InferenceResponseImageOptional

Inference response image information.

Attributes: width (int): The original width of the image used in inference. height (int): The original height of the image used in inference.

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

predictionsobject · ObjectDetectionPrediction[]Required

Object Detection prediction.

Attributes: x (float): The center x-axis pixel coordinate of the prediction. y (float): The center y-axis pixel coordinate of the prediction. width (float): The width of the prediction bounding box in number of pixels. height (float): The height of the prediction bounding box in number of pixels. confidence (float): The detection confidence as a fraction between 0 and 1. class_name (str): The predicted class label. class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1. class_id (int): The class id of the prediction

Show properties
xnumberRequired

The center x-axis pixel coordinate of the prediction

ynumberRequired

The center y-axis pixel coordinate of the prediction

widthnumberRequired

The width of the prediction bounding box in number of pixels

heightnumberRequired

The height of the prediction bounding box in number of pixels

confidencenumberRequired

The detection confidence as a fraction between 0 and 1

classstringRequired

The predicted class label

class_confidencenumber · nullableOptional

The class label confidence as a fraction between 0 and 1

class_idintegerRequired

The class id of the prediction

tracker_idinteger · nullableOptional

The tracker id of the prediction if tracking is enabled

detection_idstringOptional

Unique identifier of detection

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/yolo_world/infer
POST /yolo_world/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "text",
  "model_type": "object-detection",
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "disable_preproc_auto_orient": false,
  "disable_preproc_contrast": false,
  "disable_preproc_grayscale": false,
  "disable_preproc_static_crop": false,
  "text": [
    "person",
    "dog",
    "cat"
  ],
  "yolo_world_version_id": "l",
  "confidence": 0.4
}
200Successful Response
{
  "visualization": "text",
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ]
}

SAM Image Embeddings

posthttp://localhost:9001/sam/embed_image

Run the Meta AI Segmant Anything Model to embed image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of vit_h, vit_l, or vit_b.

Default: vit_h
model_idstring · nullableOptional
imageobject · InferenceRequestImage · nullableOptional

The image to be embedded

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be embedded used to cache the embedding.

formatstring · nullableOptional

The format of the response. Must be one of json or binary. If binary, embedding is returned as a binary numpy array.

Default: json
Responses
200Successful Responseapplication/json
embeddingsany ofRequired

If request format is json, embeddings is a series of nested lists representing the SAM embedding. If request format is binary, embeddings is a binary numpy array. The dimensions of the embedding are 1 x 256 x 64 x 64.

Example: [[[[0.1, 0.2, 0.3, ...] ...] ...]]
Show properties
number[][][][]Optional
anyOptional
timenumberRequired

The time in seconds it took to produce the embeddings including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam/embed_image
POST /sam/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam_version_id": "vit_h",
  "model_id": "text",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id",
  "format": "json"
}
200Successful Response
{
  "embeddings": "[[[[0.1, 0.2, 0.3, ...] ...] ...]]",
  "time": 1
}

SAM Image Segmentation

posthttp://localhost:9001/sam/segment_image

Run the Meta AI Segmant Anything Model to generate segmenations for image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of vit_h, vit_l, or vit_b.

Default: vit_h
model_idstring · nullableOptional
embeddingsany ofOptional

The embeddings to be decoded. The dimensions of the embeddings are 1 x 256 x 64 x 64. If embeddings is not provided, image must be provided.

Example: [[[[0.1, 0.2, 0.3, ...] ...] ...]]
Show properties
number[][][][]Optional
anyOptional
embeddings_formatstring · nullableOptional

The format of the embeddings. Must be one of json or binary. If binary, embeddings are expected to be a binary numpy array.

Default: json
formatstring · nullableOptional

The format of the response. Must be one of json or binary. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons, then returned as json.

Default: json
imageobject · InferenceRequestImage · nullableOptional

The image to be segmented. Only required if embeddings are not provided.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be segmented used to retrieve cached embeddings. If an embedding is cached, it will be used instead of generating a new embedding. If no embedding is cached, a new embedding will be generated and cached.

has_mask_inputboolean · nullableOptional

Whether or not the request includes a mask input. If true, the mask input must be provided.

Default: false
mask_inputany ofOptional

The set of output masks. If request format is json, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If request format is binary, masks is a list of binary numpy arrays. The dimensions of each mask are 256 x 256. This is the same as the output, low resolution mask from the previous inference.

Show properties
number[][][]Optional
anyOptional
mask_input_formatstring · nullableOptional

The format of the mask input. Must be one of json or binary. If binary, mask input is expected to be a binary numpy array.

Default: json
orig_im_sizeinteger[] · nullableOptional

The original size of the image used to generate the embeddings. This is only required if the image is not provided.

point_coordsnumber[][] · nullableOptional

The coordinates of the interactive points used during decoding. Each point (x,y pair) corresponds to a label in point_labels.

Default: [[0,0]]
point_labelsnumber[] · nullableOptional

The labels of the interactive points used during decoding. A 1 represents a positive point (part of the object to be segmented). A -1 represents a negative point (not part of the object to be segmented). Each label corresponds to a point in point_coords.

Default: [-1]
use_mask_input_cacheboolean · nullableOptional

Whether or not to use the mask input cache. If true, the mask input cache will be used if it exists. If false, the mask input cache will not be used.

Default: true
Responses
200Successful Responseapplication/json
masksany ofRequired

The set of output masks. If request format is json, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If request format is binary, masks is a list of binary numpy arrays. The dimensions of each mask are the same as the dimensions of the input image.

Show properties
integer[][][]Optional
anyOptional
low_res_masksany ofRequired

The set of output masks. If request format is json, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If request format is binary, masks is a list of binary numpy arrays. The dimensions of each mask are 256 x 256

Show properties
integer[][][]Optional
anyOptional
timenumberRequired

The time in seconds it took to produce the segmentation including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam/segment_image
POST /sam/segment_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam_version_id": "vit_h",
  "model_id": "text",
  "embeddings": "[[[[0.1, 0.2, 0.3, ...] ...] ...]]",
  "embeddings_format": "json",
  "format": "json",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id",
  "has_mask_input": true,
  "mask_input": [
    [
      [
        1
      ]
    ]
  ],
  "mask_input_format": "json",
  "orig_im_size": [
    640,
    320
  ],
  "point_coords": [
    [
      10,
      10
    ]
  ],
  "point_labels": [
    1
  ],
  "use_mask_input_cache": true
}
200Successful Response
{
  "masks": [
    [
      [
        1
      ]
    ]
  ],
  "low_res_masks": [
    [
      [
        1
      ]
    ]
  ],
  "time": 1
}

SAM2 Image Embeddings

posthttp://localhost:9001/sam2/embed_image

Run the Meta AI Segment Anything 2 Model to embed image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam2_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus

Default: hiera_large
model_idstring · nullableOptional
imageobject · InferenceRequestImage · nullableOptional

The image to be embedded

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be embedded used to cache the embedding.

Responses
200Successful Responseapplication/json
image_idstringRequired

Image id embeddings are cached to

timenumberRequired

The time in seconds it took to produce the embeddings including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam2/embed_image
POST /sam2/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam2_version_id": "hiera_large",
  "model_id": "text",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id"
}
200Successful Response
{
  "image_id": "text",
  "time": 1
}

SAM2 Image Segmentation

posthttp://localhost:9001/sam2/segment_image

Run the Meta AI Segment Anything 2 Model to generate segmenations for image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam2_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus

Default: hiera_large
model_idstring · nullableOptional
formatstring · nullableOptional

The format of the response. Must be one of 'json', 'rle', or 'binary'. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons. If rle, masks are converted to RLE format.

Default: json
imageobject · InferenceRequestImageRequired

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be segmented used to retrieve cached embeddings. If an embedding is cached, it will be used instead of generating a new embedding. If no embedding is cached, a new embedding will be generated and cached.

promptsobject · Sam2PromptSetOptional
Show properties
promptsobject · Sam2Prompt[] · nullableOptional

An optional list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points

Show properties
boxobject · Box · nullableOptional
pointsobject · Point-Input[] · nullableOptional
multimask_outputbooleanOptional

If true, the model will return three masks. For ambiguous input prompts (such as a single click), this will often produce better masks than a single prediction. If only a single mask is needed, the model's predicted quality score can be used to select the best mask. For non-ambiguous prompts, such as multiple input prompts, multimask_output=False can give better results.

Default: true
save_logits_to_cachebooleanOptional

If True, saves the low-resolution logits to the cache for potential future use. This can speed up subsequent requests with similar prompts on the same image. This feature is ignored if DISABLE_SAM2_LOGITS_CACHE env variable is set True

Default: false
load_logits_from_cachebooleanOptional

If True, attempts to load previously cached low-resolution logits for the given image and prompt set. This can significantly speed up inference when making multiple similar requests on the same image. This feature is ignored if DISABLE_SAM2_LOGITS_CACHE env variable is set True

Default: false
Responses
200Successful Responseapplication/json
predictionsobject · Sam2SegmentationPrediction[]Required

SAM segmentation prediction.

Attributes: masks (Union[List[List[List[int]]], Dict[str, Any], Any]): Mask data - either polygon coordinates or RLE encoding. confidence (float): Masks confidences. format (Optional[str]): Format of the mask data: 'polygon' or 'rle'.

Show properties
masksany ofRequired

If polygon format, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If rle format, masks is a dictionary with the keys 'size' and 'counts' containing the size and counts of the RLE encoding.

Show properties
integer[][][]Optional
objectOptional
confidencenumberRequired

Masks confidences

formatstring · nullableOptional

Format of the mask data: 'polygon' or 'rle'

Default: polygon
timenumberRequired

The time in seconds it took to produce the segmentation including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam2/segment_image
POST /sam2/segment_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam2_version_id": "hiera_large",
  "model_id": "text",
  "format": "json",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id",
  "prompts": {
    "prompts": [
      {
        "box": {
          "x": 1,
          "y": 1,
          "width": 1,
          "height": 1
        },
        "points": [
          {
            "x": 1,
            "y": 1,
            "positive": true
          }
        ]
      }
    ]
  },
  "multimask_output": true,
  "save_logits_to_cache": false,
  "load_logits_from_cache": false
}
200Successful Response
{
  "predictions": [
    {
      "masks": [
        [
          [
            1
          ]
        ]
      ],
      "confidence": 1,
      "format": "polygon"
    }
  ],
  "time": 1
}

Seg preview Image Embeddings

posthttp://localhost:9001/sam3/embed_image

Run the Model to embed image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam2_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus

Default: hiera_large
model_idstring · nullableOptional
imageobject · InferenceRequestImage · nullableOptional

The image to be embedded

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be embedded used to cache the embedding.

Responses
200Successful Responseapplication/json
image_idstringRequired

Image id embeddings are cached to

timenumberRequired

The time in seconds it took to produce the embeddings including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam3/embed_image
POST /sam3/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam2_version_id": "hiera_large",
  "model_id": "text",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id"
}
200Successful Response
{
  "image_id": "text",
  "time": 1
}

SAM3 PCS (promptable concept segmentation)

posthttp://localhost:9001/sam3/concept_segment

Run the SAM3 PCS (promptable concept segmentation) to generate segmentations for image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
sourcestring · nullableOptional

The source of the inference request

source_infostring · nullableOptional

The detailed source information of the inference request

Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
model_idstring · nullableOptional

The model ID of SAM3. Use 'sam3/sam3_final' to target the generic base model.

Default: sam3/sam3_final
formatstring · nullableOptional

One of 'polygon', 'rle'

Default: polygon
imageobject · InferenceRequestImageRequired

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

Optional ID for caching embeddings.

output_prob_threshnumber · nullableOptional

Score threshold for outputs.

Default: 0.5
promptsobject · Sam3Prompt[]Required

List of prompts (text and/or visual)

Show properties
typestring · nullableOptional

Optional hint: 'text' or 'visual'. 'visual' requires at least one box.

textstring · nullableOptional

Concept to segment as a short noun phrase (e.g. 'person'). All matching instances are returned. Can be combined with exemplar boxes in the same prompt.

output_prob_threshnumber · nullableOptional

Score threshold for this prompt's outputs. Overrides request-level threshold if set.

boxesany[] · nullableOptional

Exemplar boxes in absolute pixels, as XYWH entries ({x, y, width, height}, top-left anchored) or XYXY entries ({x0, y0, x1, y1}). Each box marks an example object; the model segments every instance matching the exemplars (and text, if provided), not just the boxed objects. Requires box_labels.

box_labelsany[] · nullableOptional

Per-box exemplar labels, one per entry in boxes: 1/true marks a positive exemplar (segment objects like this), 0/false marks a negative exemplar (exclude objects like this). Required when boxes is set.

nms_iou_thresholdnumber · nullableOptional

IoU threshold for cross-prompt NMS. If None, NMS is disabled. Must be in [0.0, 1.0] when set.

Responses
200Successful Responseapplication/json
prompt_resultsobject · Sam3PromptResult[]Required
Show properties
prompt_indexintegerRequired
echoobject · Sam3PromptEchoRequired
Show properties
prompt_indexintegerRequired
typestring · nullableOptional
textstring · nullableOptional
num_boxesinteger · nullableOptional
predictionsobject · Sam3SegmentationPrediction[]Required
Show properties
masksany ofRequired

Mask data - either polygon coordinates or RLE encoding

confidencenumberRequired

Masks confidence

formatstring · nullableOptional

Format of the mask data: 'polygon' or 'rle'

Default: polygon
timenumberRequired

The time in seconds it took to produce the segmentation including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam3/concept_segment
POST /sam3/concept_segment HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "model_id": "sam3/sam3_final",
  "format": "polygon",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "text",
  "output_prob_thresh": 0.5,
  "prompts": [
    {
      "type": "text",
      "text": "text",
      "output_prob_thresh": 1,
      "boxes": [
        null
      ],
      "box_labels": [
        null
      ]
    }
  ],
  "nms_iou_threshold": 1
}
200Successful Response
{
  "prompt_results": [
    {
      "prompt_index": 1,
      "echo": {
        "prompt_index": 1,
        "type": "text",
        "text": "text",
        "num_boxes": 1
      },
      "predictions": [
        {
          "masks": [
            [
              [
                1
              ]
            ]
          ],
          "confidence": 1,
          "format": "polygon"
        }
      ]
    }
  ],
  "time": 1
}

SAM3 PVS (promptable visual segmentation)

posthttp://localhost:9001/sam3/visual_segment

Run the SAM3 PVS (promptable visual segmentation) to generate segmentations for image data.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
sourcestring · nullableOptional

The source of the inference request

source_infostring · nullableOptional

The detailed source information of the inference request

Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
sam2_version_idstring · nullableOptional

The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus

Default: hiera_large
model_idstring · nullableOptional
formatstring · nullableOptional

The format of the response. Must be one of 'json', 'rle', or 'binary'. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons. If rle, masks are converted to RLE format.

Default: json
imageobject · InferenceRequestImageRequired

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

image_idstring · nullableOptional

The ID of the image to be segmented used to retrieve cached embeddings. If an embedding is cached, it will be used instead of generating a new embedding. If no embedding is cached, a new embedding will be generated and cached.

promptsobject · Sam2PromptSetOptional
Show properties
promptsobject · Sam2Prompt[] · nullableOptional

An optional list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points

Show properties
boxobject · Box · nullableOptional
pointsobject · Point-Input[] · nullableOptional
multimask_outputbooleanOptional

If true, the model will return three masks. For ambiguous input prompts (such as a single click), this will often produce better masks than a single prediction. If only a single mask is needed, the model's predicted quality score can be used to select the best mask. For non-ambiguous prompts, such as multiple input prompts, multimask_output=False can give better results.

Default: true
save_logits_to_cachebooleanOptional

If True, saves the low-resolution logits to the cache for potential future use. This can speed up subsequent requests with similar prompts on the same image. This feature is ignored if DISABLE_SAM2_LOGITS_CACHE env variable is set True

Default: false
load_logits_from_cachebooleanOptional

If True, attempts to load previously cached low-resolution logits for the given image and prompt set. This can significantly speed up inference when making multiple similar requests on the same image. This feature is ignored if DISABLE_SAM2_LOGITS_CACHE env variable is set True

Default: false
Responses
200Successful Responseapplication/json
predictionsobject · Sam2SegmentationPrediction[]Required

SAM segmentation prediction.

Attributes: masks (Union[List[List[List[int]]], Dict[str, Any], Any]): Mask data - either polygon coordinates or RLE encoding. confidence (float): Masks confidences. format (Optional[str]): Format of the mask data: 'polygon' or 'rle'.

Show properties
masksany ofRequired

If polygon format, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If rle format, masks is a dictionary with the keys 'size' and 'counts' containing the size and counts of the RLE encoding.

Show properties
integer[][][]Optional
objectOptional
confidencenumberRequired

Masks confidences

formatstring · nullableOptional

Format of the mask data: 'polygon' or 'rle'

Default: polygon
timenumberRequired

The time in seconds it took to produce the segmentation including preprocessing

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam3/visual_segment
POST /sam3/visual_segment HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "sam2_version_id": "hiera_large",
  "model_id": "text",
  "format": "json",
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "image_id": "image_id",
  "prompts": {
    "prompts": [
      {
        "box": {
          "x": 1,
          "y": 1,
          "width": 1,
          "height": 1
        },
        "points": [
          {
            "x": 1,
            "y": 1,
            "positive": true
          }
        ]
      }
    ]
  },
  "multimask_output": true,
  "save_logits_to_cache": false,
  "load_logits_from_cache": false
}
200Successful Response
{
  "predictions": [
    {
      "masks": [
        [
          [
            1
          ]
        ]
      ],
      "confidence": 1,
      "format": "polygon"
    }
  ],
  "time": 1
}

SAM3 3D Object Generation

posthttp://localhost:9001/sam3_3d/infer

Generate 3D meshes and Gaussian splatting from 2D images with mask prompts.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
imageobject · InferenceRequestImageRequired

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

mask_inputanyRequired

Mask input in any supported format: polygon [x1,y1,x2,y2,...], binary mask (base64), RLE dict, or list of these.

model_idstring · nullableOptional

The model ID for SAM3_3D.

Default: sam3-3d-objects
output_meshesboolean · nullableOptional

SAM3 3D always outputs object gaussians, and can optionally output object meshes if output_meshes is True.

Default: true
output_sceneboolean · nullableOptional

Output the combined scene reconstruction in addition to individual object reconstructions.

Default: true
with_mesh_postprocessboolean · nullableOptional

Enable mesh postprocessing.

Default: true
with_texture_bakingboolean · nullableOptional

Enable texture baking for meshes.

Default: true
use_distillationsboolean · nullableOptional

Use the distilled versions of the model components.

Default: false
Responses
200Successful Responseapplication/json
anyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/sam3_3d/infer
POST /sam3_3d/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "image": {
    "type": "url",
    "value": "http://www.example-image-url.com"
  },
  "mask_input": "anything",
  "model_id": "sam3-3d-objects",
  "output_meshes": true,
  "output_scene": true,
  "with_mesh_postprocess": true,
  "with_texture_baking": true,
  "use_distillations": false
}
200Successful Response
"anything"

OCR

DocTR OCR response

posthttp://localhost:9001/doctr/ocr

Run the DocTR OCR model to retrieve text in an image.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

doctr_version_idstring · nullableOptional
Default: default
model_idstring · nullableOptional
generate_bounding_boxesboolean · nullableOptional
Default: false
Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · OCRInferenceResponseOptional

OCR Inference response.

Attributes: result (str): The combined OCR recognition result. predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR time (float): The time in seconds it took to produce the inference including preprocessing

Show properties
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · OCRInferenceResponse[]Optional

OCR Inference response.

Attributes: result (str): The combined OCR recognition result. predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR time (float): The time in seconds it took to produce the inference including preprocessing

Show properties
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/doctr/ocr
POST /doctr/ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "doctr_version_id": "default",
  "model_id": "text",
  "generate_bounding_boxes": false
}
200Successful Response
{
  "result": "text",
  "image": {
    "width": 1,
    "height": 1
  },
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ],
  "time": 1,
  "parent_id": "text"
}

EasyOCR OCR response

posthttp://localhost:9001/easy_ocr/ocr

Run the EasyOCR model to retrieve text in an image.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

easy_ocr_version_idstring · nullableOptional
Default: english_g2
model_idstring · nullableOptional
language_codesstring[] · nullableOptional
Default: ["en"]
quantizeboolean · nullableOptional

Quantized models are smaller and faster, but may be less accurate and won't work correctly on all hardware.

Default: false
Responses
200Successful Responseapplication/json
any ofOptional
Show properties
object · OCRInferenceResponseOptional

OCR Inference response.

Attributes: result (str): The combined OCR recognition result. predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR time (float): The time in seconds it took to produce the inference including preprocessing

Show properties
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

object · OCRInferenceResponse[]Optional

OCR Inference response.

Attributes: result (str): The combined OCR recognition result. predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR time (float): The time in seconds it took to produce the inference including preprocessing

Show properties
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/easy_ocr/ocr
POST /easy_ocr/ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "easy_ocr_version_id": "english_g2",
  "model_id": "text",
  "language_codes": [
    "en"
  ],
  "quantize": false
}
200Successful Response
{
  "result": "text",
  "image": {
    "width": 1,
    "height": 1
  },
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ],
  "time": 1,
  "parent_id": "text"
}

PP-OCRv6 OCR response

posthttp://localhost:9001/ocr/pp-ocr

Run PP-OCRv6 two-stage OCR to retrieve text in an image.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

text_detectionstring · nullableOptional
Default: __unset__
text_recognitionstring · nullableOptional
Default: __unset__
pp_ocr_version_idstring · nullableOptional
model_idstring · nullableOptional
Responses
200Successful Responseapplication/json
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

Show properties
xnumberRequired

The center x-axis pixel coordinate of the prediction

ynumberRequired

The center y-axis pixel coordinate of the prediction

widthnumberRequired

The width of the prediction bounding box in number of pixels

heightnumberRequired

The height of the prediction bounding box in number of pixels

confidencenumberRequired

The detection confidence as a fraction between 0 and 1

classstringRequired

The predicted class label

class_confidencenumber · nullableOptional

The class label confidence as a fraction between 0 and 1

class_idintegerRequired

The class id of the prediction

tracker_idinteger · nullableOptional

The tracker id of the prediction if tracking is enabled

detection_idstringOptional

Unique identifier of detection

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/ocr/pp-ocr
POST /ocr/pp-ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "text_detection": "__unset__",
  "text_recognition": "__unset__",
  "pp_ocr_version_id": "text",
  "model_id": "text"
}
200Successful Response
{
  "result": "text",
  "image": {
    "width": 1,
    "height": 1
  },
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ],
  "time": 1,
  "parent_id": "text"
}

TrOCR OCR response

posthttp://localhost:9001/ocr/trocr

Run the TrOCR model to retrieve text in an image.

Query parameters
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

countinferenceboolean · nullableOptional
service_secretstring · nullableOptional
Bodyapplication/json
idstringRequired
api_keystring · nullableOptional

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

usage_billablebooleanOptional
Default: true
startnumber · nullableOptional
sourcestring · nullableOptional
source_infostring · nullableOptional
stream_pipeline_context_idstring · nullableOptional

Internal stream-pipeline frame pairing id. Not part of the public API.

disable_model_monitoringboolean · nullableOptional

If true, disables model monitoring for this request

Default: false
imageany ofRequired
Show properties
object · InferenceRequestImage[]Optional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

object · InferenceRequestImageOptional

Image data for inference request.

Attributes: type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'. value (Optional[Any]): Image data corresponding to the image type.

Show properties
typestringRequired

The type of image data provided, one of 'url', 'base64', or 'numpy'

Example: url
valueany · nullableOptional

Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255].

trocr_version_idstring · nullableOptional
Default: trocr-base-printed
model_idstring · nullableOptional
Responses
200Successful Responseapplication/json
resultstringRequired

The combined OCR recognition result.

imageobject · InferenceResponseImage · nullableOptional

Metadata about input image dimensions

Show properties
widthintegerRequired

The original width of the image used in inference

heightintegerRequired

The original height of the image used in inference

predictionsobject · ObjectDetectionPrediction[] · nullableOptional

List of objects detected by OCR

Show properties
xnumberRequired

The center x-axis pixel coordinate of the prediction

ynumberRequired

The center y-axis pixel coordinate of the prediction

widthnumberRequired

The width of the prediction bounding box in number of pixels

heightnumberRequired

The height of the prediction bounding box in number of pixels

confidencenumberRequired

The detection confidence as a fraction between 0 and 1

classstringRequired

The predicted class label

class_confidencenumber · nullableOptional

The class label confidence as a fraction between 0 and 1

class_idintegerRequired

The class id of the prediction

tracker_idinteger · nullableOptional

The tracker id of the prediction if tracking is enabled

detection_idstringOptional

Unique identifier of detection

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

timenumberRequired

The time in seconds it took to produce the inference including preprocessing.

parent_idstring · nullableOptional

Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference

422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/ocr/trocr
POST /ocr/trocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "id": "text",
  "api_key": "text",
  "usage_billable": true,
  "start": 1,
  "source": "text",
  "source_info": "text",
  "stream_pipeline_context_id": "text",
  "disable_model_monitoring": false,
  "image": [
    {
      "type": "url",
      "value": "http://www.example-image-url.com"
    }
  ],
  "trocr_version_id": "trocr-base-printed",
  "model_id": "text"
}
200Successful Response
{
  "result": "text",
  "image": {
    "width": 1,
    "height": 1
  },
  "predictions": [
    {
      "x": 1,
      "y": 1,
      "width": 1,
      "height": 1,
      "confidence": 1,
      "class": "text",
      "class_confidence": 1,
      "class_id": 1,
      "tracker_id": 1,
      "detection_id": "text",
      "parent_id": "text"
    }
  ],
  "time": 1,
  "parent_id": "text"
}

Gaze detection

Gaze Detection (deprecated)Deprecated

posthttp://localhost:9001/gaze/gaze_detection

Deprecated. Always returns HTTP 410 Gone. The endpoint stub will be removed end of Q2 2026.

Responses
200Successful Responseapplication/json
anyOptional
post/gaze/gaze_detection
POST /gaze/gaze_detection HTTP/1.1
Host: localhost:9001
Accept: application/json
200Successful Response
"anything"

WebRTC

[EXPERIMENTAL] Establishes WebRTC peer connection and processes video stream in spawned process or modal function

posthttp://localhost:9001/initialise_webrtc_worker

[EXPERIMENTAL] Establishes WebRTC peer connection and processes video stream in spawned process or modal function

Bodyapplication/json
api_keystring · nullableOptional
workflow_configurationobject · WorkflowConfigurationRequired
Show properties
typestring · enumRequired
Possible values:WorkflowConfiguration
workflow_specificationobject · nullableOptional
workspace_namestring · nullableOptional
workflow_idstring · nullableOptional
workflow_version_idstring · nullableOptional
image_input_namestringOptional
Default: image
workflows_parametersobject · nullableOptional
disable_sinksbooleanOptional
Default: false
workflows_thread_pool_workersintegerOptional
Default: 4
cancel_thread_pool_tasks_on_exitbooleanOptional
Default: true
video_metadata_input_namestringOptional
Default: video_metadata
is_previewbooleanOptional
Default: false
webrtc_offerobject · WebRTCOfferRequired
Show properties
typestringRequired
sdpstringRequired
webrtc_configobject · WebRTCConfig · nullableOptional
Show properties
iceServersobject · RTCIceServer[]Required
Show properties
urlsany ofRequired
usernamestring · nullableOptional
credentialstring · nullableOptional
webrtc_turn_configobject · WebRTCTURNConfig · nullableOptional
Show properties
urlsany ofRequired
Show properties
stringOptional
string[]Optional
usernamestringRequired
credentialstringRequired
webrtc_realtime_processingbooleanOptional
Default: true
stream_outputstring[] · nullableOptional
data_outputstring[] · nullableOptional
declared_fpsnumber · nullableOptional
rtsp_urlstring · nullableOptional
mjpeg_urlstring · nullableOptional
processing_timeoutinteger · nullableOptional
Default: 3600
processing_session_startedstring · nullableOptional
requested_planstring · nullableOptional
Default: webrtc-gpu-small
requested_gpustring · nullableOptional
requested_regionstring · nullableOptional
workspace_idstring · nullableOptional
session_idstring · nullableOptional
Responses
200Successful Responseapplication/json
statusstringRequired

Operation status

contextobject · CommandContextRequired
Show properties
request_idstring · nullableOptional

Server-side request ID

pipeline_idstring · nullableOptional

Identifier of pipeline connected to operation

sdpstringRequired
typestringRequired
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/initialise_webrtc_worker
POST /initialise_webrtc_worker HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "api_key": "text",
  "workflow_configuration": {
    "type": "WorkflowConfiguration",
    "workflow_specification": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "workspace_name": "text",
    "workflow_id": "text",
    "workflow_version_id": "text",
    "image_input_name": "image",
    "workflows_parameters": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "disable_sinks": false,
    "workflows_thread_pool_workers": 4,
    "cancel_thread_pool_tasks_on_exit": true,
    "video_metadata_input_name": "video_metadata"
  },
  "is_preview": false,
  "webrtc_offer": {
    "type": "text",
    "sdp": "text"
  },
  "webrtc_config": {
    "iceServers": [
      {
        "urls": "text",
        "username": "text",
        "credential": "text"
      }
    ]
  },
  "webrtc_turn_config": {
    "urls": "text",
    "username": "text",
    "credential": "text"
  },
  "webrtc_realtime_processing": true,
  "stream_output": [
    "text"
  ],
  "data_output": [
    "text"
  ],
  "declared_fps": 1,
  "rtsp_url": "text",
  "mjpeg_url": "text",
  "processing_timeout": 3600,
  "processing_session_started": "text",
  "requested_plan": "webrtc-gpu-small",
  "requested_gpu": "text",
  "requested_region": "text",
  "workspace_id": "text",
  "session_id": "text"
}
200Successful Response
{
  "status": "text",
  "context": {
    "request_id": "text",
    "pipeline_id": "text"
  },
  "sdp": "text",
  "type": "text"
}

WebRTC session heartbeat

posthttp://localhost:9001/webrtc/session/heartbeat

Receive heartbeat for an active WebRTC session.

This endpoint is called periodically to indicate that their session is still active. The session will be removed from the quota count if no heartbeat is received within the TTL period.

Requires api_key for authentication.

Bodyapplication/json
session_idstringRequired
api_keystringRequired
Responses
200Successful Responseapplication/json
Other propertiesanyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/webrtc/session/heartbeat
POST /webrtc/session/heartbeat HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "session_id": "text",
  "api_key": "text"
}
200Successful Response
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

End WebRTC session

posthttp://localhost:9001/webrtc/session/heartbeat/end

End a WebRTC session and immediately free the quota slot.

Requires api_key for authentication.

Bodyapplication/json
session_idstringRequired
api_keystringRequired
Responses
200Successful Responseapplication/json
Other propertiesanyOptional
422Validation Errorapplication/json
detailobject · ValidationError[]Optional
Show properties
locany[]Required
msgstringRequired
typestringRequired
post/webrtc/session/heartbeat/end
POST /webrtc/session/heartbeat/end HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: application/json

{
  "session_id": "text",
  "api_key": "text"
}
200Successful Response
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}