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