> ## 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

> Generate text response from image using Qwen3-VL

Generate text response from image using Qwen3-VL.

## Parameters

<ParamField body="image_input" type="Union[str, Image.Image, np.ndarray]" required>
  RGB image.
</ParamField>

<ParamField body="prompt" type="str" default="'Describe this image.'">
  Text prompt/question about the image.
</ParamField>

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

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

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

## Returns

Dict\[str, Any]: Backend JSON response containing:

* "output": Generated text response string.
* "latency\_ms": Server-side processing time.
* "gpu\_stats": GPU memory usage statistics.

## Example

```python theme={null}
from grid_cortex_client import CortexClient, ModelType
import numpy as np
from PIL import Image
client = CortexClient()
image = np.array(Image.open("path/to/image.jpg"))
result = client.run(ModelType.QWEN_VL, image_input=image, prompt="What do you see?")
print(result["output"])  # Text answer
```

Uses Qwen3-VL-4B.

## 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" />

```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
```


## Related topics

- [qwen_vl](/models/cortex/qwen_vl.md)
