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:
PLC Writer,Image Blur,Track Class Lock,Byte Tracker,Mask Edge Snap,VLM As Detector,Polygon Visualization,Roboflow Visual Search Classifier,Image Slicer,Qwen3.5-VL,Semantic Segmentation Model,Motion Detection,Keypoint Detection Model,Clip Comparison,Buffer,Label Visualization,MoonshotAI Kimi,Instance Segmentation Model,S3 Sink,Perception Encoder Embedding Model,Velocity,BoT-SORT Tracker,Detection Event Log,Single-Label Classification Model,OPC UA Writer Sink,CSV Formatter,Background Subtraction,Corner Visualization,Detection Offset,JSON Parser,Property Definition,Google Gemini,Seg Preview,Roboflow Custom Metadata,LMM For Classification,PP-OCR,SIFT Comparison,Color Visualization,Inner Workflow,Object Detection Model,Local File Sink,Llama 3.2 Vision,SAM3 Video Tracker,Dynamic Zone,Google Gemma API,Detections Filter,First Non Empty Or Default,Microsoft SQL Server Sink,Environment Secrets Store,Icon Visualization,PLC ModbusTCP,Detections Transformation,Rich Label Visualization,Identify Changes,Twilio SMS/MMS Notification,Qwen2.5-VL,OpenAI,Clip Comparison,OpenAI,Instance Segmentation Model,Expression,Stability AI Outpainting,Multi-Label Classification Model,Bounding Box Visualization,Absolute Static Crop,Reference Path Visualization,Google Gemini,Detections Stitch,Event Writer,CogVLM,Time in Zone,Email Notification,Current Time,Mask Area Measurement,Perspective Correction,Cosine Similarity,Detections List Roll-Up,Semantic Segmentation Model,Overlap Filter,Multi-Label Classification Model,Cache Get,OpenRouter,Detections Consensus,OCR Model,Per-Class Confidence Filter,Time in Zone,Relative Static Crop,SAM 3,ByteTrack Tracker,GLM-OCR,Florence-2 Model,Background Color Visualization,Qwen3.5,Roboflow Dataset Upload,Qwen 3.5 API,MoonshotAI Kimi,Stability AI Inpainting,Contrast Equalization,Image Threshold,Camera Focus,Line Counter,Instance Segmentation Model,Circle Visualization,QR Code Generator,Detections Merge,Detections Classes Replacement,Single-Label Classification Model,Heatmap Visualization,Cosmos 3,Auto Rotate on Edges,MQTT Writer,SAM 3,Line Counter,Image Stack,Grid Visualization,Florence-2 Model,PTZ Tracking (ONVIF),Byte Tracker,Pixelate Visualization,Path Deviation,Crop Visualization,Object Detection Model,Detections Stabilizer,Image Convert Grayscale,CLIP Embedding Model,Webhook Sink,VLM As Classifier,SAM 3 Interactive,YOLO-World Model,SIFT,OC-SORT Tracker,Slack Notification,PLC Reader,Stitch OCR Detections,Label Visualization,Email Notification,Keypoint Detection Model,Overlap Analysis,Pixel Color Count,Ellipse Visualization,Path Deviation,Stitch Images,Triangle Visualization,Qwen-VL,Distance Measurement,Bounding Rectangle,Camera Calibration,Polygon Zone Visualization,Delta Filter,Camera Focus,Trace Visualization,Llama 3.2 Vision,Dominant Color,Morphological Transformation,Continue If,SAM2 Video Tracker,Google Vision OCR,Google Gemma,Polygon Visualization,Keypoint Visualization,Image Slicer,OpenAI,Keypoint Detection Model,Object Detection Model,Qwen 3.6 API,Instance Segmentation Model,Single-Label Classification Model,Mask Visualization,Moondream2,Nearest Neighbor Detection Match,OpenAI-Compatible LLM,Byte Tracker,Roboflow Visual Search,VLM As Detector,Blur Visualization,Frame Delay,Roboflow Dataset Upload,OpenAI,Anthropic Claude,Switch Case,Cache Set,Stitch OCR Detections,VLM As Classifier,Barcode Detection,Contrast Enhancement,Template Matching,QR Code Detection,Halo Visualization,Dimension Collapse,Dynamic Crop,PLC EthernetIP,GeoTag Detection,Halo Visualization,Line Counter Visualization,Time in Zone,Roboflow Asset Library Attributes,Multi-Label Classification Model,Size Measurement,LMM,Depth Estimation,SIFT Comparison,Detections Combine,Dot Visualization,EasyOCR,Rate Limiter,Google Gemini,Data Aggregator,Image Contours,Segment Anything 2 Model,Morphological Transformation,SAM 3,Stability AI Image Generation,Google Gemini,Model Monitoring Inference Aggregator,Roboflow Vision Events,Twilio SMS Notification,Anthropic Claude,SORT Tracker,Image Preprocessing,Qwen3-VL,Gaze Detection,Anthropic Claude,Text Display,Model Comparison Visualization,Identify Outliers,Classification Label Visualization,SmolVLM2 - outputs:
Image Blur,Path Deviation,Crop Visualization,VLM As Detector,Polygon Visualization,Object Detection Model,Roboflow Visual Search Classifier,Qwen3.5-VL,CLIP Embedding Model,Webhook Sink,VLM As Classifier,YOLO-World Model,Slack Notification,Label Visualization,MoonshotAI Kimi,Stitch OCR Detections,Label Visualization,Instance Segmentation Model,S3 Sink,Perception Encoder Embedding Model,Email Notification,Keypoint Detection Model,Pixel Color Count,Single-Label Classification Model,OPC UA Writer Sink,Ellipse Visualization,Path Deviation,Corner Visualization,Triangle Visualization,Qwen-VL,JSON Parser,Distance Measurement,Google Gemini,Seg Preview,Polygon Zone Visualization,Roboflow Custom Metadata,LMM For Classification,Trace Visualization,SIFT Comparison,Color Visualization,Local File Sink,Llama 3.2 Vision,SAM3 Video Tracker,Llama 3.2 Vision,Morphological Transformation,Google Vision OCR,Google Gemma API,Google Gemma,Microsoft SQL Server Sink,Polygon Visualization,Icon Visualization,Rich Label Visualization,Twilio SMS/MMS Notification,Keypoint Visualization,OpenAI,OpenAI,Clip Comparison,Qwen 3.6 API,Instance Segmentation Model,Mask Visualization,Moondream2,Nearest Neighbor Detection Match,OpenAI,OpenAI-Compatible LLM,Instance Segmentation Model,Roboflow Visual Search,VLM As Detector,Stability AI Outpainting,Bounding Box Visualization,Roboflow Dataset Upload,OpenAI,Anthropic Claude,Reference Path Visualization,Google Gemini,Detections Stitch,Event Writer,Cache Set,Stitch OCR Detections,CogVLM,Time in Zone,VLM As Classifier,Email Notification,Current Time,Perspective Correction,Halo Visualization,Semantic Segmentation Model,Cache Get,OpenRouter,Dynamic Crop,Halo Visualization,Line Counter Visualization,Time in Zone,Time in Zone,Roboflow Asset Library Attributes,Multi-Label Classification Model,Size Measurement,LMM,Depth Estimation,SAM 3,Dot Visualization,GLM-OCR,Florence-2 Model,Google Gemini,Background Color Visualization,Roboflow Dataset Upload,Qwen 3.5 API,Segment Anything 2 Model,MoonshotAI Kimi,Stability AI Inpainting,Contrast Equalization,Morphological Transformation,Image Threshold,SAM 3,Line Counter,Stability AI Image Generation,Instance Segmentation Model,Circle Visualization,QR Code Generator,Google Gemini,Detections Classes Replacement,Roboflow Vision Events,Model Monitoring Inference Aggregator,Twilio SMS Notification,Heatmap Visualization,Cosmos 3,Auto Rotate on Edges,MQTT Writer,SAM 3,Anthropic Claude,Image Preprocessing,Line Counter,Anthropic Claude,Text Display,PTZ Tracking (ONVIF),Model Comparison Visualization,Florence-2 Model,Classification Label Visualization
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[string,secret]): 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"
]
}
}