OpenAI-Compatible LLM¶
Class: OpenAICompatibleBlockV1
Source: inference.core.workflows.core_steps.models.foundation.openai_compatible.v1.OpenAICompatibleBlockV1
Send a prompt to any OpenAI-compatible API endpoint (e.g. local Qwen, vLLM, Ollama, LM Studio, or any service that implements the OpenAI chat completions API).
How this block works¶
- You provide a Base URL (e.g.
http://localhost:8000/v1) and a Model Name. - Write an Instruction — the text the model receives.
- Add rows under Inputs to feed step outputs (images, detections, text) into the request. Image inputs are base64-encoded and sent as vision content parts. A list of images becomes one vision part per image.
- Non-image inputs are converted to strings. To splice them into the instruction text, reference the input by name with the placeholder syntax shown in the Instruction field's help text.
- Optionally apply UQL operations to transform input values before insertion.
Image handling¶
- A
WorkflowImageDatavalue is JPEG-encoded and sent as animage_urlpart. - Raw JPEG
bytes(e.g. from the Image Stack block) are sent directly. - A list of either is fanned out into multiple
image_urlparts.
If an image input is also referenced in the instruction text by name, the placeholder is removed from the text — the image only travels as a vision part.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/openai_compatible@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
base_url |
str |
URL of the OpenAI-compatible server, including /v1.. | ✅ |
model_name |
str |
Model identifier sent to the server.. | ✅ |
api_key |
str |
API key, if the endpoint requires one.. | ✅ |
system_prompt |
str |
Optional system message that sets model behavior.. | ✅ |
prompt |
str |
Text sent to the model.. | ✅ |
prompt_parameters |
Dict[str, Union[bool, float, int, str]] |
Step outputs to include in the request (images or text).. | ✅ |
prompt_parameters_operations |
Dict[str, List[Union[ClassificationPropertyExtract, ConvertDictionaryToJSON, ConvertImageToBase64, ConvertImageToJPEG, DetectionsFilter, DetectionsOffset, DetectionsPropertyExtract, DetectionsRename, DetectionsSelection, DetectionsShift, DetectionsToDictionary, Divide, ExtractDetectionProperty, ExtractFrameMetadata, ExtractImageProperty, LookupTable, Multiply, NumberRound, NumericSequenceAggregate, PickDetectionsByParentClass, RandomNumber, SequenceAggregate, SequenceApply, SequenceElementsCount, SequenceLength, SequenceMap, SortDetections, StringMatches, StringSubSequence, StringToLowerCase, StringToUpperCase, TimestampToISOFormat, ToBoolean, ToNumber, ToString]]] |
Optional UQL operations applied to inputs before use.. | ❌ |
max_tokens |
int |
Maximum tokens the model may generate.. | ❌ |
temperature |
float |
Sampling temperature, 0.0 to 2.0.. | ✅ |
extra_body |
Dict[Any, Any] |
Extra JSON forwarded as the OpenAI SDK extra_body argument.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to OpenAI-Compatible LLM in version v1.
- inputs:
Camera Focus,Current Time,Camera Focus,Image Preprocessing,Background Subtraction,Multi-Label Classification Model,Color Visualization,Mask Visualization,Segment Anything 2 Model,Seg Preview,Multi-Label Classification Model,JSON Parser,Cache Set,Google Vision OCR,SIFT Comparison,Single-Label Classification Model,Google Gemini,Instance Segmentation Model,Llama 3.2 Vision,Contrast Enhancement,Keypoint Detection Model,Keypoint Visualization,First Non Empty Or Default,Camera Calibration,VLM As Detector,Twilio SMS Notification,Expression,LMM For Classification,Barcode Detection,Perspective Correction,Cache Get,Detection Offset,CLIP Embedding Model,OpenAI-Compatible LLM,Clip Comparison,Qwen-VL,Model Comparison Visualization,PLC EthernetIP,Dot Visualization,OpenAI,Moondream2,Size Measurement,Detections Stabilizer,Dominant Color,Microsoft SQL Server Sink,SIFT,Stability AI Outpainting,Dimension Collapse,Email Notification,ByteTrack Tracker,Classification Label Visualization,Bounding Box Visualization,Object Detection Model,Pixelate Visualization,Template Matching,Image Slicer,Roboflow Vision Events,Text Display,Distance Measurement,Time in Zone,Blur Visualization,Qwen3-VL,MoonshotAI Kimi,Detections List Roll-Up,LMM,Stability AI Inpainting,Roboflow Dataset Upload,PLC ModbusTCP,Qwen3.5-VL,Circle Visualization,Instance Segmentation Model,Label Visualization,Morphological Transformation,Polygon Zone Visualization,VLM As Classifier,OpenAI,CSV Formatter,Stability AI Image Generation,CogVLM,Roboflow Dataset Upload,Detections Merge,Clip Comparison,Triangle Visualization,Background Color Visualization,Detections Consensus,Stitch OCR Detections,Delta Filter,Line Counter Visualization,Halo Visualization,Roboflow Custom Metadata,OpenAI,Email Notification,Slack Notification,Llama 3.2 Vision,Detections Filter,Bounding Rectangle,Google Gemma API,Event Writer,Google Gemini,Rate Limiter,Ellipse Visualization,Inner Workflow,Image Contours,SAM 3,YOLO-World Model,Crop Visualization,Perception Encoder Embedding Model,SAM2 Video Tracker,Relative Static Crop,Semantic Segmentation Model,Object Detection Model,EasyOCR,VLM As Detector,SAM 3,Image Convert Grayscale,Qwen3.5,Google Gemma,Google Gemini,Image Blur,Identify Changes,MQTT Writer,Buffer,Anthropic Claude,OC-SORT Tracker,PTZ Tracking (ONVIF),SIFT Comparison,Detections Stitch,Overlap Analysis,Qwen 3.6 API,Semantic Segmentation Model,Detections Classes Replacement,SAM 3,Time in Zone,Mask Edge Snap,Contrast Equalization,SORT Tracker,Image Stack,Single-Label Classification Model,Identify Outliers,Dynamic Zone,Continue If,Reference Path Visualization,Polygon Visualization,QR Code Detection,Property Definition,Path Deviation,Webhook Sink,Instance Segmentation Model,Image Slicer,Halo Visualization,QR Code Generator,Local File Sink,MoonshotAI Kimi,SmolVLM2,Path Deviation,Depth Estimation,Byte Tracker,Object Detection Model,Icon Visualization,Motion Detection,VLM As Classifier,Anthropic Claude,Cosine Similarity,Grid Visualization,OpenRouter,Anthropic Claude,Model Monitoring Inference Aggregator,Image Threshold,Overlap Filter,Data Aggregator,Trace Visualization,Pixel Color Count,Morphological Transformation,Keypoint Detection Model,Dynamic Crop,Polygon Visualization,Florence-2 Model,Detections Transformation,Environment Secrets Store,Single-Label Classification Model,Gaze Detection,Qwen 3.5 API,Byte Tracker,Absolute Static Crop,Mask Area Measurement,Multi-Label Classification Model,Stitch Images,Florence-2 Model,Twilio SMS/MMS Notification,Line Counter,Time in Zone,Byte Tracker,Roboflow Asset Library Attributes,Keypoint Detection Model,Corner Visualization,Detections Combine,Stitch OCR Detections,BoT-SORT Tracker,OCR Model,Line Counter,S3 Sink,GLM-OCR,Detection Event Log,OpenAI,Qwen2.5-VL,Heatmap Visualization,Instance Segmentation Model,OPC UA Writer Sink,Per-Class Confidence Filter,Velocity - outputs:
Google Gemma API,Event Writer,Google Gemini,Current Time,Ellipse Visualization,SAM 3,Image Preprocessing,YOLO-World Model,Mask Visualization,Crop Visualization,Segment Anything 2 Model,Color Visualization,Seg Preview,Perception Encoder Embedding Model,JSON Parser,Cache Set,Google Vision OCR,Single-Label Classification Model,SIFT Comparison,Google Gemini,Instance Segmentation Model,Llama 3.2 Vision,VLM As Detector,SAM 3,Google Gemma,Google Gemini,Keypoint Detection Model,Image Blur,Keypoint Visualization,MQTT Writer,Anthropic Claude,VLM As Detector,PTZ Tracking (ONVIF),Twilio SMS Notification,Detections Stitch,LMM For Classification,Qwen 3.6 API,Semantic Segmentation Model,Perspective Correction,Cache Get,Detections Classes Replacement,SAM 3,Time in Zone,CLIP Embedding Model,OpenAI-Compatible LLM,Contrast Equalization,Clip Comparison,Qwen-VL,Model Comparison Visualization,Dot Visualization,OpenAI,Moondream2,Reference Path Visualization,Polygon Visualization,Size Measurement,Microsoft SQL Server Sink,Path Deviation,Webhook Sink,Instance Segmentation Model,Stability AI Outpainting,Halo Visualization,Email Notification,QR Code Generator,Local File Sink,Classification Label Visualization,Bounding Box Visualization,MoonshotAI Kimi,Object Detection Model,Path Deviation,Depth Estimation,Roboflow Vision Events,Text Display,Time in Zone,Distance Measurement,Icon Visualization,VLM As Classifier,Anthropic Claude,OpenRouter,MoonshotAI Kimi,Anthropic Claude,LMM,Stability AI Inpainting,Roboflow Dataset Upload,Qwen3.5-VL,Image Threshold,Model Monitoring Inference Aggregator,Trace Visualization,Circle Visualization,Instance Segmentation Model,Label Visualization,Pixel Color Count,Morphological Transformation,Morphological Transformation,Polygon Zone Visualization,VLM As Classifier,Dynamic Crop,Polygon Visualization,Florence-2 Model,OpenAI,Stability AI Image Generation,Qwen 3.5 API,CogVLM,Roboflow Dataset Upload,Multi-Label Classification Model,Florence-2 Model,Twilio SMS/MMS Notification,Line Counter,Time in Zone,Triangle Visualization,Roboflow Asset Library Attributes,Background Color Visualization,Corner Visualization,Stitch OCR Detections,Line Counter Visualization,Stitch OCR Detections,Halo Visualization,Roboflow Custom Metadata,Line Counter,OpenAI,Email Notification,Slack Notification,S3 Sink,GLM-OCR,OpenAI,Llama 3.2 Vision,Heatmap Visualization,Instance Segmentation Model,OPC UA Writer Sink
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
OpenAI-Compatible LLM in version v1 has.
Bindings
-
input
base_url(string): URL of the OpenAI-compatible server, including /v1..model_name(string): Model identifier sent to the server..api_key(Union[secret,string]): API key, if the endpoint requires one..system_prompt(string): Optional system message that sets model behavior..prompt(string): Text sent to the model..prompt_parameters(*): Step outputs to include in the request (images or text)..temperature(float): Sampling temperature, 0.0 to 2.0..
-
output
output(Union[string,language_model_output]): String value ifstringor LLM / VLM output iflanguage_model_output.error_status(string): String value.
Example JSON definition of step OpenAI-Compatible LLM in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/openai_compatible@v1",
"base_url": "http://localhost:8000/v1",
"model_name": "Qwen/Qwen2.5-VL-7B-Instruct",
"api_key": "xxx-xxx",
"system_prompt": "You are a helpful assistant.",
"prompt": "Describe what you see in the image.",
"prompt_parameters": {
"detections": "$steps.model.predictions",
"frames": "$steps.image_stack.frames"
},
"prompt_parameters_operations": {
"detections": [
{
"property_name": "class_name",
"type": "DetectionsPropertyExtract"
}
]
},
"max_tokens": "<block_does_not_provide_example>",
"temperature": "<block_does_not_provide_example>",
"extra_body": {
"chat_template_kwargs": {
"enable_thinking": false
},
"guided_choice": [
"A",
"B",
"C",
"D"
]
}
}