OpenAI - GPT-4o Vision
Invoke OpenAI GPT-4o (Omni) via the Chat Completions API for image understanding, vision-based OCR, and visual reasoning over diagrams and charts.
Sends one image and a prompt to a vision-capable LLM provider registered in Sommatic AI and returns the model's text. The call goes through the Sommatic AI backend, which resolves the provider and its secret.
Routes through the backend POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke endpoint using an llm_provider_id registered in the cognitive-assets registry. Billing is handled directly by OpenAI or Azure OpenAI against your subscription. Compatible with any GPT-4 class model that exposes the vision capability (GPT-4o, GPT-4o mini, GPT-4 Turbo with vision).
Operations:
- Image captioning: Natural-language descriptions of photographs, screenshots, and product imagery.
- Chart and diagram interpretation: Structured extraction of data series, labels, and relationships from bar charts, line charts, flow diagrams, and images containing tables.
- Vision-based OCR: Reads text in layouts that defeat classical OCR — low contrast, unusual typography, handwriting, skewed scans, stylized signage.
- Scene understanding: Identifies objects, activities, and contextual cues to support moderation, tagging, and routing workflows.
Inputs: base64-encoded image or a public image URL. Controls: system prompt, user prompt (expression-enabled), temperature, and max tokens exposed as node configuration so the same node can run deterministic OCR-style calls or creative captioning.
How it works
- Resolves the node config and requires
llm_provider_id. - Takes the image from
content_base64(withcontent_type, defaultimage/png) or fromimage_url, reading each key from the config first and then from the incoming item. Base64 content is sent as adata:URL. - Builds a chat request with
system_prompt, a user message containingpromptand the image,max_tokens(default 1024) andtemperature(default 0.2). - Calls the backend LLM provider invocation endpoint with a timeout of
execution.timeout_ms(default 120000). - Trims the returned text and builds
{ text, chars, empty, method: "llm.vision", metadata: { llm_provider_id, usage } }; empty text goes toempty, otherwiseextracted.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-read-receipt",
"label": "Read receipt image",
"operator_slug": "integrations.openai.gpt-4o.vision",
"operator_version": "1.0.0",
"config": {
"llm_provider_id": "<llm_provider_id>",
"prompt": "Extract the store name, total and date from this receipt.",
"max_tokens": 512,
"temperature": 0
}
}{
"ok": true,
"data": {
"text": "Receipt from Example Store. Total: $42.10. Date: 2026-11-25.",
"chars": 60,
"empty": false,
"method": "llm.vision",
"metadata": {
"llm_provider_id": "<llm_provider_id>",
"usage": {
"prompt_tokens": 1146,
"completion_tokens": 21,
"total_tokens": 1167
}
}
},
"port": "extracted"
}Configuration
-
llm_provider_idstring Required -
Select a vision-capable LlmProvider from the cognitive-assets registry (e.g. an Azure OpenAI GPT-4o deployment).
-
promptstring Optional Accepts expressions -
system_promptstring Optional -
max_tokensnumber Optional -
temperaturenumber Optional -
Lower values produce more deterministic output, better for OCR-style tasks.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
llm_provider_id - The model is whatever this provider is configured with; the node name does not force GPT-4o. Pick a vision-capable deployment.
-
content_base64Read by the code, not declared - Undeclared in the config schema; normally comes from the incoming item together with
content_type.image_urlis used only whencontent_base64is absent. -
temperature - Must be a number; any other type falls back to 0.2. A
max_tokensof 0 or empty falls back to 1024. -
execution - Only
timeout_msis read (default 120000). The retry settings are not applied.
Output ports
extracted default The model returned text.
{
"text": "Receipt from Example Store. Total: $42.10. Date: 2026-11-25.",
"chars": 60,
"empty": false,
"method": "llm.vision",
"metadata": {
"llm_provider_id": "<llm_provider_id>",
"usage": {
"prompt_tokens": 1146,
"completion_tokens": 21,
"total_tokens": 1167
}
}
}empty The call succeeded but the text is empty.
{
"text": "",
"chars": 0,
"empty": true,
"method": "llm.vision",
"metadata": {
"llm_provider_id": "<llm_provider_id>",
"usage": {
"prompt_tokens": 1146,
"completion_tokens": 0,
"total_tokens": 1146
}
}
}error Validation failed, the backend answered with HTTP 400 or more or success: false, or the request timed out.
{
"error": "Either content_base64 or image_url is required."
}In expressions
What a later node can read from this node's output with $("OpenAI - GPT-4o Vision").item.json.<path> (write your node's label instead of OpenAI - GPT-4o Vision). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through extracted, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("OpenAI - GPT-4o Vision").item.json.text | ||
$("OpenAI - GPT-4o Vision").item.json.chars | ||
$("OpenAI - GPT-4o Vision").item.json.empty | ||
$("OpenAI - GPT-4o Vision").item.json.method | ||
$("OpenAI - GPT-4o Vision").item.json.metadata | ||
$("OpenAI - GPT-4o Vision").item.json.metadata.llm_provider_id | — | |
$("OpenAI - GPT-4o Vision").item.json.metadata.usage | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
llm_provider_id is required. | error | No LLM provider selected. |
Either content_base64 or image_url is required. | error | Neither the config nor the incoming item carries an image. |
LLM provider invoke returned HTTP <status> | error | The backend rejected the call without a message. When it sends one (for example LLM Invocation Error (SDK): <detail>), that message is returned instead. |
timeout of <ms>ms exceeded | error | The provider did not answer within execution.timeout_ms. |
Input contract
-
content_base64string Optional -
content_typestring Optional -
image_urlstring Optional -
Public URL to an image (alternative to content_base64).
Output contract
-
textstring Optional -
charsnumber Optional -
emptyboolean Optional -
methodstring Optional -
metadataobject Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "integrations.openai.gpt-4o.vision",
"name": "OpenAI - GPT-4o Vision",
"category": "integrations",
"group": [
{
"key": "openai",
"name": "OpenAI",
"icon_url": "/icons/integrations/openai/openai.svg"
}
],
"icon_url": "/icons/integrations/openai/openai.svg",
"version": "1.0.0",
"description": "Invoke OpenAI GPT-4o (Omni) via the Chat Completions API for image understanding, vision-based OCR, and visual reasoning over diagrams and charts.\n\n Routes through the backend `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` endpoint using an `llm_provider_id` registered in the cognitive-assets registry. Billing is handled directly by OpenAI or Azure OpenAI against your subscription. Compatible with any GPT-4 class model that exposes the `vision` capability (GPT-4o, GPT-4o mini, GPT-4 Turbo with vision).\n\n **Operations:**\n - **Image captioning:** Natural-language descriptions of photographs, screenshots, and product imagery.\n - **Chart and diagram interpretation:** Structured extraction of data series, labels, and relationships from bar charts, line charts, flow diagrams, and images containing tables.\n - **Vision-based OCR:** Reads text in layouts that defeat classical OCR — low contrast, unusual typography, handwriting, skewed scans, stylized signage.\n - **Scene understanding:** Identifies objects, activities, and contextual cues to support moderation, tagging, and routing workflows.\n\n **Inputs:** base64-encoded image or a public image URL.\n **Controls:** system prompt, user prompt (expression-enabled), temperature, and max tokens exposed as node configuration so the same node can run deterministic OCR-style calls or creative captioning.",
"capabilities": [
"openai",
"gpt-4o",
"vision",
"image-understanding",
"ocr",
"llm"
],
"config_schema": {
"type": "object",
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "Select a vision-capable LlmProvider from the cognitive-assets registry (e.g. an Azure OpenAI GPT-4o deployment).",
"x-ui-widget": "llm-provider-picker"
},
"prompt": {
"type": "string",
"title": "User Prompt",
"default": "Describe the content of this image as accurately as possible. Include any visible text verbatim.",
"format": "expression"
},
"system_prompt": {
"type": "string",
"title": "System Prompt",
"default": "You are a vision assistant that describes images accurately and extracts any visible text verbatim."
},
"max_tokens": {
"type": "number",
"title": "Max Tokens",
"default": 1024
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 0.2,
"description": "Lower values produce more deterministic output, better for OCR-style tasks."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
},
"required": [
"llm_provider_id"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"content_type": {
"type": "string",
"default": "image/png"
},
"image_url": {
"type": "string",
"description": "Public URL to an image (alternative to content_base64)."
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
}
}
},
"ports": [
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"standard-io",
"cloud-io"
],
"tags": [
"openai",
"gpt-4o",
"vision",
"llm",
"image"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://sommatic.ai",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "Select a vision-capable LlmProvider from the cognitive-assets registry (e.g. an Azure OpenAI GPT-4o deployment).",
"x-ui-widget": "llm-provider-picker"
},
"prompt": {
"type": "string",
"title": "User Prompt",
"default": "Describe the content of this image as accurately as possible. Include any visible text verbatim.",
"format": "expression"
},
"system_prompt": {
"type": "string",
"title": "System Prompt",
"default": "You are a vision assistant that describes images accurately and extracts any visible text verbatim."
},
"max_tokens": {
"type": "number",
"title": "Max Tokens",
"default": 1024
},
"temperature": {
"type": "number",
"title": "Temperature",
"default": 0.2,
"description": "Lower values produce more deterministic output, better for OCR-style tasks."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
},
"required": [
"llm_provider_id"
]
}{
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"content_type": {
"type": "string",
"default": "image/png"
},
"image_url": {
"type": "string",
"description": "Public URL to an image (alternative to content_base64)."
}
}
}{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
}
}
}[
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
openaigpt-4ovisionimage-understandingocrllm- Tags
openaigpt-4ovisionllmimage
Notes and limits
- The worker never calls OpenAI directly and holds no provider key; usage is billed to the provider's own account.
usageis passed through from the provider response and may be absent. The node does not retry.
Reviewed against the orchestrator code · 31e874b · 2026-11-26