OpenAI
Run OpenAI's GPT models with vision capabilities.
v7
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageInstance Segmentation (
instance-segmentation) - Model segments every instance of the provided classes and returns a polygon outline per instanceStructured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
The object-detection task uses a per-model prompt contract selected from a large-scale benchmark; the block decodes every one of them into predictions:
Most models (GPT-5.2 and newer, plus unknown/future models) return
{"detections": [...]}withbox_2dboxes in[x_min, y_min, x_max, y_max]format (absolute pixel coordinates of the uploaded image) and alabelkey, enforced via structured outputs.GPT-5.1/GPT-5 generation models return the legacy normalized dict (
x_min/y_min/x_max/y_maxin 0.0-1.0 withclass_nameandconfidence).GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of
box_2dentries in absolute pixel coordinates.
The absolute-coordinate formats do not provide confidence scores, so decoded detections are assigned a confidence of 1.0 and downstream confidence filtering is not meaningful for these formats.
Images are downscaled so that their longest edge does not exceed 2048px and are sent as lossless PNG for this task.
For object detection and instance segmentation, optional output_classes separate the stable output vocabulary from the visual prompts in classes. The two lists are paired by position. Structured-output models constrain the returned label to output_classes, and decoded predictions use those stable labels. Omitting output_classes preserves the original classes contract.
The instance-segmentation task asks for one outline polygon per instance of the requested classes - a flat [x1, y1, x2, y2, ...] vertex list in absolute pixel coordinates of the uploaded image, enforced via structured outputs - and decodes it into RLE-masked predictions (rle_instance_segmentation_prediction, also declared as instance_segmentation_prediction; consumers decode the RLE lazily, so no dense mask is held however many instances come back). The image is sent at its original resolution as JPEG for this task, since downscaling the upload measurably hurt mask quality. Unless a model_version is set explicitly, this task runs on gpt-6-astra, the model it was benchmarked with. Like the absolute-coordinate detection formats, it provides no confidence scores (1.0 is assigned).
Version Differences
This version (v7) decodes the model answer inside the block, adding predictions, error_status and inference_id outputs next to the raw output string:
predictionsholds object detections for theobject-detectiontask, RLE-masked detections for theinstance-segmentationtask and a classification prediction for theclassification/multi-label-classificationtasks - the kind of the output follows the selected task type.predictionsisNonefor every other task (unconstrained prompting, OCR, captioning, structured answering, visual question answering).error_statusisTruewhen the answer could not be decoded.inference_idis generated per image.
Separate roboflow_core/vlm_as_detector@v2 and roboflow_core/vlm_as_classifier@v2 steps are no longer needed.
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@v7 to add the block as a 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.
✅
output_classes
List[str]
Optional stable output labels paired by position with classes. When set for detection or segmentation, classes remain the visual prompts while model output and decoded predictions use these labels..
✅
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. Supported values differ per model (see the model dropdown): the GPT-5.6 family supports 'none' through 'max' (default 'medium'), GPT-5.5/5.4/5.2 support 'none' through 'xhigh', GPT-5.1 supports 'none' through 'high' (default 'none'), and GPT-5 models support 'minimal' through 'high' (default 'medium'). When unset, the OpenAI default for the selected model is 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. Not applied to the object-detection task, which always sends the image without the detail hint. For instance-segmentation, 'high' is worth the tokens on images with small objects..
✅
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..
✅
service_tier
str
OpenAI processing tier for the request: 'flex' is slower and cheaper, 'priority' and 'ultrafast' are faster and cost more. When unset, OpenAI's default tier is used. With a Roboflow-managed key (rf_key:), Roboflow decides which tiers the workspace may use..
✅
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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v7 has.
v6
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageStructured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
The object-detection task uses a per-model prompt contract selected from a large-scale benchmark - use roboflow_core/vlm_as_detector@v2 to convert any of the outputs into predictions:
Most models (GPT-5.2 and newer, plus unknown/future models) return
{"detections": [...]}withbox_2dboxes in[x_min, y_min, x_max, y_max]format (absolute pixel coordinates of the uploaded image) and alabelkey, enforced via structured outputs.GPT-5.1/GPT-5 generation models return the legacy normalized dict (
x_min/y_min/x_max/y_maxin 0.0-1.0 withclass_nameandconfidence).GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of
box_2dentries in absolute pixel coordinates.
The absolute-coordinate formats do not provide confidence scores. roboflow_core/vlm_as_detector@v2 assigns these detections a confidence of 1.0, so downstream confidence filtering is not meaningful for these formats.
Images are downscaled so that their longest edge does not exceed 2048px and are sent as lossless PNG for this task.
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@v6 to add the block as a 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. Supported values differ per model (see the model dropdown): the GPT-5.6 family supports 'none' through 'max' (default 'medium'), GPT-5.5/5.4/5.2 support 'none' through 'xhigh', GPT-5.1 supports 'none' through 'high' (default 'none'), and GPT-5 models support 'minimal' through 'high' (default 'medium'). When unset, the OpenAI default for the selected model is 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. Not applied to the object-detection task, which always sends the image without the detail hint..
✅
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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v6 has.
v5
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageStructured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
The object-detection task uses a per-model prompt contract selected from a large-scale benchmark - use roboflow_core/vlm_as_detector@v2 to convert any of the outputs into predictions:
Most models (GPT-5.2 and newer, plus unknown/future models) return
{"detections": [...]}withbox_2dboxes in[x_min, y_min, x_max, y_max]format (absolute pixel coordinates of the uploaded image) and alabelkey, enforced via structured outputs.GPT-5.1/GPT-5 generation models return the legacy normalized dict (
x_min/y_min/x_max/y_maxin 0.0-1.0 withclass_nameandconfidence).GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of
box_2dentries in absolute pixel coordinates.
The absolute-coordinate formats do not provide confidence scores. roboflow_core/vlm_as_detector@v2 assigns these detections a confidence of 1.0, so downstream confidence filtering is not meaningful for these formats.
Images are downscaled so that their longest edge does not exceed 2048px and are sent as lossless PNG for this task.
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@v5 to add the block as a 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. Not applied to the object-detection task, which always sends the image without the detail hint..
✅
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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v5 has.
v4
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageStructured 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@v4 to add the block as a 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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v4 has.
v3
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesStructured 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@v3 to add the block as a 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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v3 has.
v2
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 responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesStructured 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@v2 to add the block as a 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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v2 has.
v1
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@v1 to add the block as a 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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI in version v1 has.
Last updated
Was this helpful?