> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/reference/ko/platform/rest-api/inference-server-openapi.md).

# Inference Server OpenAPI

실행 중인 [Inference Server](https://docs.roboflow.com/deployment/self-hosted/inference-server) 현재 실행 중인 서버 버전에 맞는 OpenAPI 사양을 게시합니다.

서버를 시작한 다음 브라우저에서 해당 API 레퍼런스를 여세요:

```bash
pip install inference-cli
inference server start
```

<table data-search="false"><thead><tr><th>엔드포인트</th><th>제공하는 내용</th></tr></thead><tbody><tr><td><code>http://localhost:9001/docs</code></td><td>대화형 요청 빌더가 포함된 Swagger UI.</td></tr><tr><td><code>http://localhost:9001/redoc</code></td><td>동일한 사양에 대한 ReDoc 레퍼런스.</td></tr></tbody></table>

아래 API 레퍼런스는 다음을 사용합니다 `http://localhost:9001`로컬 Inference Server의 기본 주소입니다. 이 기본 URL을 호출하려는 서버의 주소로 바꾸세요:

* 사용 `https://serverless.roboflow.com` 에 대해 [서버리스 호스팅 API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api).
* 할당된 URL을 사용하세요 [전용 배포](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments).
* 다른 자체 호스팅 Inference Server에는 IP 주소 또는 호스트 이름과 포트를 사용하세요.

{% hint style="info" %}
이는 모델과 워크플로우를 실행하기 위한 API입니다. 작업공간, 프로젝트, 버전, 학습을 위한 Roboflow 플랫폼 API는 다음을 참조하세요 [REST API 사용](/reference/ko/platform/rest-api.md).
{% endhint %}

## 서버

## Healthz

> Health endpoint for Kubernetes liveness probe.\
> \
> Verifies CUDA context health when running on GPU. Returns 503 if\
> CUDA is corrupted (unrecoverable - requires process restart).

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/healthz":{"get":{"summary":"Healthz","description":"Health endpoint for Kubernetes liveness probe.\n\nVerifies CUDA context health when running on GPU. Returns 503 if\nCUDA is corrupted (unrecoverable - requires process restart).","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## Readiness

> Readiness endpoint for Kubernetes readiness probe.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/readiness":{"get":{"summary":"Readiness","description":"Readiness endpoint for Kubernetes readiness probe.","operationId":"readiness_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## Info

> Get the server name and version number

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/info":{"get":{"summary":"Info","description":"Get the server name and version number","operationId":"root_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerVersionInfo"}}}}}}}},"components":{"schemas":{"ServerVersionInfo":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"uuid":{"type":"string","title":"Uuid"}},"type":"object","required":["name","version","uuid"],"title":"ServerVersionInfo","description":"Server version information.\n\nAttributes:\n    name (str): Server name.\n    version (str): Server version.\n    uuid (str): Server UUID."}}}}
```

## Metrics

> Endpoint that serves Prometheus metrics.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/metrics":{"get":{"summary":"Metrics","description":"Endpoint that serves Prometheus metrics.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## Get Recent Logs

> Get recent application logs for debugging

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/logs":{"get":{"summary":"Get Recent Logs","description":"Get recent application logs for debugging","operationId":"get_logs_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of log entries to return","default":100,"title":"Limit"},"description":"Maximum number of log entries to return"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)","title":"Level"},"description":"Filter by log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return logs since this ISO timestamp","title":"Since"},"description":"Return logs since this ISO timestamp"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## GET /dashboard.html

> Dashboard Guard

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/dashboard.html":{"get":{"summary":"Dashboard Guard","operationId":"dashboard_guard_dashboard_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## HEAD /dashboard.html

> Dashboard Guard

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/dashboard.html":{"head":{"summary":"Dashboard Guard","operationId":"dashboard_guard_dashboard_html_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## Get model keys

> Get the ID of each loaded model

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/model/registry":{"get":{"summary":"Get model keys","description":"Get the ID of each loaded model","operationId":"registry_model_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsDescriptions"}}}}}}}},"components":{"schemas":{"ModelsDescriptions":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelDescriptionEntity"},"type":"array","title":"Models","description":"List of models that are loaded by model manager."},"total_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Vram Bytes","description":"Total estimated VRAM consumed by all loaded models in bytes."},"gpu_memory_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Memory Used","description":"Current GPU memory in use in bytes (device-level, includes all runtimes)."},"gpu_memory_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Memory Total","description":"Total GPU memory available in bytes."},"torch_cuda_allocated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Torch Cuda Allocated","description":"Live tensor memory allocated by PyTorch's CUDA allocator in bytes."},"torch_cuda_reserved":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Torch Cuda Reserved","description":"Total memory reserved by PyTorch's CUDA allocator in bytes."},"torch_cuda_allocator_cache":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Torch Cuda Allocator Cache","description":"Reserved but currently unallocated PyTorch CUDA memory in bytes."},"non_torch_gpu_memory":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Non Torch Gpu Memory","description":"Device memory not reserved by PyTorch in bytes. This includes native runtimes, CUDA context overhead, and allocations from other processes."}},"type":"object","required":["models"],"title":"ModelsDescriptions"},"ModelDescriptionEntity":{"properties":{"model_id":{"type":"string","title":"Model Id","description":"Identifier of the model"},"task_type":{"type":"string","title":"Task Type","description":"Type of the task that the model performs"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size","description":"Batch size accepted by the model (if registered)."},"input_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Height","description":"Image input height accepted by the model (if registered)."},"input_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Width","description":"Image input width accepted by the model (if registered)."},"vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vram Bytes","description":"Estimated GPU VRAM consumed by this model in bytes (measured during load)."},"request_aliases":{"items":{"type":"string"},"type":"array","title":"Request Aliases","description":"Other model IDs that resolved to this model."},"request_paths":{"items":{"type":"string"},"type":"array","title":"Request Paths","description":"HTTP request paths that triggered inference on this model (e.g. /door-glyph-locator/10, /infer/object_detection)."}},"type":"object","required":["model_id","task_type"],"title":"ModelDescriptionEntity"}}}}
```

## 핵심 추론

## Legacy Infer From Request

> Legacy inference endpoint for object detection, instance segmentation, and classification.\
> \
> Args:\
> &#x20;   background\_tasks: (BackgroundTasks) pool of fastapi background tasks\
> &#x20;   dataset\_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID\
> &#x20;   version\_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID\
> &#x20;   api\_key (Optional\[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval.\
> &#x20;   \# Other parameters described in the function signature...\
> \
> Returns:\
> &#x20;   Union\[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/{dataset_id}/{version_id}":{"get":{"summary":"Legacy Infer From Request","description":"Legacy inference endpoint for object detection, instance segmentation, and classification.\n\nArgs:\n    background_tasks: (BackgroundTasks) pool of fastapi background tasks\n    dataset_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID\n    version_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID\n    api_key (Optional[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval.\n    # Other parameters described in the function signature...\n\nReturns:\n    Union[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.","operationId":"legacy_infer_from_request__dataset_id___version_id__get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","description":"ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID","title":"Dataset Id"},"description":"ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","description":"ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID","title":"Version Id"},"description":"ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID"},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"enum":["best","default"],"type":"string"}],"description":"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,"title":"Confidence"},"description":"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."},{"name":"keypoint_confidence","in":"query","required":false,"schema":{"type":"number","description":"The confidence threshold used to filter out keypoints that are not visible based on model confidence","default":0,"title":"Keypoint Confidence"},"description":"The confidence threshold used to filter out keypoints that are not visible based on model confidence"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"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","title":"Format"},"description":"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."},{"name":"image","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The publically accessible URL of an image to use for inference.","title":"Image"},"description":"The publically accessible URL of an image to use for inference."},{"name":"image_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference.","default":"base64","title":"Image Type"},"description":"One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference."},{"name":"labels","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, labels will be include in any inference visualization.","default":false,"title":"Labels"},"description":"If true, labels will be include in any inference visualization."},{"name":"mask_decode_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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","title":"Mask Decode Mode"},"description":"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."},{"name":"tradeoff_factor","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The amount to tradeoff between 0='fast' and 1='accurate'","default":0,"title":"Tradeoff Factor"},"description":"The amount to tradeoff between 0='fast' and 1='accurate'"},{"name":"max_detections","in":"query","required":false,"schema":{"type":"integer","description":"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,"title":"Max Detections"},"description":"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."},{"name":"overlap","in":"query","required":false,"schema":{"type":"number","description":"The IoU threhsold that must be met for a box pair to be considered duplicate during NMS","default":0.3,"title":"Overlap"},"description":"The IoU threhsold that must be met for a box pair to be considered duplicate during NMS"},{"name":"stroke","in":"query","required":false,"schema":{"type":"integer","description":"The stroke width used when visualizing predictions","default":1,"title":"Stroke"},"description":"The stroke width used when visualizing predictions"},{"name":"disable_preproc_auto_orient","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic image orientation","default":false,"title":"Disable Preproc Auto Orient"},"description":"If true, disables automatic image orientation"},{"name":"disable_preproc_contrast","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic contrast adjustment","default":false,"title":"Disable Preproc Contrast"},"description":"If true, disables automatic contrast adjustment"},{"name":"disable_preproc_grayscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic grayscale conversion","default":false,"title":"Disable Preproc Grayscale"},"description":"If true, disables automatic grayscale conversion"},{"name":"disable_preproc_static_crop","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic static crop","default":false,"title":"Disable Preproc Static Crop"},"description":"If true, disables automatic static crop"},{"name":"disable_active_learning","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)","default":false,"title":"Disable Active Learning"},"description":"If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)"},{"name":"active_learning_target_dataset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id","title":"Active Learning Target Dataset"},"description":"Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the inference request","default":"external","title":"Source"},"description":"The source of the inference request"},{"name":"source_info","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The detailed source information of the inference request","default":"external","title":"Source Info"},"description":"The detailed source information of the inference request"},{"name":"response_mask_format","in":"query","required":false,"schema":{"anyOf":[{"enum":["polygon","rle"],"type":"string"},{"type":"null"}],"description":"The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models.","default":"polygon","title":"Response Mask Format"},"description":"The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InstanceSegmentationInferenceResponse"},{"$ref":"#/components/schemas/KeypointsDetectionInferenceResponse"},{"$ref":"#/components/schemas/ObjectDetectionInferenceResponse"},{"$ref":"#/components/schemas/ClassificationInferenceResponse"},{"$ref":"#/components/schemas/MultiLabelClassificationInferenceResponse"},{"$ref":"#/components/schemas/SemanticSegmentationInferenceResponse"},{"$ref":"#/components/schemas/StubResponse"},{}],"title":"Response Legacy Infer From Request  Dataset Id   Version Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"InstanceSegmentationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"anyOf":[{"$ref":"#/components/schemas/InstanceSegmentationPrediction"},{"$ref":"#/components/schemas/InstanceSegmentationRLEPrediction"}]},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"InstanceSegmentationInferenceResponse","description":"Instance Segmentation inference response.\n\nAttributes:\n    predictions (List[Union[\n        inference.core.entities.responses.inference.InstanceSegmentationPrediction,\n        inference.core.entities.responses.inference.InstanceSegmentationRLEPrediction\n    ]]): List of instance segmentation predictions."},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"InstanceSegmentationPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"points":{"items":{"$ref":"#/components/schemas/Point-Output"},"type":"array","title":"Points","description":"The list of points that make up the instance polygon"},"mask_format":{"type":"string","const":"polygon","title":"Mask Format","description":"Type of mask format","default":"polygon"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","points"],"title":"InstanceSegmentationPrediction"},"Point-Output":{"properties":{"x":{"type":"number","title":"X","description":"The x-axis pixel coordinate of the point"},"y":{"type":"number","title":"Y","description":"The y-axis pixel coordinate of the point"}},"type":"object","required":["x","y"],"title":"Point","description":"Point coordinates.\n\nAttributes:\n    x (float): The x-axis pixel coordinate of the point.\n    y (float): The y-axis pixel coordinate of the point."},"InstanceSegmentationRLEPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region"},"rle":{"additionalProperties":true,"type":"object","title":"Rle","description":"RLE-encoded mask in COCO format: {'size': [H, W], 'counts': '...'}"},"mask_format":{"type":"string","const":"rle","title":"Mask Format","description":"Type of mask format","default":"rle"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","rle"],"title":"InstanceSegmentationRLEPrediction"},"KeypointsDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/KeypointsPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"KeypointsDetectionInferenceResponse"},"KeypointsPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"},"keypoints":{"items":{"$ref":"#/components/schemas/Keypoint"},"type":"array","title":"Keypoints"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","keypoints"],"title":"KeypointsPrediction"},"Keypoint":{"properties":{"x":{"type":"number","title":"X","description":"The x-axis pixel coordinate of the point"},"y":{"type":"number","title":"Y","description":"The y-axis pixel coordinate of the point"},"confidence":{"type":"number","title":"Confidence","description":"Model confidence regarding keypoint visibility."},"class_id":{"type":"integer","title":"Class Id","description":"Identifier of keypoint."},"class":{"type":"string","title":"Class","description":"Type of keypoint."}},"type":"object","required":["x","y","confidence","class_id","class"],"title":"Keypoint"},"ObjectDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"ObjectDetectionInferenceResponse","description":"Object Detection inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"ClassificationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ClassificationPrediction"},"type":"array","title":"Predictions"},"top":{"type":"string","title":"Top","description":"The top predicted class label","default":""},"confidence":{"type":"number","title":"Confidence","description":"The confidence of the top predicted class label","default":0},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["image","predictions"],"title":"ClassificationInferenceResponse","description":"Classification inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ClassificationPrediction]): List of classification predictions.\n    top (str): The top predicted class label.\n    confidence (float): The confidence of the top predicted class label."},"ClassificationPrediction":{"properties":{"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"Numeric ID associated with the class label"},"confidence":{"type":"number","title":"Confidence","description":"The class label confidence as a fraction between 0 and 1"}},"type":"object","required":["class","class_id","confidence"],"title":"ClassificationPrediction","description":"Classification prediction.\n\nAttributes:\n    class_name (str): The predicted class label.\n    class_id (int): Numeric ID associated with the class label.\n    confidence (float): The class label confidence as a fraction between 0 and 1."},"MultiLabelClassificationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"additionalProperties":{"$ref":"#/components/schemas/MultiLabelClassificationPrediction"},"type":"object","title":"Predictions"},"predicted_classes":{"items":{"type":"string"},"type":"array","title":"Predicted Classes","description":"The list of predicted classes"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["image","predictions","predicted_classes"],"title":"MultiLabelClassificationInferenceResponse","description":"Multi-label Classification inference response.\n\nAttributes:\n    predictions (Dict[str, inference.core.entities.responses.inference.MultiLabelClassificationPrediction]): Dictionary of multi-label classification predictions.\n    predicted_classes (List[str]): The list of predicted classes."},"MultiLabelClassificationPrediction":{"properties":{"confidence":{"type":"number","title":"Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"Numeric ID associated with the class label"}},"type":"object","required":["confidence","class_id"],"title":"MultiLabelClassificationPrediction","description":"Multi-label Classification prediction.\n\nAttributes:\n    confidence (float): The class label confidence as a fraction between 0 and 1."},"SemanticSegmentationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"$ref":"#/components/schemas/SemanticSegmentationPrediction"}},"type":"object","required":["image","predictions"],"title":"SemanticSegmentationInferenceResponse","description":"Semantic Segmentation inference response.\n\nAttributes:\n    predictions (inference.core.entities.responses.inference.SemanticSegmentationPrediction): Semantic segmentation predictions."},"SemanticSegmentationPrediction":{"properties":{"segmentation_mask":{"type":"string","title":"Segmentation Mask","description":"base64-encoded PNG of predicted class label at each pixel"},"class_map":{"additionalProperties":{"type":"string"},"type":"object","title":"Class Map","description":"Map of pixel intensity value to class label"},"confidence_mask":{"type":"string","title":"Confidence Mask","description":"base64-encoded PNG of predicted class confidence at each pixel"}},"type":"object","required":["segmentation_mask","class_map","confidence_mask"],"title":"SemanticSegmentationPrediction"},"StubResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"is_stub":{"type":"boolean","title":"Is Stub","description":"Field to mark prediction type as stub"},"model_id":{"type":"string","title":"Model Id","description":"Identifier of a model stub that was called"},"task_type":{"type":"string","title":"Task Type","description":"Task type of the project"}},"type":"object","required":["is_stub","model_id","task_type"],"title":"StubResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Legacy Infer From Request

> Legacy inference endpoint for object detection, instance segmentation, and classification.\
> \
> Args:\
> &#x20;   background\_tasks: (BackgroundTasks) pool of fastapi background tasks\
> &#x20;   dataset\_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID\
> &#x20;   version\_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID\
> &#x20;   api\_key (Optional\[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval.\
> &#x20;   \# Other parameters described in the function signature...\
> \
> Returns:\
> &#x20;   Union\[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/{dataset_id}/{version_id}":{"post":{"summary":"Legacy Infer From Request","description":"Legacy inference endpoint for object detection, instance segmentation, and classification.\n\nArgs:\n    background_tasks: (BackgroundTasks) pool of fastapi background tasks\n    dataset_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID\n    version_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID\n    api_key (Optional[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval.\n    # Other parameters described in the function signature...\n\nReturns:\n    Union[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.","operationId":"legacy_infer_from_request__dataset_id___version_id__post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","description":"ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID","title":"Dataset Id"},"description":"ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID"},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","description":"ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID","title":"Version Id"},"description":"ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID"},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"confidence","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"enum":["best","default"],"type":"string"}],"description":"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,"title":"Confidence"},"description":"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."},{"name":"keypoint_confidence","in":"query","required":false,"schema":{"type":"number","description":"The confidence threshold used to filter out keypoints that are not visible based on model confidence","default":0,"title":"Keypoint Confidence"},"description":"The confidence threshold used to filter out keypoints that are not visible based on model confidence"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"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","title":"Format"},"description":"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."},{"name":"image","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The publically accessible URL of an image to use for inference.","title":"Image"},"description":"The publically accessible URL of an image to use for inference."},{"name":"image_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference.","default":"base64","title":"Image Type"},"description":"One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference."},{"name":"labels","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, labels will be include in any inference visualization.","default":false,"title":"Labels"},"description":"If true, labels will be include in any inference visualization."},{"name":"mask_decode_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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","title":"Mask Decode Mode"},"description":"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."},{"name":"tradeoff_factor","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The amount to tradeoff between 0='fast' and 1='accurate'","default":0,"title":"Tradeoff Factor"},"description":"The amount to tradeoff between 0='fast' and 1='accurate'"},{"name":"max_detections","in":"query","required":false,"schema":{"type":"integer","description":"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,"title":"Max Detections"},"description":"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."},{"name":"overlap","in":"query","required":false,"schema":{"type":"number","description":"The IoU threhsold that must be met for a box pair to be considered duplicate during NMS","default":0.3,"title":"Overlap"},"description":"The IoU threhsold that must be met for a box pair to be considered duplicate during NMS"},{"name":"stroke","in":"query","required":false,"schema":{"type":"integer","description":"The stroke width used when visualizing predictions","default":1,"title":"Stroke"},"description":"The stroke width used when visualizing predictions"},{"name":"disable_preproc_auto_orient","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic image orientation","default":false,"title":"Disable Preproc Auto Orient"},"description":"If true, disables automatic image orientation"},{"name":"disable_preproc_contrast","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic contrast adjustment","default":false,"title":"Disable Preproc Contrast"},"description":"If true, disables automatic contrast adjustment"},{"name":"disable_preproc_grayscale","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic grayscale conversion","default":false,"title":"Disable Preproc Grayscale"},"description":"If true, disables automatic grayscale conversion"},{"name":"disable_preproc_static_crop","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, disables automatic static crop","default":false,"title":"Disable Preproc Static Crop"},"description":"If true, disables automatic static crop"},{"name":"disable_active_learning","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)","default":false,"title":"Disable Active Learning"},"description":"If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)"},{"name":"active_learning_target_dataset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id","title":"Active Learning Target Dataset"},"description":"Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the inference request","default":"external","title":"Source"},"description":"The source of the inference request"},{"name":"source_info","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The detailed source information of the inference request","default":"external","title":"Source Info"},"description":"The detailed source information of the inference request"},{"name":"response_mask_format","in":"query","required":false,"schema":{"anyOf":[{"enum":["polygon","rle"],"type":"string"},{"type":"null"}],"description":"The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models.","default":"polygon","title":"Response Mask Format"},"description":"The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InstanceSegmentationInferenceResponse"},{"$ref":"#/components/schemas/KeypointsDetectionInferenceResponse"},{"$ref":"#/components/schemas/ObjectDetectionInferenceResponse"},{"$ref":"#/components/schemas/ClassificationInferenceResponse"},{"$ref":"#/components/schemas/MultiLabelClassificationInferenceResponse"},{"$ref":"#/components/schemas/SemanticSegmentationInferenceResponse"},{"$ref":"#/components/schemas/StubResponse"},{}],"title":"Response Legacy Infer From Request  Dataset Id   Version Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"InstanceSegmentationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"anyOf":[{"$ref":"#/components/schemas/InstanceSegmentationPrediction"},{"$ref":"#/components/schemas/InstanceSegmentationRLEPrediction"}]},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"InstanceSegmentationInferenceResponse","description":"Instance Segmentation inference response.\n\nAttributes:\n    predictions (List[Union[\n        inference.core.entities.responses.inference.InstanceSegmentationPrediction,\n        inference.core.entities.responses.inference.InstanceSegmentationRLEPrediction\n    ]]): List of instance segmentation predictions."},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"InstanceSegmentationPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"points":{"items":{"$ref":"#/components/schemas/Point-Output"},"type":"array","title":"Points","description":"The list of points that make up the instance polygon"},"mask_format":{"type":"string","const":"polygon","title":"Mask Format","description":"Type of mask format","default":"polygon"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","points"],"title":"InstanceSegmentationPrediction"},"Point-Output":{"properties":{"x":{"type":"number","title":"X","description":"The x-axis pixel coordinate of the point"},"y":{"type":"number","title":"Y","description":"The y-axis pixel coordinate of the point"}},"type":"object","required":["x","y"],"title":"Point","description":"Point coordinates.\n\nAttributes:\n    x (float): The x-axis pixel coordinate of the point.\n    y (float): The y-axis pixel coordinate of the point."},"InstanceSegmentationRLEPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region"},"rle":{"additionalProperties":true,"type":"object","title":"Rle","description":"RLE-encoded mask in COCO format: {'size': [H, W], 'counts': '...'}"},"mask_format":{"type":"string","const":"rle","title":"Mask Format","description":"Type of mask format","default":"rle"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","rle"],"title":"InstanceSegmentationRLEPrediction"},"KeypointsDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/KeypointsPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"KeypointsDetectionInferenceResponse"},"KeypointsPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"},"keypoints":{"items":{"$ref":"#/components/schemas/Keypoint"},"type":"array","title":"Keypoints"}},"type":"object","required":["x","y","width","height","confidence","class","class_id","keypoints"],"title":"KeypointsPrediction"},"Keypoint":{"properties":{"x":{"type":"number","title":"X","description":"The x-axis pixel coordinate of the point"},"y":{"type":"number","title":"Y","description":"The y-axis pixel coordinate of the point"},"confidence":{"type":"number","title":"Confidence","description":"Model confidence regarding keypoint visibility."},"class_id":{"type":"integer","title":"Class Id","description":"Identifier of keypoint."},"class":{"type":"string","title":"Class","description":"Type of keypoint."}},"type":"object","required":["x","y","confidence","class_id","class"],"title":"Keypoint"},"ObjectDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"ObjectDetectionInferenceResponse","description":"Object Detection inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"ClassificationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ClassificationPrediction"},"type":"array","title":"Predictions"},"top":{"type":"string","title":"Top","description":"The top predicted class label","default":""},"confidence":{"type":"number","title":"Confidence","description":"The confidence of the top predicted class label","default":0},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["image","predictions"],"title":"ClassificationInferenceResponse","description":"Classification inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ClassificationPrediction]): List of classification predictions.\n    top (str): The top predicted class label.\n    confidence (float): The confidence of the top predicted class label."},"ClassificationPrediction":{"properties":{"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_id":{"type":"integer","title":"Class Id","description":"Numeric ID associated with the class label"},"confidence":{"type":"number","title":"Confidence","description":"The class label confidence as a fraction between 0 and 1"}},"type":"object","required":["class","class_id","confidence"],"title":"ClassificationPrediction","description":"Classification prediction.\n\nAttributes:\n    class_name (str): The predicted class label.\n    class_id (int): Numeric ID associated with the class label.\n    confidence (float): The class label confidence as a fraction between 0 and 1."},"MultiLabelClassificationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"additionalProperties":{"$ref":"#/components/schemas/MultiLabelClassificationPrediction"},"type":"object","title":"Predictions"},"predicted_classes":{"items":{"type":"string"},"type":"array","title":"Predicted Classes","description":"The list of predicted classes"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["image","predictions","predicted_classes"],"title":"MultiLabelClassificationInferenceResponse","description":"Multi-label Classification inference response.\n\nAttributes:\n    predictions (Dict[str, inference.core.entities.responses.inference.MultiLabelClassificationPrediction]): Dictionary of multi-label classification predictions.\n    predicted_classes (List[str]): The list of predicted classes."},"MultiLabelClassificationPrediction":{"properties":{"confidence":{"type":"number","title":"Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"Numeric ID associated with the class label"}},"type":"object","required":["confidence","class_id"],"title":"MultiLabelClassificationPrediction","description":"Multi-label Classification prediction.\n\nAttributes:\n    confidence (float): The class label confidence as a fraction between 0 and 1."},"SemanticSegmentationInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"$ref":"#/components/schemas/SemanticSegmentationPrediction"}},"type":"object","required":["image","predictions"],"title":"SemanticSegmentationInferenceResponse","description":"Semantic Segmentation inference response.\n\nAttributes:\n    predictions (inference.core.entities.responses.inference.SemanticSegmentationPrediction): Semantic segmentation predictions."},"SemanticSegmentationPrediction":{"properties":{"segmentation_mask":{"type":"string","title":"Segmentation Mask","description":"base64-encoded PNG of predicted class label at each pixel"},"class_map":{"additionalProperties":{"type":"string"},"type":"object","title":"Class Map","description":"Map of pixel intensity value to class label"},"confidence_mask":{"type":"string","title":"Confidence Mask","description":"base64-encoded PNG of predicted class confidence at each pixel"}},"type":"object","required":["segmentation_mask","class_map","confidence_mask"],"title":"SemanticSegmentationPrediction"},"StubResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"is_stub":{"type":"boolean","title":"Is Stub","description":"Field to mark prediction type as stub"},"model_id":{"type":"string","title":"Model Id","description":"Identifier of a model stub that was called"},"task_type":{"type":"string","title":"Task Type","description":"Task type of the project"}},"type":"object","required":["is_stub","model_id","task_type"],"title":"StubResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Depth Estimation

> Run the depth estimation model to generate a depth map.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/infer/depth-estimation":{"post":{"summary":"Depth Estimation","description":"Run the depth estimation model to generate a depth map.","operationId":"depth_estimation_infer_depth_estimation_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthEstimationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthEstimationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DepthEstimationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"depth_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depth Version Id","description":"The version ID of the depth estimation model","default":"small"},"depth_map_format":{"type":"string","enum":["json","png16","png8"],"title":"Depth Map Format","description":"Serialization format for `normalized_depth` in the response: `json` (default, wire-compatible with older clients) returns the nested float list; `png16` returns a base64 16-bit grayscale PNG (quantization step 1/65535, typically >10x smaller payload - `inference_sdk` decodes it back to a numpy array when requested via `depth_map_format='png16'`); `png8` returns a base64 8-bit grayscale PNG (256 depth levels, roughly another order of magnitude smaller - fine for visualization/thresholding, lossy for geometric use).","default":"json"}},"type":"object","required":["id","image"],"title":"DepthEstimationRequest","description":"Request for depth estimation.\n\nAttributes:\n    image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be estimated.\n    model_id (str): The model ID to use for depth estimation.\n    depth_version_id (Optional[str]): The version ID of the depth estimation model.\n    depth_map_format (Literal[\"json\", \"png16\", \"png8\"]): Serialization format\n        for the normalized depth map in the response."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"DepthEstimationResponse":{"properties":{"normalized_depth":{"anyOf":[{"type":"string"},{"items":{"items":{"type":"number"},"type":"array"},"type":"array"}],"title":"Normalized Depth","description":"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`"},"depth_map_format":{"type":"string","enum":["json","png16","png8"],"title":"Depth Map Format","description":"The serialization format used for `normalized_depth`","default":"json"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Base64 encoded visualization of the depth map if visualize_predictions is True"}},"type":"object","required":["normalized_depth"],"title":"DepthEstimationResponse","description":"Response for depth estimation inference.\n\nAttributes:\n    normalized_depth (Union[str, List[List[float]]]): The per-image normalized ordinal\n        depth map as a 2D array of floats between 0 and 1. Higher values\n        indicate nearer predictions.\n        serialized according to the request's `depth_map_format`: a 2D array of\n        floats between 0 and 1 (`json`, the default) or a base64 grayscale PNG\n        string (16-bit for `png16`, 8-bit for `png8`).\n    depth_map_format (Literal[\"json\", \"png16\", \"png8\"]): The serialization\n        format used for `normalized_depth`.\n    image (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True.\n    time (float): The processing time in seconds.\n    visualization (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Depth Estimation with model ID in path

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/infer/depth-estimation/{model_id}":{"post":{"summary":"Depth Estimation with model ID in path","description":"Run depth estimation. Model ID is specified in the URL path and can contain slashes.","operationId":"depth_estimation_with_model_id_infer_depth_estimation__model_id__post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthEstimationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthEstimationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DepthEstimationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"depth_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depth Version Id","description":"The version ID of the depth estimation model","default":"small"},"depth_map_format":{"type":"string","enum":["json","png16","png8"],"title":"Depth Map Format","description":"Serialization format for `normalized_depth` in the response: `json` (default, wire-compatible with older clients) returns the nested float list; `png16` returns a base64 16-bit grayscale PNG (quantization step 1/65535, typically >10x smaller payload - `inference_sdk` decodes it back to a numpy array when requested via `depth_map_format='png16'`); `png8` returns a base64 8-bit grayscale PNG (256 depth levels, roughly another order of magnitude smaller - fine for visualization/thresholding, lossy for geometric use).","default":"json"}},"type":"object","required":["id","image"],"title":"DepthEstimationRequest","description":"Request for depth estimation.\n\nAttributes:\n    image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be estimated.\n    model_id (str): The model ID to use for depth estimation.\n    depth_version_id (Optional[str]): The version ID of the depth estimation model.\n    depth_map_format (Literal[\"json\", \"png16\", \"png8\"]): Serialization format\n        for the normalized depth map in the response."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"DepthEstimationResponse":{"properties":{"normalized_depth":{"anyOf":[{"type":"string"},{"items":{"items":{"type":"number"},"type":"array"},"type":"array"}],"title":"Normalized Depth","description":"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`"},"depth_map_format":{"type":"string","enum":["json","png16","png8"],"title":"Depth Map Format","description":"The serialization format used for `normalized_depth`","default":"json"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Base64 encoded visualization of the depth map if visualize_predictions is True"}},"type":"object","required":["normalized_depth"],"title":"DepthEstimationResponse","description":"Response for depth estimation inference.\n\nAttributes:\n    normalized_depth (Union[str, List[List[float]]]): The per-image normalized ordinal\n        depth map as a 2D array of floats between 0 and 1. Higher values\n        indicate nearer predictions.\n        serialized according to the request's `depth_map_format`: a 2D array of\n        floats between 0 and 1 (`json`, the default) or a base64 grayscale PNG\n        string (16-bit for `png16`, 8-bit for `png8`).\n    depth_map_format (Literal[\"json\", \"png16\", \"png8\"]): The serialization\n        format used for `normalized_depth`.\n    image (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True.\n    time (float): The processing time in seconds.\n    visualization (Optional[str]): Base64 encoded visualization of the depth map if visualize_predictions is True."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Large multi-modal model infer

> Run inference with the specified large multi-modal model

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/infer/lmm":{"post":{"summary":"Large multi-modal model infer","description":"Run inference with the specified large multi-modal model","operationId":"infer_lmm_infer_lmm_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LMMInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LMMInferenceResponse"},{"type":"array","items":{"$ref":"#/components/schemas/LMMInferenceResponse"}},{"$ref":"#/components/schemas/StubResponse"}],"title":"Response Infer Lmm Infer Lmm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"LMMInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"A unique model identifier"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"disable_preproc_auto_orient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Auto Orient","description":"If true, the auto orient preprocessing step is disabled for this call.","default":false},"disable_preproc_contrast":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Contrast","description":"If true, the auto contrast preprocessing step is disabled for this call.","default":false},"disable_preproc_grayscale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Grayscale","description":"If true, the grayscale preprocessing step is disabled for this call.","default":false},"disable_preproc_static_crop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Static Crop","description":"If true, the static crop preprocessing step is disabled for this call.","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"If set, use this prompt to guide the LMM"},"enable_thinking":{"type":"boolean","title":"Enable Thinking","description":"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_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max New Tokens","description":"Maximum number of tokens to generate. If not set, the model's default will be used."}},"type":"object","required":["id","model_id","image"],"title":"LMMInferenceRequest"},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"LMMInferenceResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"response":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Response","description":"Text/structured response generated by model"}},"type":"object","required":["image","response"],"title":"LMMInferenceResponse"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"StubResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"is_stub":{"type":"boolean","title":"Is Stub","description":"Field to mark prediction type as stub"},"model_id":{"type":"string","title":"Model Id","description":"Identifier of a model stub that was called"},"task_type":{"type":"string","title":"Task Type","description":"Task type of the project"}},"type":"object","required":["is_stub","model_id","task_type"],"title":"StubResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Large multi-modal model infer with model ID in path

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/infer/lmm/{model_id}":{"post":{"summary":"Large multi-modal model infer with model ID in path","description":"Run inference with the specified large multi-modal model. Model ID is specified in the URL path (can contain slashes).","operationId":"infer_lmm_with_model_id_infer_lmm__model_id__post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LMMInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LMMInferenceResponse"},{"type":"array","items":{"$ref":"#/components/schemas/LMMInferenceResponse"}},{"$ref":"#/components/schemas/StubResponse"}],"title":"Response Infer Lmm With Model Id Infer Lmm  Model Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"LMMInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"A unique model identifier"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"disable_preproc_auto_orient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Auto Orient","description":"If true, the auto orient preprocessing step is disabled for this call.","default":false},"disable_preproc_contrast":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Contrast","description":"If true, the auto contrast preprocessing step is disabled for this call.","default":false},"disable_preproc_grayscale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Grayscale","description":"If true, the grayscale preprocessing step is disabled for this call.","default":false},"disable_preproc_static_crop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Static Crop","description":"If true, the static crop preprocessing step is disabled for this call.","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"If set, use this prompt to guide the LMM"},"enable_thinking":{"type":"boolean","title":"Enable Thinking","description":"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_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max New Tokens","description":"Maximum number of tokens to generate. If not set, the model's default will be used."}},"type":"object","required":["id","model_id","image"],"title":"LMMInferenceRequest"},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"LMMInferenceResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"response":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Response","description":"Text/structured response generated by model"}},"type":"object","required":["image","response"],"title":"LMMInferenceResponse"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"StubResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"is_stub":{"type":"boolean","title":"Is Stub","description":"Field to mark prediction type as stub"},"model_id":{"type":"string","title":"Model Id","description":"Identifier of a model stub that was called"},"task_type":{"type":"string","title":"Task Type","description":"Task type of the project"}},"type":"object","required":["is_stub","model_id","task_type"],"title":"StubResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## 임베딩 및 비교

## CLIP Compare

> Run the Open AI CLIP model to compute similarity scores.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/clip/compare":{"post":{"summary":"CLIP Compare","description":"Run the Open AI CLIP model to compute similarity scores.","operationId":"clip_compare_clip_compare_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipCompareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ClipCompareRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"clip_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clip Version Id","description":"The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"ViT-B-16"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"subject":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"}],"title":"Subject","description":"The type of image data provided, one of 'url' or 'base64'"},"subject_type":{"type":"string","title":"Subject Type","description":"The type of subject, one of 'image' or 'text'","default":"image"},"prompt":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"}]},"type":"object"}],"title":"Prompt"},"prompt_type":{"type":"string","title":"Prompt Type","description":"The type of prompt, one of 'image' or 'text'","default":"text"}},"type":"object","required":["id","subject","prompt"],"title":"ClipCompareRequest","description":"Request for CLIP comparison.\n\nAttributes:\n    subject (Union[InferenceRequestImage, str]): The type of image data provided, one of 'url' or 'base64'.\n    subject_type (str): The type of subject, one of 'image' or 'text'.\n    prompt (Union[List[InferenceRequestImage], InferenceRequestImage, str, List[str], Dict[str, Union[InferenceRequestImage, str]]]): The prompt for comparison.\n    prompt_type (str): The type of prompt, one of 'image' or 'text'."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"ClipCompareResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the similarity scores including preprocessing"},"similarity":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"additionalProperties":{"type":"number"},"type":"object"}],"title":"Similarity"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["similarity"],"title":"ClipCompareResponse","description":"Response for CLIP comparison.\n\nAttributes:\n    similarity (Union[List[float], Dict[str, float]]): Similarity scores.\n    time (float): The time in seconds it took to produce the similarity scores including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## CLIP Image Embeddings

> Run the Open AI CLIP model to embed image data.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/clip/embed_image":{"post":{"summary":"CLIP Image Embeddings","description":"Run the Open AI CLIP model to embed image data.","operationId":"clip_embed_image_clip_embed_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipImageEmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipEmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ClipImageEmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"clip_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clip Version Id","description":"The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"ViT-B-16"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"}},"type":"object","required":["id","image"],"title":"ClipImageEmbeddingRequest","description":"Request for CLIP image embedding.\n\nAttributes:\n    image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be embedded."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"ClipEmbeddingResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings","description":"A list of embeddings, each embedding is a list of floats"}},"type":"object","required":["embeddings"],"title":"ClipEmbeddingResponse","description":"Response for CLIP embedding.\n\nAttributes:\n    embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## CLIP Text Embeddings

> Run the Open AI CLIP model to embed text data.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/clip/embed_text":{"post":{"summary":"CLIP Text Embeddings","description":"Run the Open AI CLIP model to embed text data.","operationId":"clip_embed_text_clip_embed_text_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipTextEmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipEmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ClipTextEmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"clip_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clip Version Id","description":"The version ID of CLIP to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"ViT-B-16"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"text":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Text","description":"A string or list of strings"}},"type":"object","required":["id","text"],"title":"ClipTextEmbeddingRequest","description":"Request for CLIP text embedding.\n\nAttributes:\n    text (Union[List[str], str]): A string or list of strings."},"ClipEmbeddingResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings","description":"A list of embeddings, each embedding is a list of floats"}},"type":"object","required":["embeddings"],"title":"ClipEmbeddingResponse","description":"Response for CLIP embedding.\n\nAttributes:\n    embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Perception Encoder Compare

> Run the Meta Perception Encoder model to compute similarity scores.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/perception_encoder/compare":{"post":{"summary":"Perception Encoder Compare","description":"Run the Meta Perception Encoder model to compute similarity scores.","operationId":"pe_compare_perception_encoder_compare_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderCompareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"PerceptionEncoderCompareRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"perception_encoder_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Perception Encoder Version Id","description":"The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"PE-Core-L14-336"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"subject":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"}],"title":"Subject","description":"The type of image data provided, one of 'url' or 'base64'"},"subject_type":{"type":"string","title":"Subject Type","description":"The type of subject, one of 'image' or 'text'","default":"image"},"prompt":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"string"}]},"type":"object"}],"title":"Prompt"},"prompt_type":{"type":"string","title":"Prompt Type","description":"The type of prompt, one of 'image' or 'text'","default":"text"}},"type":"object","required":["id","subject","prompt"],"title":"PerceptionEncoderCompareRequest","description":"Request for PERCEPTION_ENCODER comparison.\n\nAttributes:\n    subject (Union[InferenceRequestImage, str]): The type of image data provided, one of 'url' or 'base64'.\n    subject_type (str): The type of subject, one of 'image' or 'text'.\n    prompt (Union[List[InferenceRequestImage], InferenceRequestImage, str, List[str], Dict[str, Union[InferenceRequestImage, str]]]): The prompt for comparison.\n    prompt_type (str): The type of prompt, one of 'image' or 'text'."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"PerceptionEncoderCompareResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the similarity scores including preprocessing"},"similarity":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"additionalProperties":{"type":"number"},"type":"object"}],"title":"Similarity"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["similarity"],"title":"PerceptionEncoderCompareResponse","description":"Response for PERCEPTION_ENCODER comparison.\n\nAttributes:\n    similarity (Union[List[float], Dict[str, float]]): Similarity scores.\n    time (float): The time in seconds it took to produce the similarity scores including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## PE Image Embeddings

> Run the Meta Perception Encoder model to embed image data.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/perception_encoder/embed_image":{"post":{"summary":"PE Image Embeddings","description":"Run the Meta Perception Encoder model to embed image data.","operationId":"pe_embed_image_perception_encoder_embed_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderImageEmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderEmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"PerceptionEncoderImageEmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"perception_encoder_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Perception Encoder Version Id","description":"The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"PE-Core-L14-336"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"}},"type":"object","required":["id","image"],"title":"PerceptionEncoderImageEmbeddingRequest","description":"Request for PERCEPTION_ENCODER image embedding.\n\nAttributes:\n    image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) to be embedded."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"PerceptionEncoderEmbeddingResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings","description":"A list of embeddings, each embedding is a list of floats"}},"type":"object","required":["embeddings"],"title":"PerceptionEncoderEmbeddingResponse","description":"Response for PERCEPTION_ENCODER embedding.\n\nAttributes:\n    embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Perception Encoder Text Embeddings

> Run the Meta Perception Encoder model to embed text data.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/perception_encoder/embed_text":{"post":{"summary":"Perception Encoder Text Embeddings","description":"Run the Meta Perception Encoder model to embed text data.","operationId":"pe_embed_text_perception_encoder_embed_text_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderTextEmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerceptionEncoderEmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"PerceptionEncoderTextEmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"perception_encoder_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Perception Encoder Version Id","description":"The version ID of PERCEPTION_ENCODER to be used for this request. Must be one of RN101, RN50, RN50x16, RN50x4, RN50x64, ViT-B-16, ViT-B-32, ViT-L-14-336px, and ViT-L-14.","default":"PE-Core-L14-336"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"text":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Text","description":"A string or list of strings"}},"type":"object","required":["id","text"],"title":"PerceptionEncoderTextEmbeddingRequest","description":"Request for PERCEPTION_ENCODER text embedding.\n\nAttributes:\n    text (Union[List[str], str]): A string or list of strings."},"PerceptionEncoderEmbeddingResponse":{"properties":{"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings","description":"A list of embeddings, each embedding is a list of floats"}},"type":"object","required":["embeddings"],"title":"PerceptionEncoderEmbeddingResponse","description":"Response for PERCEPTION_ENCODER embedding.\n\nAttributes:\n    embeddings (List[List[float]]): A list of embeddings, each embedding is a list of floats.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## 분할 및 탐지

## Grounding DINO inference.

> Run the Grounding DINO zero-shot object detection model.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/grounding_dino/infer":{"post":{"summary":"Grounding DINO inference.","description":"Run the Grounding DINO zero-shot object detection model.","operationId":"grounding_dino_infer_grounding_dino_infer_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingDINOInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectDetectionInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GroundingDINOInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"disable_preproc_auto_orient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Auto Orient","description":"If true, the auto orient preprocessing step is disabled for this call.","default":false},"disable_preproc_contrast":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Contrast","description":"If true, the auto contrast preprocessing step is disabled for this call.","default":false},"disable_preproc_grayscale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Grayscale","description":"If true, the grayscale preprocessing step is disabled for this call.","default":false},"disable_preproc_static_crop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Static Crop","description":"If true, the static crop preprocessing step is disabled for this call.","default":false},"text":{"items":{"type":"string"},"type":"array","title":"Text","description":"A list of strings"},"box_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Box Threshold","default":0.5},"grounding_dino_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grounding Dino Version Id","default":"default"},"text_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Text Threshold","default":0.5},"class_agnostic_nms":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Class Agnostic Nms","default":false}},"type":"object","required":["id","image","text"],"title":"GroundingDINOInferenceRequest","description":"Request for Grounding DINO zero-shot predictions.\n\nAttributes:\n    text (List[str]): A list of strings."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"ObjectDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"ObjectDetectionInferenceResponse","description":"Object Detection inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions."},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Owlv2 image prompting

> Run the google owlv2 model to few-shot object detect

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/owlv2/infer":{"post":{"summary":"Owlv2 image prompting","description":"Run the google owlv2 model to few-shot object detect","operationId":"owlv2_infer_owlv2_infer_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwlV2InferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectDetectionInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"OwlV2InferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"owlv2_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owlv2 Version Id","description":"The version ID of owlv2 to be used for this request.","default":"owlv2-large-patch14-ensemble"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model id to be used in the request."},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image","description":"Images to run the model on"},"training_data":{"items":{"$ref":"#/components/schemas/TrainingImage"},"type":"array","title":"Training Data","description":"Training images for the owlvit model to learn form"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Default confidence threshold for owlvit predictions. Needs to be much higher than you're used to, probably 0.99 - 0.9999","default":0.99},"visualize_predictions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Visualize Predictions","description":"If true, the predictions will be drawn on the original image and returned as a base64 string","default":false},"visualization_labels":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Visualization Labels","description":"If true, labels will be rendered on prediction visualizations","default":false},"visualization_stroke_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visualization Stroke Width","description":"The stroke width used when visualizing predictions","default":1}},"type":"object","required":["id","image","training_data"],"title":"OwlV2InferenceRequest","description":"Request for OwlV2 inference.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key.\n    owlv2_version_id (Optional[str]): The version ID of OwlV2 to be used for this request.\n    image (Union[List[InferenceRequestImage], InferenceRequestImage]): Image(s) for inference.\n    training_data (List[TrainingImage]): Training data to ground the model on\n    confidence (float): Confidence threshold to filter predictions by"},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"TrainingImage":{"properties":{"boxes":{"items":{"$ref":"#/components/schemas/TrainBox"},"type":"array","title":"Boxes","description":"List of boxes and corresponding classes of examples for the model to learn from"},"image":{"$ref":"#/components/schemas/InferenceRequestImage","description":"Image data that `boxes` describes"}},"type":"object","required":["boxes","image"],"title":"TrainingImage"},"TrainBox":{"properties":{"x":{"type":"integer","title":"X","description":"Center x coordinate in pixels of train box"},"y":{"type":"integer","title":"Y","description":"Center y coordinate in pixels of train box"},"w":{"type":"integer","title":"W","description":"Width in pixels of train box"},"h":{"type":"integer","title":"H","description":"Height in pixels of train box"},"cls":{"type":"string","title":"Cls","description":"Class name of object this box encloses"},"negative":{"type":"boolean","title":"Negative","description":"Whether this object is a positive or negative example for this class","default":false}},"type":"object","required":["x","y","w","h","cls"],"title":"TrainBox"},"ObjectDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"ObjectDetectionInferenceResponse","description":"Object Detection inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions."},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## YOLO-World inference.

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/yolo_world/infer":{"post":{"summary":"YOLO-World inference.","description":"Run the YOLO-World zero-shot object detection model.","operationId":"yolo_world_infer_yolo_world_infer_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YOLOWorldInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectDetectionInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"YOLOWorldInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type","description":"The type of the model, usually referring to what task the model performs"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"disable_preproc_auto_orient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Auto Orient","description":"If true, the auto orient preprocessing step is disabled for this call.","default":false},"disable_preproc_contrast":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Contrast","description":"If true, the auto contrast preprocessing step is disabled for this call.","default":false},"disable_preproc_grayscale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Grayscale","description":"If true, the grayscale preprocessing step is disabled for this call.","default":false},"disable_preproc_static_crop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Preproc Static Crop","description":"If true, the static crop preprocessing step is disabled for this call.","default":false},"text":{"items":{"type":"string"},"type":"array","title":"Text","description":"A list of strings"},"yolo_world_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yolo World Version Id","default":"l"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","default":0.4}},"type":"object","required":["id","image","text"],"title":"YOLOWorldInferenceRequest","description":"Request for Grounding DINO zero-shot predictions.\n\nAttributes:\n    text (List[str]): A list of strings."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"ObjectDetectionInferenceResponse":{"properties":{"visualization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization","description":"Base64 encoded string containing prediction visualization image data"},"inference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Id","description":"Unique identifier of inference"},"frame_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Id","description":"The frame id of the image used in inference if the input was a video"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time","description":"The time in seconds it took to produce the predictions including image preprocessing"},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceResponseImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceResponseImage"}],"title":"Image"},"predictions":{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["image","predictions"],"title":"ObjectDetectionInferenceResponse","description":"Object Detection inference response.\n\nAttributes:\n    predictions (List[inference.core.entities.responses.inference.ObjectDetectionPrediction]): List of object detection predictions."},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM Image Embeddings

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam/embed_image":{"post":{"summary":"SAM Image Embeddings","description":"Run the Meta AI Segmant Anything Model to embed image data.","operationId":"sam_embed_image_sam_embed_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamEmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamEmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"SamEmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam Version Id","description":"The version ID of SAM to be used for this request. Must be one of vit_h, vit_l, or vit_b.","default":"vit_h"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"null"}],"description":"The image to be embedded"},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"The ID of the image to be embedded used to cache the embedding."},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the response. Must be one of json or binary. If binary, embedding is returned as a binary numpy array.","default":"json"}},"type":"object","required":["id"],"title":"SamEmbeddingRequest","description":"SAM embedding request.\n\nAttributes:\n    image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded.\n    image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding.\n    format (Optional[str]): The format of the response. Must be one of json or binary."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"SamEmbeddingResponse":{"properties":{"embeddings":{"anyOf":[{"items":{"items":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},"type":"array"},"type":"array"},{}],"title":"Embeddings","description":"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."},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"}},"type":"object","required":["embeddings","time"],"title":"SamEmbeddingResponse","description":"SAM embedding response.\n\nAttributes:\n    embeddings (Union[List[List[List[List[float]]]], Any]): The SAM embedding.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM Image Segmentation

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam/segment_image":{"post":{"summary":"SAM Image Segmentation","description":"Run the Meta AI Segmant Anything Model to generate segmenations for image data.","operationId":"sam_segment_image_sam_segment_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamSegmentationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SamSegmentationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"SamSegmentationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam Version Id","description":"The version ID of SAM to be used for this request. Must be one of vit_h, vit_l, or vit_b.","default":"vit_h"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"embeddings":{"anyOf":[{"items":{"items":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},"type":"array"},"type":"array"},{},{"type":"null"}],"title":"Embeddings","description":"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."},"embeddings_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embeddings Format","description":"The format of the embeddings. Must be one of json or binary. If binary, embeddings are expected to be a binary numpy array.","default":"json"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the response. Must be one of json or binary. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons, then returned as json.","default":"json"},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"null"}],"description":"The image to be segmented. Only required if embeddings are not provided."},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"The ID of the image to be segmented used to retrieve cached embeddings. If an embedding is cached, it will be used instead of generating a new embedding. If no embedding is cached, a new embedding will be generated and cached."},"has_mask_input":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Mask Input","description":"Whether or not the request includes a mask input. If true, the mask input must be provided.","default":false},"mask_input":{"anyOf":[{"items":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},"type":"array"},{},{"type":"null"}],"title":"Mask Input","description":"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."},"mask_input_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask Input Format","description":"The format of the mask input. Must be one of json or binary. If binary, mask input is expected to be a binary numpy array.","default":"json"},"orig_im_size":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Orig Im Size","description":"The original size of the image used to generate the embeddings. This is only required if the image is not provided."},"point_coords":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Point Coords","description":"The coordinates of the interactive points used during decoding. Each point (x,y pair) corresponds to a label in point_labels.","default":[[0,0]]},"point_labels":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Point Labels","description":"The labels of the interactive points used during decoding. A 1 represents a positive point (part of the object to be segmented). A -1 represents a negative point (not part of the object to be segmented). Each label corresponds to a point in point_coords.","default":[-1]},"use_mask_input_cache":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Mask Input Cache","description":"Whether or not to use the mask input cache. If true, the mask input cache will be used if it exists. If false, the mask input cache will not be used.","default":true}},"type":"object","required":["id"],"title":"SamSegmentationRequest","description":"SAM segmentation request.\n\nAttributes:\n    embeddings (Optional[Union[List[List[List[List[float]]]], Any]]): The embeddings to be decoded.\n    embeddings_format (Optional[str]): The format of the embeddings.\n    format (Optional[str]): The format of the response.\n    image (Optional[InferenceRequestImage]): The image to be segmented.\n    image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings.\n    has_mask_input (Optional[bool]): Whether or not the request includes a mask input.\n    mask_input (Optional[Union[List[List[List[float]]], Any]]): The set of output masks.\n    mask_input_format (Optional[str]): The format of the mask input.\n    orig_im_size (Optional[List[int]]): The original size of the image used to generate the embeddings.\n    point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding.\n    point_labels (Optional[List[float]]): The labels of the interactive points used during decoding.\n    use_mask_input_cache (Optional[bool]): Whether or not to use the mask input cache."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"SamSegmentationResponse":{"properties":{"masks":{"anyOf":[{"items":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},"type":"array"},{}],"title":"Masks","description":"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."},"low_res_masks":{"anyOf":[{"items":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},"type":"array"},{}],"title":"Low Res Masks","description":"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"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the segmentation including preprocessing"}},"type":"object","required":["masks","low_res_masks","time"],"title":"SamSegmentationResponse","description":"SAM segmentation response.\n\nAttributes:\n    masks (Union[List[List[List[int]]], Any]): The set of output masks.\n    low_res_masks (Union[List[List[List[int]]], Any]): The set of output low-resolution masks.\n    time (float): The time in seconds it took to produce the segmentation including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM2 Image Embeddings

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam2/embed_image":{"post":{"summary":"SAM2 Image Embeddings","description":"Run the Meta AI Segment Anything 2 Model to embed image data.","operationId":"sam2_embed_image_sam2_embed_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2EmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2EmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam2EmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam2_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam2 Version Id","description":"The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus","default":"hiera_large"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"null"}],"description":"The image to be embedded"},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"The ID of the image to be embedded used to cache the embedding."}},"type":"object","required":["id"],"title":"Sam2EmbeddingRequest","description":"SAM embedding request.\n\nAttributes:\n    image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded.\n    image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding.\n    format (Optional[str]): The format of the response. Must be one of json or binary."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"Sam2EmbeddingResponse":{"properties":{"image_id":{"type":"string","title":"Image Id","description":"Image id embeddings are cached to"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"}},"type":"object","required":["image_id","time"],"title":"Sam2EmbeddingResponse","description":"SAM embedding response.\n\nAttributes:\n    embeddings (Union[List[List[List[List[float]]]], Any]): The SAM embedding.\n    time (float): The time in seconds it took to produce the embeddings including preprocessing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM2 Image Segmentation

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam2/segment_image":{"post":{"summary":"SAM2 Image Segmentation","description":"Run the Meta AI Segment Anything 2 Model to generate segmenations for image data.","operationId":"sam2_segment_image_sam2_segment_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2SegmentationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2SegmentationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam2SegmentationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam2_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam2 Version Id","description":"The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus","default":"hiera_large"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the response. Must be one of 'json', 'rle', or 'binary'. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons. If rle, masks are converted to RLE format.","default":"json"},"image":{"$ref":"#/components/schemas/InferenceRequestImage","description":"The image to be segmented."},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"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."},"prompts":{"$ref":"#/components/schemas/Sam2PromptSet","description":"A list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points. Also accepts a flat array of prompts (e.g. 'prompts': [{...}, {...}]) for convenience.","default":{}},"multimask_output":{"type":"boolean","title":"Multimask Output","description":"If true, the model will return three masks. For ambiguous input prompts (such as a single click), this will often produce better masks than a single prediction. If only a single mask is needed, the model's predicted quality score can be used to select the best mask. For non-ambiguous prompts, such as multiple input prompts, multimask_output=False can give better results.","default":true},"save_logits_to_cache":{"type":"boolean","title":"Save Logits To Cache","description":"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_cache":{"type":"boolean","title":"Load Logits From Cache","description":"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}},"type":"object","required":["id","image"],"title":"Sam2SegmentationRequest","description":"SAM segmentation request.\n\nAttributes:\n    format (Optional[str]): The format of the response.\n    image (InferenceRequestImage): The image to be segmented.\n    image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings.\n    point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding.\n    point_labels (Optional[List[float]]): The labels of the interactive points used during decoding."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"Sam2PromptSet":{"properties":{"prompts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Sam2Prompt"},"type":"array"},{"type":"null"}],"title":"Prompts","description":"An optional list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points"}},"type":"object","title":"Sam2PromptSet"},"Sam2Prompt":{"properties":{"box":{"anyOf":[{"$ref":"#/components/schemas/Box"},{"type":"null"}]},"points":{"anyOf":[{"items":{"$ref":"#/components/schemas/Point-Input"},"type":"array"},{"type":"null"}],"title":"Points"}},"type":"object","title":"Sam2Prompt"},"Box":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","title":"Width"},"height":{"type":"number","title":"Height"}},"type":"object","required":["x","y","width","height"],"title":"Box"},"Point-Input":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"positive":{"type":"boolean","title":"Positive"}},"type":"object","required":["x","y","positive"],"title":"Point"},"Sam2SegmentationResponse":{"properties":{"predictions":{"items":{"$ref":"#/components/schemas/Sam2SegmentationPrediction"},"type":"array","title":"Predictions"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the segmentation including preprocessing"}},"type":"object","required":["predictions","time"],"title":"Sam2SegmentationResponse"},"Sam2SegmentationPrediction":{"properties":{"masks":{"anyOf":[{"items":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Masks","description":"If polygon format, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If rle format, masks is a dictionary with the keys 'size' and 'counts' containing the size and counts of the RLE encoding."},"confidence":{"type":"number","title":"Confidence","description":"Masks confidences"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Format of the mask data: 'polygon' or 'rle'","default":"polygon"}},"type":"object","required":["masks","confidence"],"title":"Sam2SegmentationPrediction","description":"SAM segmentation prediction.\n\nAttributes:\n    masks (Union[List[List[List[int]]], Dict[str, Any], Any]): Mask data - either polygon coordinates or RLE encoding.\n    confidence (float): Masks confidences.\n    format (Optional[str]): Format of the mask data: 'polygon' or 'rle'."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Seg preview Image Embeddings

> Run the  Model to embed image data.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam3/embed_image":{"post":{"summary":"Seg preview Image Embeddings","description":"Run the  Model to embed image data.","operationId":"sam3_embed_image_sam3_embed_image_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2EmbeddingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam3EmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam2EmbeddingRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam2_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam2 Version Id","description":"The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus","default":"hiera_large"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceRequestImage"},{"type":"null"}],"description":"The image to be embedded"},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"The ID of the image to be embedded used to cache the embedding."}},"type":"object","required":["id"],"title":"Sam2EmbeddingRequest","description":"SAM embedding request.\n\nAttributes:\n    image (Optional[inference.core.entities.requests.inference.InferenceRequestImage]): The image to be embedded.\n    image_id (Optional[str]): The ID of the image to be embedded used to cache the embedding.\n    format (Optional[str]): The format of the response. Must be one of json or binary."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"Sam3EmbeddingResponse":{"properties":{"image_id":{"type":"string","title":"Image Id","description":"Image id embeddings are cached to"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the embeddings including preprocessing"}},"type":"object","required":["image_id","time"],"title":"Sam3EmbeddingResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM3 PCS (promptable concept segmentation)

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam3/concept_segment":{"post":{"summary":"SAM3 PCS (promptable concept segmentation)","description":"Run the SAM3 PCS (promptable concept segmentation) to generate segmentations for image data.","operationId":"sam3_segment_image_sam3_concept_segment_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the inference request","title":"Source"},"description":"The source of the inference request"},{"name":"source_info","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The detailed source information of the inference request","title":"Source Info"},"description":"The detailed source information of the inference request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam3SegmentationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam3SegmentationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam3SegmentationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"The model ID of SAM3. Use 'sam3/sam3_final' to target the generic base model.","default":"sam3/sam3_final"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"One of 'polygon', 'rle'","default":"polygon"},"image":{"$ref":"#/components/schemas/InferenceRequestImage","description":"The image to be segmented."},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"Optional ID for caching embeddings."},"output_prob_thresh":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Prob Thresh","description":"Score threshold for outputs.","default":0.5},"prompts":{"items":{"$ref":"#/components/schemas/Sam3Prompt"},"type":"array","minItems":1,"title":"Prompts","description":"List of prompts (text and/or visual)"},"nms_iou_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nms Iou Threshold","description":"IoU threshold for cross-prompt NMS. If None, NMS is disabled. Must be in [0.0, 1.0] when set."}},"type":"object","required":["id","image","prompts"],"title":"Sam3SegmentationRequest"},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"Sam3Prompt":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Optional hint: 'text' or 'visual'. 'visual' requires at least one box."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Concept to segment as a short noun phrase (e.g. 'person'). All matching instances are returned. Can be combined with exemplar boxes in the same prompt."},"output_prob_thresh":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Prob Thresh","description":"Score threshold for this prompt's outputs. Overrides request-level threshold if set."},"boxes":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/Box"},{"$ref":"#/components/schemas/BoxXYXY"}]},"type":"array"},{"type":"null"}],"title":"Boxes","description":"Exemplar boxes in absolute pixels, as XYWH entries ({x, y, width, height}, top-left anchored) or XYXY entries ({x0, y0, x1, y1}). Each box marks an example object; the model segments every instance matching the exemplars (and text, if provided), not just the boxed objects. Requires box_labels."},"box_labels":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"type":"array"},{"type":"null"}],"title":"Box Labels","description":"Per-box exemplar labels, one per entry in boxes: 1/true marks a positive exemplar (segment objects like this), 0/false marks a negative exemplar (exclude objects like this). Required when boxes is set."}},"type":"object","title":"Sam3Prompt","description":"Unified prompt that can contain text and/or geometry.\n\nAbsolute pixel coordinates are used for boxes. Labels accept 0/1 or booleans."},"Box":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","title":"Width"},"height":{"type":"number","title":"Height"}},"type":"object","required":["x","y","width","height"],"title":"Box"},"BoxXYXY":{"properties":{"x0":{"type":"number","title":"X0"},"y0":{"type":"number","title":"Y0"},"x1":{"type":"number","title":"X1"},"y1":{"type":"number","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"BoxXYXY"},"Sam3SegmentationResponse":{"properties":{"prompt_results":{"items":{"$ref":"#/components/schemas/Sam3PromptResult"},"type":"array","title":"Prompt Results"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the segmentation including preprocessing"}},"type":"object","required":["prompt_results","time"],"title":"Sam3SegmentationResponse"},"Sam3PromptResult":{"properties":{"prompt_index":{"type":"integer","title":"Prompt Index"},"echo":{"$ref":"#/components/schemas/Sam3PromptEcho"},"predictions":{"items":{"$ref":"#/components/schemas/Sam3SegmentationPrediction"},"type":"array","title":"Predictions"}},"type":"object","required":["prompt_index","echo","predictions"],"title":"Sam3PromptResult"},"Sam3PromptEcho":{"properties":{"prompt_index":{"type":"integer","title":"Prompt Index"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"num_boxes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Boxes"}},"type":"object","required":["prompt_index"],"title":"Sam3PromptEcho"},"Sam3SegmentationPrediction":{"properties":{"masks":{"anyOf":[{"items":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Masks","description":"Mask data - either polygon coordinates or RLE encoding"},"confidence":{"type":"number","title":"Confidence","description":"Masks confidence"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Format of the mask data: 'polygon' or 'rle'","default":"polygon"}},"type":"object","required":["masks","confidence"],"title":"Sam3SegmentationPrediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM3 PVS (promptable visual segmentation)

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam3/visual_segment":{"post":{"summary":"SAM3 PVS (promptable visual segmentation)","description":"Run the SAM3 PVS (promptable visual segmentation) to generate segmentations for image data.","operationId":"sam3_visual_segment_sam3_visual_segment_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the inference request","title":"Source"},"description":"The source of the inference request"},{"name":"source_info","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The detailed source information of the inference request","title":"Source Info"},"description":"The detailed source information of the inference request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2SegmentationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam2SegmentationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam2SegmentationRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"sam2_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sam2 Version Id","description":"The version ID of SAM to be used for this request. Must be one of hiera_tiny, hiera_small, hiera_large, hiera_b_plus","default":"hiera_large"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the response. Must be one of 'json', 'rle', or 'binary'. If binary, masks are returned as binary numpy arrays. If json, masks are converted to polygons. If rle, masks are converted to RLE format.","default":"json"},"image":{"$ref":"#/components/schemas/InferenceRequestImage","description":"The image to be segmented."},"image_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Id","description":"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."},"prompts":{"$ref":"#/components/schemas/Sam2PromptSet","description":"A list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points. Also accepts a flat array of prompts (e.g. 'prompts': [{...}, {...}]) for convenience.","default":{}},"multimask_output":{"type":"boolean","title":"Multimask Output","description":"If true, the model will return three masks. For ambiguous input prompts (such as a single click), this will often produce better masks than a single prediction. If only a single mask is needed, the model's predicted quality score can be used to select the best mask. For non-ambiguous prompts, such as multiple input prompts, multimask_output=False can give better results.","default":true},"save_logits_to_cache":{"type":"boolean","title":"Save Logits To Cache","description":"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_cache":{"type":"boolean","title":"Load Logits From Cache","description":"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}},"type":"object","required":["id","image"],"title":"Sam2SegmentationRequest","description":"SAM segmentation request.\n\nAttributes:\n    format (Optional[str]): The format of the response.\n    image (InferenceRequestImage): The image to be segmented.\n    image_id (Optional[str]): The ID of the image to be segmented used to retrieve cached embeddings.\n    point_coords (Optional[List[List[float]]]): The coordinates of the interactive points used during decoding.\n    point_labels (Optional[List[float]]): The labels of the interactive points used during decoding."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"Sam2PromptSet":{"properties":{"prompts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Sam2Prompt"},"type":"array"},{"type":"null"}],"title":"Prompts","description":"An optional list of prompts for masks to predict. Each prompt can include a bounding box and / or a set of postive or negative points"}},"type":"object","title":"Sam2PromptSet"},"Sam2Prompt":{"properties":{"box":{"anyOf":[{"$ref":"#/components/schemas/Box"},{"type":"null"}]},"points":{"anyOf":[{"items":{"$ref":"#/components/schemas/Point-Input"},"type":"array"},{"type":"null"}],"title":"Points"}},"type":"object","title":"Sam2Prompt"},"Box":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","title":"Width"},"height":{"type":"number","title":"Height"}},"type":"object","required":["x","y","width","height"],"title":"Box"},"Point-Input":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"positive":{"type":"boolean","title":"Positive"}},"type":"object","required":["x","y","positive"],"title":"Point"},"Sam2SegmentationResponse":{"properties":{"predictions":{"items":{"$ref":"#/components/schemas/Sam2SegmentationPrediction"},"type":"array","title":"Predictions"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the segmentation including preprocessing"}},"type":"object","required":["predictions","time"],"title":"Sam2SegmentationResponse"},"Sam2SegmentationPrediction":{"properties":{"masks":{"anyOf":[{"items":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},"type":"array"},{"additionalProperties":true,"type":"object"}],"title":"Masks","description":"If polygon format, masks is a list of polygons, where each polygon is a list of points, where each point is a tuple containing the x,y pixel coordinates of the point. If rle format, masks is a dictionary with the keys 'size' and 'counts' containing the size and counts of the RLE encoding."},"confidence":{"type":"number","title":"Confidence","description":"Masks confidences"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Format of the mask data: 'polygon' or 'rle'","default":"polygon"}},"type":"object","required":["masks","confidence"],"title":"Sam2SegmentationPrediction","description":"SAM segmentation prediction.\n\nAttributes:\n    masks (Union[List[List[List[int]]], Dict[str, Any], Any]): Mask data - either polygon coordinates or RLE encoding.\n    confidence (float): Masks confidences.\n    format (Optional[str]): Format of the mask data: 'polygon' or 'rle'."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## SAM3 3D Object Generation

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/sam3_3d/infer":{"post":{"summary":"SAM3 3D Object Generation","description":"Generate 3D meshes and Gaussian splatting from 2D images with mask prompts.","operationId":"sam3_3d_infer_sam3_3d_infer_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sam3_3D_Objects_InferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Sam3_3D_Objects_InferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"image":{"$ref":"#/components/schemas/InferenceRequestImage","description":"The input image to be used for 3D generation."},"mask_input":{"title":"Mask Input","description":"Mask input in any supported format: polygon [x1,y1,x2,y2,...], binary mask (base64), RLE dict, or list of these."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"The model ID for SAM3_3D.","default":"sam3-3d-objects"},"output_meshes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Output Meshes","description":"SAM3 3D always outputs object gaussians, and can optionally output object meshes if output_meshes is True.","default":true},"output_scene":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Output Scene","description":"Output the combined scene reconstruction in addition to individual object reconstructions.","default":true},"with_mesh_postprocess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"With Mesh Postprocess","description":"Enable mesh postprocessing.","default":true},"with_texture_baking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"With Texture Baking","description":"Enable texture baking for meshes.","default":true},"use_distillations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Distillations","description":"Use the distilled versions of the model components.","default":false}},"type":"object","required":["id","image","mask_input"],"title":"Sam3_3D_Objects_InferenceRequest","description":"SAM3D inference request for 3D object generation.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key.\n    image (InferenceRequestImage): The input image to be used for 3D generation.\n    mask_input: Mask(s) in any supported format - polygon, binary mask, or RLE."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## OCR

## DocTR OCR response

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/doctr/ocr":{"post":{"summary":"DocTR OCR response","description":"Run the DocTR OCR model to retrieve text in an image.","operationId":"doctr_retrieve_text_doctr_ocr_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctrOCRInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OCRInferenceResponse"},{"type":"array","items":{"$ref":"#/components/schemas/OCRInferenceResponse"}}],"title":"Response Doctr Retrieve Text Doctr Ocr Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DoctrOCRInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"doctr_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doctr Version Id","default":"default"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"generate_bounding_boxes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Generate Bounding Boxes","default":false}},"type":"object","required":["id","image"],"title":"DoctrOCRInferenceRequest","description":"DocTR inference request.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"OCRInferenceResponse":{"properties":{"result":{"type":"string","title":"Result","description":"The combined OCR recognition result."},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceResponseImage"},{"type":"null"}],"description":"Metadata about input image dimensions"},"predictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array"},{"type":"null"}],"title":"Predictions","description":"List of objects detected by OCR"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the inference including preprocessing."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["result","time"],"title":"OCRInferenceResponse","description":"OCR Inference response.\n\nAttributes:\n    result (str): The combined OCR recognition result.\n    predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR\n    time (float): The time in seconds it took to produce the inference including preprocessing"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## EasyOCR OCR response

> Run the EasyOCR model to retrieve text in an image.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/easy_ocr/ocr":{"post":{"summary":"EasyOCR OCR response","description":"Run the EasyOCR model to retrieve text in an image.","operationId":"easy_ocr_retrieve_text_easy_ocr_ocr_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyOCRInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OCRInferenceResponse"},{"type":"array","items":{"$ref":"#/components/schemas/OCRInferenceResponse"}}],"title":"Response Easy Ocr Retrieve Text Easy Ocr Ocr Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"EasyOCRInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"easy_ocr_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Easy Ocr Version Id","default":"english_g2"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"language_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Language Codes","default":["en"]},"quantize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quantize","description":"Quantized models are smaller and faster, but may be less accurate and won't work correctly on all hardware.","default":false}},"type":"object","required":["id","image"],"title":"EasyOCRInferenceRequest","description":"EasyOCR inference request.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"OCRInferenceResponse":{"properties":{"result":{"type":"string","title":"Result","description":"The combined OCR recognition result."},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceResponseImage"},{"type":"null"}],"description":"Metadata about input image dimensions"},"predictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array"},{"type":"null"}],"title":"Predictions","description":"List of objects detected by OCR"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the inference including preprocessing."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["result","time"],"title":"OCRInferenceResponse","description":"OCR Inference response.\n\nAttributes:\n    result (str): The combined OCR recognition result.\n    predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR\n    time (float): The time in seconds it took to produce the inference including preprocessing"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## PP-OCRv6 OCR response

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/ocr/pp-ocr":{"post":{"summary":"PP-OCRv6 OCR response","description":"Run PP-OCRv6 two-stage OCR to retrieve text in an image.","operationId":"pp_ocr_retrieve_text_ocr_pp_ocr_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PPOCRInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OCRInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"PPOCRInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"text_detection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Detection","default":"__unset__"},"text_recognition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Recognition","default":"__unset__"},"pp_ocr_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pp Ocr Version Id"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"}},"type":"object","required":["id","image"],"title":"PPOCRInferenceRequest","description":"PP-OCR inference request.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"OCRInferenceResponse":{"properties":{"result":{"type":"string","title":"Result","description":"The combined OCR recognition result."},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceResponseImage"},{"type":"null"}],"description":"Metadata about input image dimensions"},"predictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array"},{"type":"null"}],"title":"Predictions","description":"List of objects detected by OCR"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the inference including preprocessing."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["result","time"],"title":"OCRInferenceResponse","description":"OCR Inference response.\n\nAttributes:\n    result (str): The combined OCR recognition result.\n    predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR\n    time (float): The time in seconds it took to produce the inference including preprocessing"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## TrOCR OCR response

> Run the TrOCR model to retrieve text in an image.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/ocr/trocr":{"post":{"summary":"TrOCR OCR response","description":"Run the TrOCR model to retrieve text in an image.","operationId":"trocr_retrieve_text_ocr_trocr_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval","title":"Api Key"},"description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},{"name":"countinference","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Countinference"}},{"name":"service_secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrOCRInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OCRInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TrOCRInferenceRequest":{"properties":{"id":{"type":"string","title":"Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Roboflow API Key that will be passed to the model during initialization for artifact retrieval"},"usage_billable":{"type":"boolean","title":"Usage Billable","default":true},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Info"},"stream_pipeline_context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Pipeline Context Id","description":"Internal stream-pipeline frame pairing id. Not part of the public API."},"disable_model_monitoring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Model Monitoring","description":"If true, disables model monitoring for this request","default":false},"image":{"anyOf":[{"items":{"$ref":"#/components/schemas/InferenceRequestImage"},"type":"array"},{"$ref":"#/components/schemas/InferenceRequestImage"}],"title":"Image"},"trocr_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trocr Version Id","default":"trocr-base-printed"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"}},"type":"object","required":["id","image"],"title":"TrOCRInferenceRequest","description":"TrOCR inference request.\n\nAttributes:\n    api_key (Optional[str]): Roboflow API Key."},"InferenceRequestImage":{"properties":{"type":{"type":"string","title":"Type","description":"The type of image data provided, one of 'url', 'base64', or 'numpy'"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Image data corresponding to the image type, if type = 'url' then value is a string containing the url of an image, else if type = 'base64' then value is a string containing base64 encoded image data, else if type = 'numpy' then value is binary numpy data serialized using pickle.dumps(); array should 3 dimensions, channels last, with values in the range [0,255]."}},"type":"object","required":["type"],"title":"InferenceRequestImage","description":"Image data for inference request.\n\nAttributes:\n    type (str): The type of image data provided, one of 'url', 'base64', or 'numpy'.\n    value (Optional[Any]): Image data corresponding to the image type."},"OCRInferenceResponse":{"properties":{"result":{"type":"string","title":"Result","description":"The combined OCR recognition result."},"image":{"anyOf":[{"$ref":"#/components/schemas/InferenceResponseImage"},{"type":"null"}],"description":"Metadata about input image dimensions"},"predictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ObjectDetectionPrediction"},"type":"array"},{"type":"null"}],"title":"Predictions","description":"List of objects detected by OCR"},"time":{"type":"number","title":"Time","description":"The time in seconds it took to produce the inference including preprocessing."},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["result","time"],"title":"OCRInferenceResponse","description":"OCR Inference response.\n\nAttributes:\n    result (str): The combined OCR recognition result.\n    predictions (List[ObjectDetectionPrediction]): List of objects detected by OCR\n    time (float): The time in seconds it took to produce the inference including preprocessing"},"InferenceResponseImage":{"properties":{"width":{"type":"integer","title":"Width","description":"The original width of the image used in inference"},"height":{"type":"integer","title":"Height","description":"The original height of the image used in inference"}},"type":"object","required":["width","height"],"title":"InferenceResponseImage","description":"Inference response image information.\n\nAttributes:\n    width (int): The original width of the image used in inference.\n    height (int): The original height of the image used in inference."},"ObjectDetectionPrediction":{"properties":{"x":{"type":"number","title":"X","description":"The center x-axis pixel coordinate of the prediction"},"y":{"type":"number","title":"Y","description":"The center y-axis pixel coordinate of the prediction"},"width":{"type":"number","title":"Width","description":"The width of the prediction bounding box in number of pixels"},"height":{"type":"number","title":"Height","description":"The height of the prediction bounding box in number of pixels"},"confidence":{"type":"number","title":"Confidence","description":"The detection confidence as a fraction between 0 and 1"},"class":{"type":"string","title":"Class","description":"The predicted class label"},"class_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Class Confidence","description":"The class label confidence as a fraction between 0 and 1"},"class_id":{"type":"integer","title":"Class Id","description":"The class id of the prediction"},"tracker_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracker Id","description":"The tracker id of the prediction if tracking is enabled"},"detection_id":{"type":"string","title":"Detection Id","description":"Unique identifier of detection"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id","description":"Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference"}},"type":"object","required":["x","y","width","height","confidence","class","class_id"],"title":"ObjectDetectionPrediction","description":"Object Detection prediction.\n\nAttributes:\n    x (float): The center x-axis pixel coordinate of the prediction.\n    y (float): The center y-axis pixel coordinate of the prediction.\n    width (float): The width of the prediction bounding box in number of pixels.\n    height (float): The height of the prediction bounding box in number of pixels.\n    confidence (float): The detection confidence as a fraction between 0 and 1.\n    class_name (str): The predicted class label.\n    class_confidence (Union[float, None]): The class label confidence as a fraction between 0 and 1.\n    class_id (int): The class id of the prediction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## 시선 감지

## Gaze Detection (deprecated)

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/gaze/gaze_detection":{"post":{"summary":"Gaze Detection (deprecated)","description":"Deprecated. Always returns HTTP 410 Gone. The endpoint stub will be removed end of Q2 2026.","operationId":"gaze_detection_deprecated_gaze_gaze_detection_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"deprecated":true}}}}
```

## WebRTC

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

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

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/initialise_webrtc_worker":{"post":{"summary":"[EXPERIMENTAL] Establishes WebRTC peer connection and processes video stream in spawned process or modal function","description":"[EXPERIMENTAL] Establishes WebRTC peer connection and processes video stream in spawned process or modal function","operationId":"initialise_webrtc_worker_initialise_webrtc_worker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCWorkerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeWebRTCResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"WebRTCWorkerRequest":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"workflow_configuration":{"$ref":"#/components/schemas/WorkflowConfiguration"},"is_preview":{"type":"boolean","title":"Is Preview","default":false},"webrtc_offer":{"$ref":"#/components/schemas/WebRTCOffer"},"webrtc_config":{"anyOf":[{"$ref":"#/components/schemas/WebRTCConfig"},{"type":"null"}]},"webrtc_turn_config":{"anyOf":[{"$ref":"#/components/schemas/WebRTCTURNConfig"},{"type":"null"}]},"webrtc_realtime_processing":{"type":"boolean","title":"Webrtc Realtime Processing","default":true},"stream_output":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stream Output"},"data_output":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Output"},"declared_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Declared Fps"},"rtsp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rtsp Url"},"mjpeg_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mjpeg Url"},"processing_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processing Timeout","default":3600},"processing_session_started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Session Started"},"requested_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Plan","default":"webrtc-gpu-small"},"requested_gpu":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Gpu"},"requested_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Region"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["workflow_configuration","webrtc_offer"],"title":"WebRTCWorkerRequest"},"WorkflowConfiguration":{"properties":{"type":{"type":"string","const":"WorkflowConfiguration","title":"Type"},"workflow_specification":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Specification"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"workflow_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Version Id"},"image_input_name":{"type":"string","title":"Image Input Name","default":"image"},"workflows_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflows Parameters"},"disable_sinks":{"type":"boolean","title":"Disable Sinks","default":false},"workflows_thread_pool_workers":{"type":"integer","title":"Workflows Thread Pool Workers","default":4},"cancel_thread_pool_tasks_on_exit":{"type":"boolean","title":"Cancel Thread Pool Tasks On Exit","default":true},"video_metadata_input_name":{"type":"string","title":"Video Metadata Input Name","default":"video_metadata"}},"type":"object","required":["type"],"title":"WorkflowConfiguration"},"WebRTCOffer":{"properties":{"type":{"type":"string","title":"Type"},"sdp":{"type":"string","title":"Sdp"}},"type":"object","required":["type","sdp"],"title":"WebRTCOffer"},"WebRTCConfig":{"properties":{"iceServers":{"items":{"$ref":"#/components/schemas/RTCIceServer"},"type":"array","title":"Iceservers"}},"type":"object","required":["iceServers"],"title":"WebRTCConfig"},"RTCIceServer":{"properties":{"urls":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Urls"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"credential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential"}},"type":"object","required":["urls"],"title":"RTCIceServer"},"WebRTCTURNConfig":{"properties":{"urls":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Urls"},"username":{"type":"string","title":"Username"},"credential":{"type":"string","title":"Credential"}},"type":"object","required":["urls","username","credential"],"title":"WebRTCTURNConfig"},"InitializeWebRTCResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status"},"context":{"$ref":"#/components/schemas/CommandContext","description":"Context of the command."},"sdp":{"type":"string","title":"Sdp"},"type":{"type":"string","title":"Type"}},"type":"object","required":["status","context","sdp","type"],"title":"InitializeWebRTCResponse"},"CommandContext":{"properties":{"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Server-side request ID"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","description":"Identifier of pipeline connected to operation"}},"type":"object","title":"CommandContext"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## WebRTC session heartbeat

> Receive heartbeat for an active WebRTC session.\
> \
> This endpoint is called periodically to indicate\
> that their session is still active. The session will be removed from\
> the quota count if no heartbeat is received within the TTL period.\
> \
> Requires api\_key for authentication.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/webrtc/session/heartbeat":{"post":{"summary":"WebRTC session heartbeat","description":"Receive heartbeat for an active WebRTC session.\n\nThis endpoint is called periodically to indicate\nthat their session is still active. The session will be removed from\nthe quota count if no heartbeat is received within the TTL period.\n\nRequires api_key for authentication.","operationId":"webrtc_session_heartbeat_webrtc_session_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCSessionHeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Webrtc Session Heartbeat Webrtc Session Heartbeat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"WebRTCSessionHeartbeatRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["session_id","api_key"],"title":"WebRTCSessionHeartbeatRequest","description":"Request body for WebRTC session heartbeat and end endpoints."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## End WebRTC session

> End a WebRTC session and immediately free the quota slot.\
> \
> Requires api\_key for authentication.

```json
{"openapi":"3.1.0","info":{"title":"Roboflow Inference Server","version":"1.3.8"},"servers":[{"url":"http://localhost:9001","description":"Local Inference Server"}],"paths":{"/webrtc/session/heartbeat/end":{"post":{"summary":"End WebRTC session","description":"End a WebRTC session and immediately free the quota slot.\n\nRequires api_key for authentication.","operationId":"webrtc_session_end_webrtc_session_heartbeat_end_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRTCSessionHeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Webrtc Session End Webrtc Session Heartbeat End Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"WebRTCSessionHeartbeatRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["session_id","api_key"],"title":"WebRTCSessionHeartbeatRequest","description":"Request body for WebRTC session heartbeat and end endpoints."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
