Z.ai
Run Z.ai GLM vision models via OpenRouter.
v2
Run Z.ai GLM vision-language models via OpenRouter.
Supported models: GLM 5V Turbo and GLM 5.3 Flash (previously served as the OpenRouter stealth model "Ox Alpha").
You can specify arbitrary text prompts or predefined ones. The block supports:
Open Prompt (
unconstrained) - Use any prompt to generate a raw responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageStructured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
Object detection uses the per-model format validated in the vlm-exam benchmarks. Both models emit [x_min, y_min, x_max, y_max] boxes as integers normalized to 0-1000, but with different key names: GLM 5V Turbo uses box_2d and GLM 5.3 Flash uses bbox_2d. The block prompts for and decodes the right one for the selected model.
Version Differences
This version (v2) decodes the model answer inside the block, adding predictions, error_status and inference_id outputs next to the raw output string:
predictionsholds object detections for theobject-detectiontask and a classification prediction for theclassification/multi-label-classificationtasks - the kind of the output follows the selected task type.predictionsisNonefor every other task (unconstrained prompting, OCR, captioning, structured answering, visual question answering).error_statusisTruewhen the answer could not be decoded.inference_idis generated per image.
Separate roboflow_core/vlm_as_detector@v2 and roboflow_core/vlm_as_classifier@v2 steps are no longer needed.
Every request sends the image before the instruction text in a single user message. GLM models default to extended reasoning on OpenRouter; the block disables it by default (the benchmarked configuration) and exposes a reasoning_effort knob to turn it back on. GLM 5.3 Flash requires reasoning and falls back to low effort when disabled. max_tokens defaults to 2048; raise it (e.g. 8192) when you need a longer answer.
By default the block uses the Roboflow-managed OpenRouter key and bills your Roboflow credits. Paste your own sk-or-... key to call OpenRouter directly.
Type identifier
Use the following identifier in step "type" field: roboflow_core/zai_vlm@v2 to add the block as a step in your workflow.
Properties
Name
Type
Description
Refs
name
str
Enter a unique identifier for this step..
❌
api_key
str
OpenRouter API key. Defaults to Roboflow's managed key. Provide your own sk-or-... key to call OpenRouter directly without Roboflow billing..
✅
privacy_level
str
Provider privacy filter. Stricter levels reduce the pool of providers and may increase per-call cost on the managed key..
❌
max_tokens
int
Maximum number of tokens the model can generate in its response. Defaults to 2048. Raise it explicitly (e.g. 8192) when a task needs a longer answer. Billing is based on tokens actually generated, not on this limit..
❌
temperature
float
Sampling temperature. Left unset by default so the provider default applies. Range 0.0-2.0..
✅
max_concurrent_requests
int
Number of concurrent requests for batches of images. If not given - block defaults to value configured globally in Workflows Execution Engine. Restrict if you hit rate limits..
❌
model_version
str
Z.ai GLM model to run..
✅
task_type
str
Task type to be performed by model. Value determines required parameters and output response..
❌
prompt
str
Text prompt to send to the model..
✅
output_structure
Dict[str, str]
Dictionary with structure of expected JSON response..
❌
classes
List[str]
List of classes to be used..
✅
reasoning_effort
str
Extended-reasoning budget. GLM models default to extended reasoning on OpenRouter; none (the default) disables it, matching the configuration validated in the vlm-exam benches..
❌
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 Z.ai in version v2 has.
v1
Run Z.ai GLM vision-language models via OpenRouter.
Supported models: GLM 5V Turbo and GLM 5.3 Flash (previously served as the OpenRouter stealth model "Ox Alpha").
You can specify arbitrary text prompts or predefined ones. The block supports:
Open Prompt (
unconstrained) - Use any prompt to generate a raw responseText Recognition (OCR) (
ocr) - Model recognizes text in the imageVisual Question Answering (
visual-question-answering) - Model answers the question you submit in the promptCaptioning (short) (
caption) - Model provides a short description of the imageCaptioning (
detailed-caption) - Model provides a long description of the imageSingle-Label Classification (
classification) - Model classifies the image content as one of the provided classesMulti-Label Classification (
multi-label-classification) - Model classifies the image content as one or more of the provided classesUnprompted Object Detection (
object-detection) - Model detects and returns the bounding boxes for prominent objects in the imageStructured Output Generation (
structured-answering) - Model returns a JSON response with the specified fields
Object detection uses the per-model format validated in the vlm-exam benchmarks. Both models emit [x_min, y_min, x_max, y_max] boxes as integers normalized to 0-1000, but with different key names: GLM 5V Turbo uses box_2d and GLM 5.3 Flash uses bbox_2d. Parse with VLM as Detector (vlm_as_detector@v2) using model_type="zai" for GLM 5V Turbo and model_type="zai-flash" for GLM 5.3 Flash.
Every request sends the image before the instruction text in a single user message. GLM models default to extended reasoning on OpenRouter; the block disables it by default (the benchmarked configuration) and exposes a reasoning_effort knob to turn it back on. GLM 5.3 Flash requires reasoning and falls back to low effort when disabled. max_tokens defaults to 2048; raise it (e.g. 8192) when you need a longer answer.
By default the block uses the Roboflow-managed OpenRouter key and bills your Roboflow credits. Paste your own sk-or-... key to call OpenRouter directly.
Type identifier
Use the following identifier in step "type" field: roboflow_core/zai_vlm@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..
❌
api_key
str
OpenRouter API key. Defaults to Roboflow's managed key. Provide your own sk-or-... key to call OpenRouter directly without Roboflow billing..
✅
privacy_level
str
Provider privacy filter. Stricter levels reduce the pool of providers and may increase per-call cost on the managed key..
❌
max_tokens
int
Maximum number of tokens the model can generate in its response. Defaults to 2048. Raise it explicitly (e.g. 8192) when a task needs a longer answer. Billing is based on tokens actually generated, not on this limit..
❌
temperature
float
Sampling temperature. Left unset by default so the provider default applies. Range 0.0-2.0..
✅
max_concurrent_requests
int
Number of concurrent requests for batches of images. If not given - block defaults to value configured globally in Workflows Execution Engine. Restrict if you hit rate limits..
❌
model_version
str
Z.ai GLM model to run..
✅
task_type
str
Task type to be performed by model. Value determines required parameters and output response..
❌
prompt
str
Text prompt to send to the model..
✅
output_structure
Dict[str, str]
Dictionary with structure of expected JSON response..
❌
classes
List[str]
List of classes to be used..
✅
reasoning_effort
str
Extended-reasoning budget. GLM models default to extended reasoning on OpenRouter; none (the default) disables it, matching the configuration validated in the vlm-exam benches..
❌
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 Z.ai in version v1 has.
Last updated
Was this helpful?