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

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

  • Instance Segmentation (instance-segmentation) - Model segments every instance of the provided classes and returns a polygon outline per instance

  • Structured 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": [...]} with box_2d boxes in [x_min, y_min, x_max, y_max] format (absolute pixel coordinates of the uploaded image) and a label key, enforced via structured outputs.

  • GPT-5.1/GPT-5 generation models return the legacy normalized dict (x_min/y_min/x_max/y_max in 0.0-1.0 with class_name and confidence).

  • GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of box_2d entries 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:

  • predictions holds object detections for the object-detection task, RLE-masked detections for the instance-segmentation task and a classification prediction for the classification / multi-label-classification tasks - the kind of the output follows the selected task type.

  • predictions is None for every other task (unconstrained prompting, OCR, captioning, structured answering, visual question answering).

  • error_status is True when the answer could not be decoded.

  • inference_id is 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.

Input and output 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.

    • output_classes (list_of_values): 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 (Union[ROBOFLOW_MANAGED_KEY, secret, string]): 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. 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 (string): 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..

    • 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 (string): 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..

  • output

Example JSON definition

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

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": [...]} with box_2d boxes in [x_min, y_min, x_max, y_max] format (absolute pixel coordinates of the uploaded image) and a label key, enforced via structured outputs.

  • GPT-5.1/GPT-5 generation models return the legacy normalized dict (x_min/y_min/x_max/y_max in 0.0-1.0 with class_name and confidence).

  • GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of box_2d entries 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.

Input and output 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[ROBOFLOW_MANAGED_KEY, secret, string]): 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. 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 (string): 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..

    • 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

Example JSON definition

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

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": [...]} with box_2d boxes in [x_min, y_min, x_max, y_max] format (absolute pixel coordinates of the uploaded image) and a label key, enforced via structured outputs.

  • GPT-5.1/GPT-5 generation models return the legacy normalized dict (x_min/y_min/x_max/y_max in 0.0-1.0 with class_name and confidence).

  • GPT-4.x/GPT-4o and nano-tier models return a plain JSON list of box_2d entries 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.

Input and output 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[ROBOFLOW_MANAGED_KEY, secret, string]): 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. Not applied to the object-detection task, which always sends the image without the detail hint..

    • 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

Example JSON definition

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 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@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.

Input and output 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[ROBOFLOW_MANAGED_KEY, secret, string]): 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

Example JSON definition

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 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@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.

Input and output 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[ROBOFLOW_MANAGED_KEY, secret, string]): 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

Example JSON definition

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 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@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.

Input and output 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[secret, string]): 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

Example JSON definition

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.

Input and output bindings
  • input

    • images (image): The image to infer on..

    • prompt (string): Text prompt to the OpenAI model.

    • openai_api_key (Union[secret, string]): 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

Last updated

Was this helpful?