> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/blocks/blocks/run-a-model/open-ai.md).

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `output_classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/roboflow-managed-key.md)*,* [*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `reasoning_effort` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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
  * `output` (*Union\[*[*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.
  * `input_tokens` ([`integer`](/workflows/developer-guide/developer-guide/kinds/integer.md)): Integer value.
  * `output_tokens` ([`integer`](/workflows/developer-guide/developer-guide/kinds/integer.md)): Integer value.
  * `predictions` (*Union\[*[*`object_detection_prediction`*](/workflows/developer-guide/developer-guide/kinds/object-detection-prediction.md)*,* [*`rle_instance_segmentation_prediction`*](/workflows/developer-guide/developer-guide/kinds/rle-instance-segmentation-prediction.md)*,* [*`instance_segmentation_prediction`*](/workflows/developer-guide/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`classification_prediction`*](/workflows/developer-guide/developer-guide/kinds/classification-prediction.md)*]*): Prediction with detected bounding boxes in form of sv.Detections(...) object if `object_detection_prediction` or Prediction with detected bounding boxes and RLE-encoded segmentation masks in form of sv.Detections(...) object if `rle_instance_segmentation_prediction` or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object if `instance_segmentation_prediction` or Predictions from classifier if `classification_prediction`.
  * `error_status` ([`boolean`](/workflows/developer-guide/developer-guide/kinds/boolean.md)): Boolean flag.
  * `inference_id` ([`inference_id`](/workflows/developer-guide/developer-guide/kinds/inference-id.md)): Inference identifier.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/open_ai@v7",
	    "images": "$inputs.image",
	    "task_type": "<block_does_not_provide_example>",
	    "prompt": "my prompt",
	    "output_structure": {
	        "my_key": "description"
	    },
	    "classes": [
	        "class-a",
	        "class-b"
	    ],
	    "output_classes": [
	        "cat",
	        "dog"
	    ],
	    "api_key": "xxx-xxx",
	    "model_version": "gpt-6.1-sol",
	    "reasoning_effort": "<block_does_not_provide_example>",
	    "image_detail": "auto",
	    "max_tokens": "<block_does_not_provide_example>",
	    "temperature": "<block_does_not_provide_example>",
	    "service_tier": "flex",
	    "max_concurrent_requests": "<block_does_not_provide_example>"
	}
```

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `api_key` (*Union\[*[*`ROBOFLOW_MANAGED_KEY`*](/workflows/developer-guide/developer-guide/kinds/roboflow-managed-key.md)*,* [*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `reasoning_effort` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.
  * `input_tokens` ([`integer`](/workflows/developer-guide/developer-guide/kinds/integer.md)): Integer value.
  * `output_tokens` ([`integer`](/workflows/developer-guide/developer-guide/kinds/integer.md)): Integer value.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/open_ai@v6",
	    "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>"
	}
```

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `api_key` (*Union\[*[*`ROBOFLOW_MANAGED_KEY`*](/workflows/developer-guide/developer-guide/kinds/roboflow-managed-key.md)*,* [*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `reasoning_effort` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/open_ai@v5",
	    "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>"
	}
```

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `api_key` (*Union\[*[*`ROBOFLOW_MANAGED_KEY`*](/workflows/developer-guide/developer-guide/kinds/roboflow-managed-key.md)*,* [*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `reasoning_effort` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..
  * `temperature` ([*`float`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.

</details>

<details>

<summary>Example JSON definition</summary>

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

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `api_key` (*Union\[*[*`ROBOFLOW_MANAGED_KEY`*](/workflows/developer-guide/developer-guide/kinds/roboflow-managed-key.md)*,* [*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `image_detail` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..
  * `temperature` ([*`float`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.

</details>

<details>

<summary>Example JSON definition</summary>

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

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `classes` ([*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of classes to be used.
  * `api_key` (*Union\[*[*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `model_version` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `image_detail` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Indicates the image's quality, with 'high' suggesting it is of high resolution and should be processed or displayed with high fidelity..
  * `temperature` ([*`float`*](/workflows/developer-guide/developer-guide/kinds/float.md)): 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`*](/workflows/developer-guide/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/developer-guide/developer-guide/kinds/language-model-output.md)*]*): String value if `string` or LLM / VLM output if `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)): List of values of any type.

</details>

<details>

<summary>Example JSON definition</summary>

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

</details>

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

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `prompt` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Text prompt to the OpenAI model.
  * `openai_api_key` (*Union\[*[*`secret`*](/workflows/developer-guide/developer-guide/kinds/secret.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): Your OpenAI API key.
  * `openai_model` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): Model to be used.
  * `image_detail` ([*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)): 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`](/workflows/developer-guide/developer-guide/kinds/parent-id.md)): Identifier of parent for step output.
  * `root_parent_id` ([`parent_id`](/workflows/developer-guide/developer-guide/kinds/parent-id.md)): Identifier of parent for step output.
  * `image` ([`image_metadata`](/workflows/developer-guide/developer-guide/kinds/image-metadata.md)): Dictionary with image metadata required by supervision.
  * `structured_output` ([`dictionary`](/workflows/developer-guide/developer-guide/kinds/dictionary.md)): Dictionary.
  * `raw_output` ([`string`](/workflows/developer-guide/developer-guide/kinds/string.md)): String value.
  * `*` ([`*`](/workflows/developer-guide/developer-guide/kinds/wildcard.md)): Equivalent of any element.

</details>

<details>

<summary>Example JSON definition</summary>

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

</details>
