For the complete documentation index, see llms.txt. This page is also available as Markdown.

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
Endpoint
What it serves

http://localhost:9001/docs

Swagger UI with an interactive request builder.

http://localhost:9001/redoc

ReDoc 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

get

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
200

Successful Response

application/json
anyOptional
get/healthz
GET /healthz HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

Readiness

get

Readiness endpoint for Kubernetes readiness probe.

Responses
200

Successful Response

application/json
anyOptional
get/readiness
GET /readiness HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

Info

get

Get the server name and version number

Responses
200

Successful Response

application/json

Server version information.

Attributes: name (str): Server name. version (str): Server version. uuid (str): Server UUID.

namestringRequiredExample: Roboflow Inference Server
versionstringRequiredExample: 0.0.1
uuidstringRequiredExample: 9c18c6f4-2266-41fb-8a0f-c12ae28f6fbe
get/info
GET /info HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

{
  "name": "Roboflow Inference Server",
  "version": "0.0.1",
  "uuid": "9c18c6f4-2266-41fb-8a0f-c12ae28f6fbe"
}

Metrics

get

Endpoint that serves Prometheus metrics.

Responses
200

Successful Response

application/json
anyOptional
get/metrics
GET /metrics HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

Get Recent Logs

get

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
200

Successful Response

application/json
anyOptional
get/logs
GET /logs HTTP/1.1
Host: localhost:9001
Accept: */*

No content

Dashboard Guard

get
Responses
200

Successful Response

application/json
anyOptional
get/dashboard.html
GET /dashboard.html HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

Dashboard Guard

head
Responses
200

Successful Response

application/json
anyOptional
head/dashboard.html
HEAD /dashboard.html HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

Get model keys

get

Get the ID of each loaded model

Responses
200

Successful Response

application/json
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: */*
200

Successful 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

get

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
numberOptional
or
string · enumOptionalPossible values:
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: polygonPossible values:
Responses
200

Successful Response

application/json
or
or
or
or
or
or
or
anyOptional
get/{dataset_id}/{version_id}
GET /{dataset_id}/{version_id} HTTP/1.1
Host: localhost:9001
Accept: */*
{
  "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_id": 1,
      "detection_id": "text",
      "parent_id": "text",
      "class_confidence": 1,
      "points": [
        {
          "x": 1,
          "y": 1
        }
      ],
      "mask_format": "polygon"
    }
  ]
}

Legacy Infer From Request

post

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
numberOptional
or
string · enumOptionalPossible values:
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: polygonPossible values:
Responses
200

Successful Response

application/json
or
or
or
or
or
or
or
anyOptional
post/{dataset_id}/{version_id}
POST /{dataset_id}/{version_id} HTTP/1.1
Host: localhost:9001
Accept: */*
{
  "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_id": 1,
      "detection_id": "text",
      "parent_id": "text",
      "class_confidence": 1,
      "points": [
        {
          "x": 1,
          "y": 1
        }
      ],
      "mask_format": "polygon"
    }
  ]
}

Depth Estimation

post

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
Body

Request for depth estimation.

Attributes: image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be estimated. model_id (str): The model ID to use for depth estimation. depth_version_id (Optional[str]): The version ID of the depth estimation model. depth_map_format (Literal["json", "png16", "png8"]): Serialization format for the normalized depth map in the response.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: object-detection
imageany ofRequired
or
depth_version_idstring · nullableOptional

The version ID of the depth estimation model

Default: smallExample: 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: jsonPossible values:
Responses
200

Successful Response

application/json

Response for depth estimation inference.

Attributes: normalized_depth (Union[str, List[List[float]]]): The per-image normalized ordinal depth map as a 2D array of floats between 0 and 1. Higher values indicate nearer predictions. serialized according to the request's depth_map_format: a 2D array of floats between 0 and 1 (json, the default) or a base64 grayscale PNG string (16-bit for png16, 8-bit for png8). depth_map_format (Literal["json", "png16", "png8"]): The serialization format used for normalized_depth. image (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True. time (float): The processing time in seconds. visualization (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True.

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

stringOptional
or
depth_map_formatstring · enumOptional

The serialization format used for normalized_depth

Default: jsonPossible values:
imagestring · nullableOptional

Base64 encoded visualization of the depth map if visualize_predictions is True

post/infer/depth-estimation
POST /infer/depth-estimation HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 339

{
  "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"
}
{
  "normalized_depth": "text",
  "depth_map_format": "json",
  "image": "text"
}

Depth Estimation with model ID in path

post

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
Body

Request for depth estimation.

Attributes: image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be estimated. model_id (str): The model ID to use for depth estimation. depth_version_id (Optional[str]): The version ID of the depth estimation model. depth_map_format (Literal["json", "png16", "png8"]): Serialization format for the normalized depth map in the response.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: object-detection
imageany ofRequired
or
depth_version_idstring · nullableOptional

The version ID of the depth estimation model

Default: smallExample: 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: jsonPossible values:
Responses
200

Successful Response

application/json

Response for depth estimation inference.

Attributes: normalized_depth (Union[str, List[List[float]]]): The per-image normalized ordinal depth map as a 2D array of floats between 0 and 1. Higher values indicate nearer predictions. serialized according to the request's depth_map_format: a 2D array of floats between 0 and 1 (json, the default) or a base64 grayscale PNG string (16-bit for png16, 8-bit for png8). depth_map_format (Literal["json", "png16", "png8"]): The serialization format used for normalized_depth. image (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True. time (float): The processing time in seconds. visualization (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True.

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

stringOptional
or
depth_map_formatstring · enumOptional

The serialization format used for normalized_depth

Default: jsonPossible values:
imagestring · nullableOptional

Base64 encoded visualization of the depth map if visualize_predictions is True

post/infer/depth-estimation/{model_id}
POST /infer/depth-estimation/{model_id} HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 339

{
  "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"
}
{
  "normalized_depth": "text",
  "depth_map_format": "json",
  "image": "text"
}

Large multi-modal model infer

post

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
Body
idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: raccoon-detector-1
model_typestring · nullableOptional

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

Example: object-detection
imageany ofRequired
or
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

Example: caption
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
200

Successful Response

application/json
or
or
post/infer/lmm
POST /infer/lmm HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 501

{
  "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
}
{
  "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

post

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
Body
idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: raccoon-detector-1
model_typestring · nullableOptional

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

Example: object-detection
imageany ofRequired
or
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

Example: caption
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
200

Successful Response

application/json
or
or
post/infer/lmm/{model_id}
POST /infer/lmm/{model_id} HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 501

{
  "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
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "image": [
    {
      "width": 1,
      "height": 1
    }
  ],
  "response": "text"
}

Embeddings and comparison

CLIP Compare

post

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
Body

Request for CLIP comparison.

Attributes: subject (Union[InferenceRequestImage, str]): The type of image data provided, one of 'url' or 'base64'. subject_type (str): The type of subject, one of 'image' or 'text'. prompt (Union[List[InferenceRequestImage], InferenceRequestImage, str, List[str], Dict[str, Union[InferenceRequestImage, str]]]): The prompt for comparison. prompt_type (str): The type of prompt, one of 'image' or 'text'.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-16Example: ViT-B-16
model_idstring · nullableOptional
subjectany ofRequired

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

Example: url
or
stringOptional
subject_typestringOptional

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

Default: imageExample: image
promptany ofRequired
or
or
stringOptional
or
string[]Optional
or
prompt_typestringOptional

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

Default: textExample: text
Responses
200

Successful Response

application/json

Response for CLIP comparison.

Attributes: similarity (Union[List[float], Dict[str, float]]): Similarity scores. time (float): The time in seconds it took to produce the similarity scores including preprocessing.

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
number[]Optional
or
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

post/clip/compare
POST /clip/compare HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 344

{
  "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"
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "similarity": [
    1
  ],
  "parent_id": "text"
}

CLIP Image Embeddings

post

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
Body

Request for CLIP image embedding.

Attributes: image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be embedded.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-16Example: ViT-B-16
model_idstring · nullableOptional
imageany ofRequired
or
Responses
200

Successful Response

application/json

Response for CLIP embedding.

Attributes: embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats. time (float): The time in seconds it took to produce the embeddings including preprocessing.

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

post/clip/embed_image
POST /clip/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 283

{
  "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"
    }
  ]
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

CLIP Text Embeddings

post

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
Body

Request for CLIP text embedding.

Attributes: text (Union[List[str], str]): A string or list of strings.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-16Example: ViT-B-16
model_idstring · nullableOptional
textany ofRequired

A string or list of strings

Example: The quick brown fox jumps over the lazy dog
string[]Optional
or
stringOptional
Responses
200

Successful Response

application/json

Response for CLIP embedding.

Attributes: embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats. time (float): The time in seconds it took to produce the embeddings including preprocessing.

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

post/clip/embed_text
POST /clip/embed_text HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 268

{
  "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"
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Perception Encoder Compare

post

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
Body

Request for PERCEPTION_ENCODER comparison.

Attributes: subject (Union[InferenceRequestImage, str]): The type of image data provided, one of 'url' or 'base64'. subject_type (str): The type of subject, one of 'image' or 'text'. prompt (Union[List[InferenceRequestImage], InferenceRequestImage, str, List[str], Dict[str, Union[InferenceRequestImage, str]]]): The prompt for comparison. prompt_type (str): The type of prompt, one of 'image' or 'text'.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-336Example: PE-Core-L14-336
model_idstring · nullableOptional
subjectany ofRequired

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

Example: url
or
stringOptional
subject_typestringOptional

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

Default: imageExample: image
promptany ofRequired
or
or
stringOptional
or
string[]Optional
or
prompt_typestringOptional

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

Default: textExample: text
Responses
200

Successful Response

application/json

Response for PERCEPTION_ENCODER comparison.

Attributes: similarity (Union[List[float], Dict[str, float]]): Similarity scores. time (float): The time in seconds it took to produce the similarity scores including preprocessing.

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
number[]Optional
or
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

post/perception_encoder/compare
POST /perception_encoder/compare HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 365

{
  "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"
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "similarity": [
    1
  ],
  "parent_id": "text"
}

PE Image Embeddings

post

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
Body

Request for PERCEPTION_ENCODER image embedding.

Attributes: image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be embedded.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-336Example: PE-Core-L14-336
model_idstring · nullableOptional
imageany ofRequired
or
Responses
200

Successful Response

application/json

Response for PERCEPTION_ENCODER embedding.

Attributes: embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats. time (float): The time in seconds it took to produce the embeddings including preprocessing.

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

post/perception_encoder/embed_image
POST /perception_encoder/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 304

{
  "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"
    }
  ]
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Perception Encoder Text Embeddings

post

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
Body

Request for PERCEPTION_ENCODER text embedding.

Attributes: text (Union[List[str], str]): A string or list of strings.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-336Example: 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
string[]Optional
or
stringOptional
Responses
200

Successful Response

application/json

Response for PERCEPTION_ENCODER embedding.

Attributes: embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats. time (float): The time in seconds it took to produce the embeddings including preprocessing.

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

post/perception_encoder/embed_text
POST /perception_encoder/embed_text HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 289

{
  "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"
}
{
  "inference_id": "text",
  "frame_id": 1,
  "time": 1,
  "embeddings": "[[0.12, 0.23, 0.34, ..., 0.43]]"
}

Segmentation and detection

Grounding DINO inference.

post

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
Body

Request for Grounding DINO zero-shot predictions.

Attributes: text (List[str]): A list of strings.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: object-detection
imageany ofRequired
or
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 · nullableOptionalDefault: 0.5
grounding_dino_version_idstring · nullableOptionalDefault: default
text_thresholdnumber · nullableOptionalDefault: 0.5
class_agnostic_nmsboolean · nullableOptionalDefault: false
Responses
200

Successful Response

application/json

Object Detection inference response.

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

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
or
post/grounding_dino/infer
POST /grounding_dino/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 561

{
  "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
}
{
  "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

post

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
Body

Request for OwlV2 inference.

Attributes: api_key (Optional[str]): Roboflow API Key. owlv2_version_id (Optional[str]): The version ID of OwlV2 to be used for this request. image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) for inference. training_data (List[TrainingImage]): Training data to ground the model on confidence (float): Confidence threshold to filter predictions by

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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-ensembleExample: owlv2-base-patch16-ensemble
model_idstring · nullableOptional

Model id to be used in the request.

imageany ofRequired

Images to run the model on

or
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.99Example: 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: 1Example: 1
Responses
200

Successful Response

application/json

Object Detection inference response.

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

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
or
post/owlv2/infer
POST /owlv2/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 563

{
  "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
}
{
  "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.

post

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
Body

Request for Grounding DINO zero-shot predictions.

Attributes: text (List[str]): A list of strings.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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

Example: object-detection
imageany ofRequired
or
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 · nullableOptionalDefault: l
confidencenumber · nullableOptionalDefault: 0.4
Responses
200

Successful Response

application/json

Object Detection inference response.

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

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
or
post/yolo_world/infer
POST /yolo_world/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 500

{
  "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
}
{
  "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

post

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
Body

SAM embedding request.

Attributes: image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded. image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding. format (Optional[str]): The format of the response. Must be one of json or binary.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_hExample: vit_h
model_idstring · nullableOptional
image_idstring · nullableOptional

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

Example: image_id
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: jsonExample: json
Responses
200

Successful Response

application/json

SAM embedding response.

Attributes: embeddings (Union[List[List[List[List[float]]]], Any]): The SAM embedding. time (float): The time in seconds it took to produce the embeddings including preprocessing.

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, ...] ...] ...]]
or
anyOptional
timenumberRequired

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

post/sam/embed_image
POST /sam/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 315

{
  "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"
}
{
  "embeddings": "[[[[0.1, 0.2, 0.3, ...] ...] ...]]",
  "time": 1
}

SAM Image Segmentation

post

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
Body

SAM segmentation request.

Attributes: embeddings (Optional[Union[List[List[List[List[float]]]], Any]]): The embeddings to be decoded. embeddings_format (Optional[str]): The format of the embeddings. format (Optional[str]): The format of the response. image (Optional[InferenceRequestImage]): The image to be segmented. image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings. has_mask_input (Optional[bool]): Whether or not the request includes a mask input. mask_input (Optional[Union[List[List[List[float]]], Any]]): The set of output masks. mask_input_format (Optional[str]): The format of the mask input. orig_im_size (Optional[List[int]]): The original size of the image used to generate the embeddings. point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding. point_labels (Optional[List[float]]): The labels of the interactive points used during decoding. use_mask_input_cache (Optional[bool]): Whether or not to use the mask input cache.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_hExample: vit_h
model_idstring · nullableOptional
embeddingsany of · nullableOptional

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, ...] ...] ...]]
or
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: jsonExample: 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: jsonExample: json
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.

Example: image_id
has_mask_inputboolean · nullableOptional

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

Default: falseExample: true
mask_inputany of · nullableOptional

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.

or
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: jsonExample: 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.

Example: [640,320]
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]Example: [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: trueExample: true
Responses
200

Successful Response

application/json

SAM segmentation response.

Attributes: masks (Union[List[List[List[int]]], Any]): The set of output masks. low_res_masks (Union[List[List[List[int]]], Any]): The set of output low-resolution masks. time (float): The time in seconds it took to produce the segmentation including preprocessing.

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.

or
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

or
anyOptional
timenumberRequired

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

post/sam/segment_image
POST /sam/segment_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 559

{
  "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
}
{
  "masks": [
    [
      [
        1
      ]
    ]
  ],
  "low_res_masks": [
    [
      [
        1
      ]
    ]
  ],
  "time": 1
}

SAM2 Image Embeddings

post

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
Body

SAM embedding request.

Attributes: image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded. image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding. format (Optional[str]): The format of the response. Must be one of json or binary.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_largeExample: hiera_large
model_idstring · nullableOptional
image_idstring · nullableOptional

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

Example: image_id
Responses
200

Successful Response

application/json

SAM embedding response.

Attributes: embeddings (Union[List[List[List[List[float]]]], Any]): The SAM embedding. time (float): The time in seconds it took to produce the embeddings including preprocessing.

image_idstringRequired

Image id embeddings are cached to

timenumberRequired

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

post/sam2/embed_image
POST /sam2/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 306

{
  "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"
}
{
  "image_id": "text",
  "time": 1
}

SAM2 Image Segmentation

post

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
Body

SAM segmentation request.

Attributes: format (Optional[str]): The format of the response. image (InferenceRequestImage): The image to be segmented. image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings. point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding. point_labels (Optional[List[float]]): The labels of the interactive points used during decoding.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_largeExample: 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: jsonExample: json
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.

Example: image_id
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: trueExample: 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
200

Successful Response

application/json
timenumberRequired

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

post/sam2/segment_image
POST /sam2/segment_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 479

{
  "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": [
        {
          "points": [
            {
              "positive": true,
              "x": 100,
              "y": 100
            }
          ]
        }
      ]
    }
  ],
  "multimask_output": true,
  "save_logits_to_cache": false,
  "load_logits_from_cache": false
}
{
  "predictions": [
    {
      "masks": [
        [
          [
            1
          ]
        ]
      ],
      "confidence": 1,
      "format": "polygon"
    }
  ],
  "time": 1
}

Seg preview Image Embeddings

post

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
Body

SAM embedding request.

Attributes: image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded. image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding. format (Optional[str]): The format of the response. Must be one of json or binary.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_largeExample: hiera_large
model_idstring · nullableOptional
image_idstring · nullableOptional

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

Example: image_id
Responses
200

Successful Response

application/json
image_idstringRequired

Image id embeddings are cached to

timenumberRequired

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

post/sam3/embed_image
POST /sam3/embed_image HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 306

{
  "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"
}
{
  "image_id": "text",
  "time": 1
}

SAM3 PCS (promptable concept segmentation)

post

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

Body
idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
image_idstring · nullableOptional

Optional ID for caching embeddings.

output_prob_threshnumber · nullableOptional

Score threshold for outputs.

Default: 0.5
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
200

Successful Response

application/json
timenumberRequired

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

post/sam3/concept_segment
POST /sam3/concept_segment HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 474

{
  "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": [
        {
          "x": 1,
          "y": 1,
          "width": 1,
          "height": 1
        }
      ],
      "box_labels": [
        1
      ]
    }
  ],
  "nms_iou_threshold": 1
}
{
  "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)

post

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

Body

SAM segmentation request.

Attributes: format (Optional[str]): The format of the response. image (InferenceRequestImage): The image to be segmented. image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings. point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding. point_labels (Optional[List[float]]): The labels of the interactive points used during decoding.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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_largeExample: 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: jsonExample: json
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.

Example: image_id
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: trueExample: 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
200

Successful Response

application/json
timenumberRequired

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

post/sam3/visual_segment
POST /sam3/visual_segment HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 479

{
  "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": [
        {
          "points": [
            {
              "positive": true,
              "x": 100,
              "y": 100
            }
          ]
        }
      ]
    }
  ],
  "multimask_output": true,
  "save_logits_to_cache": false,
  "load_logits_from_cache": false
}
{
  "predictions": [
    {
      "masks": [
        [
          [
            1
          ]
        ]
      ],
      "confidence": 1,
      "format": "polygon"
    }
  ],
  "time": 1
}

SAM3 3D Object Generation

post

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
Body

SAM3D inference request for 3D object generation.

Attributes: api_key (Optional[str]): Roboflow API Key. image (InferenceRequestImage): The input image to be used for 3D generation. mask_input: Mask(s) in any supported format - polygon, binary mask, or RLE.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
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
200

Successful Response

application/json
anyOptional
post/sam3_3d/infer
POST /sam3_3d/infer HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 404

{
  "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": null,
  "model_id": "sam3-3d-objects",
  "output_meshes": true,
  "output_scene": true,
  "with_mesh_postprocess": true,
  "with_texture_baking": true,
  "use_distillations": false
}

No content

OCR

DocTR OCR response

post

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
Body

DocTR inference request.

Attributes: api_key (Optional[str]): Roboflow API Key.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
or
doctr_version_idstring · nullableOptionalDefault: default
model_idstring · nullableOptional
generate_bounding_boxesboolean · nullableOptionalDefault: false
Responses
200

Successful Response

application/json
or
post/doctr/ocr
POST /doctr/ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 315

{
  "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
}
{
  "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

post

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
Body

EasyOCR inference request.

Attributes: api_key (Optional[str]): Roboflow API Key.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
or
easy_ocr_version_idstring · nullableOptionalDefault: english_g2
model_idstring · nullableOptional
language_codesstring[] · nullableOptionalDefault: ["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
200

Successful Response

application/json
or
post/easy_ocr/ocr
POST /easy_ocr/ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 332

{
  "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": [
    "text"
  ],
  "quantize": false
}
{
  "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

post

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
Body

PP-OCR inference request.

Attributes: api_key (Optional[str]): Roboflow API Key.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
or
text_detectionstring · nullableOptionalDefault: __unset__
text_recognitionstring · nullableOptionalDefault: __unset__
pp_ocr_version_idstring · nullableOptional
model_idstring · nullableOptional
Responses
200

Successful Response

application/json

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

resultstringRequired

The combined OCR recognition result.

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

post/ocr/pp-ocr
POST /ocr/pp-ocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 341

{
  "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"
}
{
  "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

post

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
Body

TrOCR inference request.

Attributes: api_key (Optional[str]): Roboflow API Key.

idstringRequired
api_keystring · nullableOptional

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

usage_billablebooleanOptionalDefault: 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
or
trocr_version_idstring · nullableOptionalDefault: trocr-base-printed
model_idstring · nullableOptional
Responses
200

Successful Response

application/json

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

resultstringRequired

The combined OCR recognition result.

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

post/ocr/trocr
POST /ocr/trocr HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 294

{
  "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"
}
{
  "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

Deprecated

Gaze Detection (deprecated)

post

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

Responses
200

Successful Response

application/json
anyOptional
post/gaze/gaze_detection
POST /gaze/gaze_detection HTTP/1.1
Host: localhost:9001
Accept: */*
200

Successful Response

No content

WebRTC

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

post

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

Body
api_keystring · nullableOptional
is_previewbooleanOptionalDefault: false
webrtc_realtime_processingbooleanOptionalDefault: true
stream_outputstring[] · nullableOptional
data_outputstring[] · nullableOptional
declared_fpsnumber · nullableOptional
rtsp_urlstring · nullableOptional
mjpeg_urlstring · nullableOptional
processing_timeoutinteger · nullableOptionalDefault: 3600
processing_session_startedstring · date-time · nullableOptional
requested_planstring · nullableOptionalDefault: webrtc-gpu-small
requested_gpustring · nullableOptional
requested_regionstring · nullableOptional
workspace_idstring · nullableOptional
session_idstring · nullableOptional
Responses
200

Successful Response

application/json
statusstringRequired

Operation status

sdpstringRequired
typestringRequired
post/initialise_webrtc_worker
POST /initialise_webrtc_worker HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 997

{
  "api_key": "text",
  "workflow_configuration": {
    "type": "text",
    "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": "2026-01-01T00:00:00.000Z",
  "requested_plan": "webrtc-gpu-small",
  "requested_gpu": "text",
  "requested_region": "text",
  "workspace_id": "text",
  "session_id": "text"
}
{
  "status": "text",
  "context": {
    "request_id": "text",
    "pipeline_id": "text"
  },
  "sdp": "text",
  "type": "text"
}

WebRTC session heartbeat

post

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.

Body

Request body for WebRTC session heartbeat and end endpoints.

session_idstringRequired
api_keystringRequired
Responses
200

Successful Response

application/json
Other propertiesanyOptional
post/webrtc/session/heartbeat
POST /webrtc/session/heartbeat HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "session_id": "text",
  "api_key": "text"
}
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

End WebRTC session

post

End a WebRTC session and immediately free the quota slot.

Requires api_key for authentication.

Body

Request body for WebRTC session heartbeat and end endpoints.

session_idstringRequired
api_keystringRequired
Responses
200

Successful Response

application/json
Other propertiesanyOptional
post/webrtc/session/heartbeat/end
POST /webrtc/session/heartbeat/end HTTP/1.1
Host: localhost:9001
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "session_id": "text",
  "api_key": "text"
}
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Last updated

Was this helpful?