OpenAI¶
v4¶
Class: OpenAIBlockV4 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.openai.v4.OpenAIBlockV4
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Ask a question to OpenAI's GPT models with vision capabilities (including GPT-5 and GPT-4o).
You can specify arbitrary text prompts or predefined ones, the block supports the following types of prompt:
-
Open Prompt (
unconstrained) - Use any prompt to generate a raw response -
Text Recognition (OCR) (
ocr) - Model recognizes text in the image -
Visual Question Answering (
visual-question-answering) - Model answers the question you submit in the prompt -
Captioning (short) (
caption) - Model provides a short description of the image -
Captioning (
detailed-caption) - Model provides a long description of the image -
Single-Label Classification (
classification) - Model classifies the image content as one of the provided classes -
Multi-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classes -
Unprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the image -
Structured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
Provide your OpenAI API key or set the value to rf_key:account (or
rf_key:user:<id>) to proxy requests through Roboflow's API.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/open_ai@v4to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
task_type |
str |
Task type to be performed by model. Value determines required parameters and output response.. | ❌ |
prompt |
str |
Text prompt to the OpenAI model. | ✅ |
output_structure |
Dict[str, str] |
Dictionary with structure of expected JSON response. | ❌ |
classes |
List[str] |
List of classes to be used. | ✅ |
api_key |
str |
Your OpenAI API key. | ✅ |
model_version |
str |
Model to be used. | ✅ |
reasoning_effort |
str |
Controls reasoning. Reducing can result in faster responses and fewer tokens. GPT-5.1 and higher models default to 'none' (no reasoning) and support 'none', 'low', 'medium', 'high'. GPT-5.2 also supports 'xhigh'. GPT-5 models default to 'medium' and support 'minimal', 'low', 'medium', 'high'.. | ✅ |
image_detail |
str |
Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity.. | ✅ |
max_tokens |
int |
Maximum number of tokens the model can generate in its response. If not specified, the model will use its default limit. Minimum value is 16.. | ❌ |
temperature |
float |
Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are.. | ✅ |
max_concurrent_requests |
int |
Number of concurrent requests that can be executed by block when batch of input images provided. If not given - block defaults to value configured globally in Workflows Execution Engine. Please restrict if you hit OpenAI limits.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to OpenAI in version v4.
- inputs:
Crop Visualization,Image Slicer,Roboflow Dataset Upload,Google Gemini,Classification Label Visualization,Dynamic Crop,Image Slicer,Absolute Static Crop,Current Time,Roboflow Custom Metadata,Multi-Label Classification Model,SIFT Comparison,Morphological Transformation,Background Subtraction,Line Counter Visualization,Ellipse Visualization,OpenAI,MoonshotAI Kimi,Grid Visualization,PLC ModbusTCP,Bounding Box Visualization,Morphological Transformation,Google Gemma,Cosmos 3,Motion Detection,OpenAI,Cosine Similarity,Webhook Sink,VLM As Detector,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Stitch Images,Roboflow Dataset Upload,OpenAI,Camera Calibration,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Pixelate Visualization,Qwen 3.6 API,PLC Writer,CSV Formatter,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Relative Static Crop,Anthropic Claude,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,OCR Model,GeoTag Detection,Qwen 3.5 API,Halo Visualization,OpenRouter,Local File Sink,Text Display,Roboflow Asset Library Attributes,Image Threshold,Image Blur,LMM,Color Visualization,Gaze Detection,Corner Visualization,S3 Sink,MQTT Writer,Qwen-VL,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,SIFT,Stitch OCR Detections,Auto Rotate on Edges,Google Gemini,Instance Segmentation Model,Dimension Collapse,Twilio SMS Notification,Trace Visualization,Single-Label Classification Model,Perspective Correction,Camera Focus,EasyOCR,Google Gemma API,PLC EthernetIP,MoonshotAI Kimi,Twilio SMS/MMS Notification,Blur Visualization,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Image Convert Grayscale,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Clip Comparison,Dynamic Zone,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Contrast Enhancement,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Llama 3.2 Vision,OpenAI-Compatible LLM,Label Visualization,Background Color Visualization,Keypoint Detection Model,Buffer,Model Comparison Visualization,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude,Identify Changes - outputs:
Crop Visualization,Roboflow Dataset Upload,Instance Segmentation Model,Google Gemini,Classification Label Visualization,Dynamic Crop,Time in Zone,Detections Classes Replacement,Cache Get,Current Time,Pixel Color Count,Roboflow Custom Metadata,SIFT Comparison,Morphological Transformation,Line Counter Visualization,OpenAI,MoonshotAI Kimi,Multi-Label Classification Model,Ellipse Visualization,SAM 3,Grid Visualization,Segment Anything 2 Model,Semantic Segmentation Model,Bounding Box Visualization,Google Gemma,Morphological Transformation,Perception Encoder Embedding Model,Object Detection Model,Cosmos 3,Motion Detection,OpenAI,Webhook Sink,VLM As Detector,Path Deviation,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Single-Label Classification Model,SAM 3,Line Counter,Roboflow Dataset Upload,OpenAI,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,Cache Set,SAM3 Video Tracker,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Qwen 3.6 API,Detections Stitch,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Anthropic Claude,Anthropic Claude,Roboflow Visual Search Classifier,VLM As Detector,SAM 3,PTZ Tracking (ONVIF),Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Local File Sink,Text Display,Roboflow Asset Library Attributes,LMM,Image Threshold,Image Blur,Color Visualization,Corner Visualization,JSON Parser,S3 Sink,MQTT Writer,Qwen-VL,Instance Segmentation Model,CLIP Embedding Model,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,Detections Consensus,Nearest Neighbor Detection Match,Stitch OCR Detections,Google Gemini,Time in Zone,Auto Rotate on Edges,VLM As Classifier,Instance Segmentation Model,Twilio SMS Notification,Trace Visualization,Perspective Correction,Seg Preview,Google Gemma API,PLC EthernetIP,Object Detection Model,Instance Segmentation Model,MoonshotAI Kimi,Distance Measurement,Twilio SMS/MMS Notification,Path Deviation,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Moondream2,Clip Comparison,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Keypoint Detection Model,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Heatmap Visualization,Roboflow Vision Events,Line Counter,Llama 3.2 Vision,YOLO-World Model,OpenAI-Compatible LLM,Label Visualization,Time in Zone,Background Color Visualization,Keypoint Detection Model,PLC Reader,Buffer,Model Comparison Visualization,Keypoint Detection Model,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
OpenAI in version v4 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the OpenAI model.classes(list_of_values): List of classes to be used.api_key(Union[string,secret,ROBOFLOW_MANAGED_KEY]): Your OpenAI API key.model_version(string): Model to be used.reasoning_effort(string): Controls reasoning. Reducing can result in faster responses and fewer tokens. GPT-5.1 and higher models default to 'none' (no reasoning) and support 'none', 'low', 'medium', 'high'. GPT-5.2 also supports 'xhigh'. GPT-5 models default to 'medium' and support 'minimal', 'low', 'medium', 'high'..image_detail(string): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..temperature(float): Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are..
-
output
output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.classes(list_of_values): List of values of any type.
Example JSON definition of step OpenAI in version v4
{
"name": "<your_step_name_here>",
"type": "roboflow_core/open_ai@v4",
"images": "$inputs.image",
"task_type": "<block_does_not_provide_example>",
"prompt": "my prompt",
"output_structure": {
"my_key": "description"
},
"classes": [
"class-a",
"class-b"
],
"api_key": "xxx-xxx",
"model_version": "gpt-5.1",
"reasoning_effort": "<block_does_not_provide_example>",
"image_detail": "auto",
"max_tokens": "<block_does_not_provide_example>",
"temperature": "<block_does_not_provide_example>",
"max_concurrent_requests": "<block_does_not_provide_example>"
}
v3¶
Class: OpenAIBlockV3 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.openai.v3.OpenAIBlockV3
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Ask a question to OpenAI's GPT models with vision capabilities (including GPT-5 and GPT-4o).
You can specify arbitrary text prompts or predefined ones, the block supports the following types of prompt:
-
Open Prompt (
unconstrained) - Use any prompt to generate a raw response -
Text Recognition (OCR) (
ocr) - Model recognizes text in the image -
Visual Question Answering (
visual-question-answering) - Model answers the question you submit in the prompt -
Captioning (short) (
caption) - Model provides a short description of the image -
Captioning (
detailed-caption) - Model provides a long description of the image -
Single-Label Classification (
classification) - Model classifies the image content as one of the provided classes -
Multi-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classes -
Structured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
Provide your OpenAI API key or set the value to rf_key:account (or
rf_key:user:<id>) to proxy requests through Roboflow's API.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/open_ai@v3to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
task_type |
str |
Task type to be performed by model. Value determines required parameters and output response.. | ❌ |
prompt |
str |
Text prompt to the OpenAI model. | ✅ |
output_structure |
Dict[str, str] |
Dictionary with structure of expected JSON response. | ❌ |
classes |
List[str] |
List of classes to be used. | ✅ |
api_key |
str |
Your OpenAI API key. | ✅ |
model_version |
str |
Model to be used. | ✅ |
image_detail |
str |
Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity.. | ✅ |
max_tokens |
int |
Maximum number of tokens the model can generate in it's response.. | ❌ |
temperature |
float |
Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are.. | ✅ |
max_concurrent_requests |
int |
Number of concurrent requests that can be executed by block when batch of input images provided. If not given - block defaults to value configured globally in Workflows Execution Engine. Please restrict if you hit OpenAI limits.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to OpenAI in version v3.
- inputs:
Crop Visualization,Image Slicer,Roboflow Dataset Upload,Google Gemini,Classification Label Visualization,Dynamic Crop,Image Slicer,Absolute Static Crop,Current Time,Roboflow Custom Metadata,Multi-Label Classification Model,SIFT Comparison,Morphological Transformation,Background Subtraction,Line Counter Visualization,Ellipse Visualization,OpenAI,MoonshotAI Kimi,Grid Visualization,PLC ModbusTCP,Bounding Box Visualization,Morphological Transformation,Google Gemma,Cosmos 3,Motion Detection,OpenAI,Cosine Similarity,Webhook Sink,VLM As Detector,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Stitch Images,Roboflow Dataset Upload,OpenAI,Camera Calibration,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Pixelate Visualization,Qwen 3.6 API,PLC Writer,CSV Formatter,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Relative Static Crop,Anthropic Claude,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,OCR Model,GeoTag Detection,Qwen 3.5 API,Halo Visualization,OpenRouter,Local File Sink,Text Display,Roboflow Asset Library Attributes,Image Threshold,Image Blur,LMM,Color Visualization,Gaze Detection,Corner Visualization,S3 Sink,MQTT Writer,Qwen-VL,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,SIFT,Stitch OCR Detections,Auto Rotate on Edges,Google Gemini,Instance Segmentation Model,Dimension Collapse,Twilio SMS Notification,Trace Visualization,Single-Label Classification Model,Perspective Correction,Camera Focus,EasyOCR,Google Gemma API,PLC EthernetIP,MoonshotAI Kimi,Twilio SMS/MMS Notification,Blur Visualization,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Image Convert Grayscale,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Clip Comparison,Dynamic Zone,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Contrast Enhancement,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Llama 3.2 Vision,OpenAI-Compatible LLM,Label Visualization,Background Color Visualization,Keypoint Detection Model,Buffer,Model Comparison Visualization,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude,Identify Changes - outputs:
Crop Visualization,Roboflow Dataset Upload,Instance Segmentation Model,Google Gemini,Classification Label Visualization,Dynamic Crop,Time in Zone,Detections Classes Replacement,Cache Get,Current Time,Pixel Color Count,Roboflow Custom Metadata,SIFT Comparison,Morphological Transformation,Line Counter Visualization,OpenAI,MoonshotAI Kimi,Multi-Label Classification Model,Ellipse Visualization,SAM 3,Grid Visualization,Segment Anything 2 Model,Semantic Segmentation Model,Bounding Box Visualization,Google Gemma,Morphological Transformation,Perception Encoder Embedding Model,Object Detection Model,Cosmos 3,Motion Detection,OpenAI,Webhook Sink,VLM As Detector,Path Deviation,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Single-Label Classification Model,SAM 3,Line Counter,Roboflow Dataset Upload,OpenAI,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,Cache Set,SAM3 Video Tracker,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Qwen 3.6 API,Detections Stitch,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Anthropic Claude,Anthropic Claude,Roboflow Visual Search Classifier,VLM As Detector,SAM 3,PTZ Tracking (ONVIF),Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Local File Sink,Text Display,Roboflow Asset Library Attributes,LMM,Image Threshold,Image Blur,Color Visualization,Corner Visualization,JSON Parser,S3 Sink,MQTT Writer,Qwen-VL,Instance Segmentation Model,CLIP Embedding Model,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,Detections Consensus,Nearest Neighbor Detection Match,Stitch OCR Detections,Google Gemini,Time in Zone,Auto Rotate on Edges,VLM As Classifier,Instance Segmentation Model,Twilio SMS Notification,Trace Visualization,Perspective Correction,Seg Preview,Google Gemma API,PLC EthernetIP,Object Detection Model,Instance Segmentation Model,MoonshotAI Kimi,Distance Measurement,Twilio SMS/MMS Notification,Path Deviation,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Moondream2,Clip Comparison,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Keypoint Detection Model,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Heatmap Visualization,Roboflow Vision Events,Line Counter,Llama 3.2 Vision,YOLO-World Model,OpenAI-Compatible LLM,Label Visualization,Time in Zone,Background Color Visualization,Keypoint Detection Model,PLC Reader,Buffer,Model Comparison Visualization,Keypoint Detection Model,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
OpenAI in version v3 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the OpenAI model.classes(list_of_values): List of classes to be used.api_key(Union[string,secret,ROBOFLOW_MANAGED_KEY]): Your OpenAI API key.model_version(string): Model to be used.image_detail(string): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..temperature(float): Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are..
-
output
output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.classes(list_of_values): List of values of any type.
Example JSON definition of step OpenAI in version v3
{
"name": "<your_step_name_here>",
"type": "roboflow_core/open_ai@v3",
"images": "$inputs.image",
"task_type": "<block_does_not_provide_example>",
"prompt": "my prompt",
"output_structure": {
"my_key": "description"
},
"classes": [
"class-a",
"class-b"
],
"api_key": "xxx-xxx",
"model_version": "gpt-5",
"image_detail": "auto",
"max_tokens": "<block_does_not_provide_example>",
"temperature": "<block_does_not_provide_example>",
"max_concurrent_requests": "<block_does_not_provide_example>"
}
v2¶
Class: OpenAIBlockV2 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.openai.v2.OpenAIBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Ask a question to OpenAI's GPT models with vision capabilities (including GPT-4o and GPT-5).
You can specify arbitrary text prompts or predefined ones, the block supports the following types of prompt:
-
Open Prompt (
unconstrained) - Use any prompt to generate a raw response -
Text Recognition (OCR) (
ocr) - Model recognizes text in the image -
Visual Question Answering (
visual-question-answering) - Model answers the question you submit in the prompt -
Captioning (short) (
caption) - Model provides a short description of the image -
Captioning (
detailed-caption) - Model provides a long description of the image -
Single-Label Classification (
classification) - Model classifies the image content as one of the provided classes -
Multi-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classes -
Structured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
You need to provide your OpenAI API key to use the GPT-4 with Vision model.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/open_ai@v2to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
task_type |
str |
Task type to be performed by model. Value determines required parameters and output response.. | ❌ |
prompt |
str |
Text prompt to the OpenAI model. | ✅ |
output_structure |
Dict[str, str] |
Dictionary with structure of expected JSON response. | ❌ |
classes |
List[str] |
List of classes to be used. | ✅ |
api_key |
str |
Your OpenAI API key. | ✅ |
model_version |
str |
Model to be used. | ✅ |
image_detail |
str |
Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity.. | ✅ |
max_tokens |
int |
Maximum number of tokens the model can generate in it's response.. | ❌ |
temperature |
float |
Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are.. | ✅ |
max_concurrent_requests |
int |
Number of concurrent requests that can be executed by block when batch of input images provided. If not given - block defaults to value configured globally in Workflows Execution Engine. Please restrict if you hit OpenAI limits.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to OpenAI in version v2.
- inputs:
Crop Visualization,Image Slicer,Roboflow Dataset Upload,Google Gemini,Classification Label Visualization,Dynamic Crop,Image Slicer,Absolute Static Crop,Current Time,Roboflow Custom Metadata,Multi-Label Classification Model,SIFT Comparison,Morphological Transformation,Background Subtraction,Line Counter Visualization,Ellipse Visualization,OpenAI,MoonshotAI Kimi,Grid Visualization,PLC ModbusTCP,Bounding Box Visualization,Morphological Transformation,Google Gemma,Cosmos 3,Motion Detection,OpenAI,Cosine Similarity,Webhook Sink,VLM As Detector,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Stitch Images,Roboflow Dataset Upload,OpenAI,Camera Calibration,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Pixelate Visualization,Qwen 3.6 API,PLC Writer,CSV Formatter,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Relative Static Crop,Anthropic Claude,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,OCR Model,GeoTag Detection,Qwen 3.5 API,Halo Visualization,OpenRouter,Local File Sink,Text Display,Roboflow Asset Library Attributes,Image Threshold,Image Blur,LMM,Color Visualization,Gaze Detection,Corner Visualization,S3 Sink,MQTT Writer,Qwen-VL,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,SIFT,Stitch OCR Detections,Auto Rotate on Edges,Google Gemini,Instance Segmentation Model,Dimension Collapse,Twilio SMS Notification,Trace Visualization,Single-Label Classification Model,Perspective Correction,Camera Focus,EasyOCR,Google Gemma API,PLC EthernetIP,MoonshotAI Kimi,Twilio SMS/MMS Notification,Blur Visualization,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Image Convert Grayscale,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Clip Comparison,Dynamic Zone,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Contrast Enhancement,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Llama 3.2 Vision,OpenAI-Compatible LLM,Label Visualization,Background Color Visualization,Keypoint Detection Model,Buffer,Model Comparison Visualization,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude,Identify Changes - outputs:
Crop Visualization,Roboflow Dataset Upload,Instance Segmentation Model,Google Gemini,Classification Label Visualization,Dynamic Crop,Time in Zone,Detections Classes Replacement,Cache Get,Current Time,Pixel Color Count,Roboflow Custom Metadata,SIFT Comparison,Morphological Transformation,Line Counter Visualization,OpenAI,MoonshotAI Kimi,Multi-Label Classification Model,Ellipse Visualization,SAM 3,Grid Visualization,Segment Anything 2 Model,Semantic Segmentation Model,Bounding Box Visualization,Google Gemma,Morphological Transformation,Perception Encoder Embedding Model,Object Detection Model,Cosmos 3,Motion Detection,OpenAI,Webhook Sink,VLM As Detector,Path Deviation,Size Measurement,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Single-Label Classification Model,SAM 3,Line Counter,Roboflow Dataset Upload,OpenAI,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,Cache Set,SAM3 Video Tracker,VLM As Classifier,Detections List Roll-Up,Clip Comparison,Qwen 3.6 API,Detections Stitch,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Anthropic Claude,Anthropic Claude,Roboflow Visual Search Classifier,VLM As Detector,SAM 3,PTZ Tracking (ONVIF),Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Local File Sink,Text Display,Roboflow Asset Library Attributes,LMM,Image Threshold,Image Blur,Color Visualization,Corner Visualization,JSON Parser,S3 Sink,MQTT Writer,Qwen-VL,Instance Segmentation Model,CLIP Embedding Model,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,Detections Consensus,Nearest Neighbor Detection Match,Stitch OCR Detections,Google Gemini,Time in Zone,Auto Rotate on Edges,VLM As Classifier,Instance Segmentation Model,Twilio SMS Notification,Trace Visualization,Perspective Correction,Seg Preview,Google Gemma API,PLC EthernetIP,Object Detection Model,Instance Segmentation Model,MoonshotAI Kimi,Distance Measurement,Twilio SMS/MMS Notification,Path Deviation,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Moondream2,Clip Comparison,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Keypoint Detection Model,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Heatmap Visualization,Roboflow Vision Events,Line Counter,Llama 3.2 Vision,YOLO-World Model,OpenAI-Compatible LLM,Label Visualization,Time in Zone,Background Color Visualization,Keypoint Detection Model,PLC Reader,Buffer,Model Comparison Visualization,Keypoint Detection Model,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
OpenAI in version v2 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the OpenAI model.classes(list_of_values): List of classes to be used.api_key(Union[string,secret]): Your OpenAI API key.model_version(string): Model to be used.image_detail(string): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..temperature(float): Temperature to sample from the model - value in range 0.0-2.0, the higher - the more random / "creative" the generations are..
-
output
output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.classes(list_of_values): List of values of any type.
Example JSON definition of step OpenAI in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/open_ai@v2",
"images": "$inputs.image",
"task_type": "<block_does_not_provide_example>",
"prompt": "my prompt",
"output_structure": {
"my_key": "description"
},
"classes": [
"class-a",
"class-b"
],
"api_key": "xxx-xxx",
"model_version": "gpt-4o",
"image_detail": "auto",
"max_tokens": "<block_does_not_provide_example>",
"temperature": "<block_does_not_provide_example>",
"max_concurrent_requests": "<block_does_not_provide_example>"
}
v1¶
Class: OpenAIBlockV1 (there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.openai.v1.OpenAIBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Ask a question to OpenAI's GPT-4 with Vision model.
You can specify arbitrary text prompts to the OpenAIBlock.
You need to provide your OpenAI API key to use the GPT-4 with Vision model.
This model was previously part of the LMM block.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/open_ai@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
prompt |
str |
Text prompt to the OpenAI model. | ✅ |
openai_api_key |
str |
Your OpenAI API key. | ✅ |
openai_model |
str |
Model to be used. | ✅ |
json_output_format |
Dict[str, str] |
Holds dictionary that maps name of requested output field into its description. | ❌ |
image_detail |
str |
Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity.. | ✅ |
max_tokens |
int |
Maximum number of tokens the model can generate in it's response.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to OpenAI in version v1.
- inputs:
Crop Visualization,Image Slicer,Roboflow Dataset Upload,Google Gemini,Classification Label Visualization,Dynamic Crop,Image Slicer,Absolute Static Crop,Current Time,Roboflow Custom Metadata,Multi-Label Classification Model,SIFT Comparison,Morphological Transformation,Background Subtraction,Line Counter Visualization,Ellipse Visualization,OpenAI,MoonshotAI Kimi,Grid Visualization,Bounding Box Visualization,Morphological Transformation,Google Gemma,Cosmos 3,OpenAI,Webhook Sink,VLM As Detector,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Stitch Images,Roboflow Dataset Upload,OpenAI,Camera Calibration,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,VLM As Classifier,Pixelate Visualization,Qwen 3.6 API,PLC Writer,CSV Formatter,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Relative Static Crop,Anthropic Claude,PP-OCR,Anthropic Claude,Roboflow Visual Search Classifier,OCR Model,Qwen 3.5 API,Halo Visualization,OpenRouter,Local File Sink,Text Display,Roboflow Asset Library Attributes,Image Threshold,Image Blur,LMM,Color Visualization,Corner Visualization,S3 Sink,MQTT Writer,Qwen-VL,Google Gemini,Stitch OCR Detections,Slack Notification,Event Writer,SIFT,Stitch OCR Detections,Auto Rotate on Edges,Google Gemini,Instance Segmentation Model,Twilio SMS Notification,Trace Visualization,Single-Label Classification Model,Perspective Correction,Camera Focus,EasyOCR,Google Gemma API,MoonshotAI Kimi,Twilio SMS/MMS Notification,Blur Visualization,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Image Convert Grayscale,Microsoft SQL Server Sink,Florence-2 Model,Qwen3.5-VL,Clip Comparison,Mask Visualization,Reference Path Visualization,Email Notification,Polygon Visualization,Roboflow Visual Search,Halo Visualization,Contrast Enhancement,Llama 3.2 Vision,GLM-OCR,CogVLM,Circle Visualization,Image Contours,Camera Focus,Heatmap Visualization,Roboflow Vision Events,Llama 3.2 Vision,OpenAI-Compatible LLM,Label Visualization,Background Color Visualization,Keypoint Detection Model,Model Comparison Visualization,LMM For Classification,Object Detection Model,Email Notification,Anthropic Claude - outputs:
Crop Visualization,Image Slicer,ByteTrack Tracker,Google Gemini,SAM 3 Interactive,Time in Zone,Velocity,Image Slicer,Template Matching,Pixel Color Count,Multi-Label Classification Model,SIFT Comparison,Mask Area Measurement,Morphological Transformation,Background Subtraction,BoT-SORT Tracker,Ellipse Visualization,MoonshotAI Kimi,Multi-Label Classification Model,SAM 3,Grid Visualization,PLC ModbusTCP,Semantic Segmentation Model,Google Gemma,Byte Tracker,Overlap Filter,OpenAI,Multi-Label Classification Model,Path Deviation,Depth Estimation,Image Preprocessing,OPC UA Writer Sink,Detections Stabilizer,QR Code Detection,Stitch Images,Google Vision OCR,OpenAI,QR Code Generator,Florence-2 Model,Polygon Zone Visualization,Contrast Equalization,Cache Set,Detection Offset,VLM As Classifier,Clip Comparison,Pixelate Visualization,SORT Tracker,Qwen 3.6 API,Dot Visualization,Stability AI Outpainting,Keypoint Visualization,Byte Tracker,Anthropic Claude,PP-OCR,Anthropic Claude,Image Stack,Roboflow Visual Search Classifier,PTZ Tracking (ONVIF),Semantic Segmentation Model,Image Threshold,First Non Empty Or Default,JSON Parser,S3 Sink,MQTT Writer,Qwen-VL,CLIP Embedding Model,Stitch OCR Detections,Detections Consensus,SIFT,Nearest Neighbor Detection Match,Stitch OCR Detections,Auto Rotate on Edges,Time in Zone,VLM As Classifier,Instance Segmentation Model,Dimension Collapse,Trace Visualization,Seg Preview,EasyOCR,Camera Focus,Google Gemma API,PLC EthernetIP,Property Definition,OC-SORT Tracker,MoonshotAI Kimi,Distance Measurement,Data Aggregator,Path Deviation,Blur Visualization,Image Convert Grayscale,Microsoft SQL Server Sink,Barcode Detection,Moondream2,Clip Comparison,Dynamic Zone,Reference Path Visualization,Email Notification,Roboflow Visual Search,Rate Limiter,Keypoint Detection Model,Contrast Enhancement,GLM-OCR,Byte Tracker,Camera Focus,Heatmap Visualization,Roboflow Vision Events,OpenAI-Compatible LLM,Qwen2.5-VL,Label Visualization,Buffer,Single-Label Classification Model,Keypoint Detection Model,Detections Merge,Line Counter,Detections Filter,Anthropic Claude,Detection Event Log,Roboflow Dataset Upload,Instance Segmentation Model,Classification Label Visualization,Mask Edge Snap,Dynamic Crop,Per-Class Confidence Filter,Detections Transformation,Absolute Static Crop,Detections Classes Replacement,Overlap Analysis,Cache Get,Current Time,Expression,Roboflow Custom Metadata,Line Counter Visualization,OpenAI,Segment Anything 2 Model,Bounding Box Visualization,Morphological Transformation,Perception Encoder Embedding Model,Object Detection Model,Cosmos 3,Motion Detection,Cosine Similarity,Webhook Sink,VLM As Detector,Size Measurement,Bounding Rectangle,Single-Label Classification Model,SAM 3,Roboflow Dataset Upload,OpenAI,SAM2 Video Tracker,Qwen3.5,Camera Calibration,Qwen3-VL,SAM3 Video Tracker,Detections List Roll-Up,PLC Writer,CSV Formatter,Detections Stitch,Track Class Lock,Triangle Visualization,Stability AI Image Generation,Icon Visualization,Relative Static Crop,VLM As Detector,OCR Model,SAM 3,GeoTag Detection,Qwen 3.5 API,Halo Visualization,OpenRouter,Frame Delay,Local File Sink,Text Display,Roboflow Asset Library Attributes,LMM,Image Blur,Gaze Detection,Color Visualization,Inner Workflow,Corner Visualization,Continue If,Instance Segmentation Model,Google Gemini,Slack Notification,Event Writer,Identify Outliers,Google Gemini,Twilio SMS Notification,Single-Label Classification Model,Perspective Correction,Object Detection Model,Instance Segmentation Model,Twilio SMS/MMS Notification,Polygon Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Florence-2 Model,Qwen3.5-VL,Dominant Color,Delta Filter,Mask Visualization,Polygon Visualization,SIFT Comparison,Switch Case,Halo Visualization,SmolVLM2,Llama 3.2 Vision,Detections Combine,CogVLM,Circle Visualization,Image Contours,Line Counter,Llama 3.2 Vision,YOLO-World Model,Time in Zone,Background Color Visualization,Keypoint Detection Model,PLC Reader,Model Comparison Visualization,LMM For Classification,Object Detection Model,Email Notification,Identify Changes
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
OpenAI in version v1 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Text prompt to the OpenAI model.openai_api_key(Union[string,secret]): Your OpenAI API key.openai_model(string): Model to be used.image_detail(string): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..
-
output
parent_id(parent_id): Identifier of parent for step output.root_parent_id(parent_id): Identifier of parent for step output.image(image_metadata): Dictionary with image metadata required by supervision.structured_output(dictionary): Dictionary.raw_output(string): String value.*(*): Equivalent of any element.
Example JSON definition of step OpenAI in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/open_ai@v1",
"images": "$inputs.image",
"prompt": "my prompt",
"openai_api_key": "xxx-xxx",
"openai_model": "gpt-4o",
"json_output_format": {
"count": "number of cats in the picture"
},
"image_detail": "auto",
"max_tokens": 450
}