OpenAI-Compatible LLM
Send prompts to any OpenAI-compatible API endpoint.
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@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..
❌
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.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds OpenAI-Compatible LLM in version v1 has.
Input and output bindings
input
base_url(string): URL of the OpenAI-compatible server, including /v1..model_name(string): Model identifier sent to the server..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.
Last updated
Was this helpful?