> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen VL

> Vision-language model for VQA and image understanding (Qwen3-VL-4B)

Generate text responses about images using Qwen3-VL-4B.

## Parameters

<ParamField body="image_input" type="str | PIL.Image | np.ndarray" required>
  RGB image.
</ParamField>

<ParamField body="prompt" type="str" required>
  Text prompt/question about the image.
</ParamField>

<ParamField body="max_new_tokens" type="int">
  Maximum number of tokens to generate.
</ParamField>

<ParamField body="temperature" type="float">
  Sampling temperature (0 = greedy).
</ParamField>

<ParamField body="timeout" type="float | None">
  Optional HTTP timeout.
</ParamField>

## Returns

`dict` with keys:

* `output` — Generated text response
* `latency_ms` — Server-side processing time
* `gpu_stats` — GPU memory usage statistics

## Example Output

<img src="https://mintcdn.com/scaledfoundations/lgZgGQWKvUIw0C7n/assets/images/cortex/qwen_vl-output.jpg?fit=max&auto=format&n=lgZgGQWKvUIw0C7n&q=85&s=0b1dd6e6d1fb813eefebe1f317ee835b" alt="Qwen VL input image and text response" width="1056" height="552" data-path="assets/images/cortex/qwen_vl-output.jpg" />

## Example

```python theme={null}
from grid_cortex_client import CortexClient
import numpy as np
from PIL import Image

client = CortexClient()
image = np.array(Image.open("scene.jpg"))  # 640x480 RGB
result = client.run(
    model_id="qwen_vl",
    image_input=image,
    prompt="What objects can you see in this scene? List them.",
    max_new_tokens=128,
    temperature=0.3,
)

print(result.keys())
# dict_keys(['output', 'latency_ms', 'gpu_stats'])

print(result["output"])
# "Based on the image provided, here is a list of objects that can be
#  seen in the scene:\n\n- **Street**: A wide, empty asphalt road...
#  \n- **Sidewalks**: Concrete sidewalks on both sides...
#  \n- **Buildings**: Multi-story buildings...
#  \n- **Signage**: Various signs on buildings..."

print(f"latency: {result['latency_ms']:.1f} ms")
# latency: 4323.4 ms
```
