Parameters
Union[str, Image.Image, np.ndarray]
required
RGB image.
str
required
Task type - “vqa” (Visual Question Answering), “caption” (Image Captioning), “detect” (Object Detection), or “point” (Pointing/Clickable points).
str
default:"''"
Text prompt/question about the image (required for vqa, detect, point tasks).
str
default:"'normal'"
Caption length - “short” or “normal” (only for caption task).
float | None
Optional HTTP timeout.
Returns
Dict[str, Any]: Backend JSON response containing generated text or structured data.- For vqa/caption: {“output”: “text response”}
- For detect: {“output”: {“boxes”: […], “scores”: […], “labels”: […]}}
- For point: {“output”: numpy array of (x,y) points}
Example
Example Output
