Skip to main content
Glama

Analyse / caption an image with a vision model

replicate_vision

Analyze an image by URL to generate captions, descriptions, or answers to custom questions using selectable vision-language models.

Instructions

Run a vision-language model to describe, caption, or answer questions about an image.

Args:

  • image (string URL): URL of the image to analyse.

  • prompt (string, optional): Question or instruction (e.g. "describe this image", "count the people"). Default is a generic caption.

  • model (string, default "llava-13b"): Curated key (llava-13b, llava-v1.6-34b, blip-2, qwen-vl) or "owner/name".

  • max_tokens (1-4096, optional): Response length.

  • extra_input (object, optional): Model-specific extras.

Returns: PredictionResult with text_output containing the model's textual answer.

Examples:

  • image="https://example.com/photo.jpg", prompt="What objects are visible?"

  • image="", prompt="Read the values off this chart and list them.", model="llava-v1.6-34b"

Input Schema

NameRequiredDescriptionDefault
imageYesURL of the image to analyse / caption.
modelNoVision model. Curated: llava-13b, llava-v1.6-34b, blip-2, qwen-vl. Or "owner/name".llava-13b
promptNoOptional question or instruction (e.g. 'describe this image', 'count the people'). Default is a generic caption.
downloadNo
max_tokensNo
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.1
    • addedInput schema / properties / extra_input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv3.2.3

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare openWorldHint=true, idempotentHint=false, and destructiveHint=false, so the safety profile is covered. The description usefully adds the return shape ('PredictionResult with text_output'), but the timeout/polling behavior and the fact that calls consume paid model runs only appear in the schema or not at all, so added behavioral value is moderate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence front-loads purpose, then parameter notes and examples follow in a scannable structure. Some of the arg text duplicates the schema descriptions, but nothing is padded or wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description correctly states the return type and the key output field ('text_output'). It also covers model selection and prompting, which are the main decision points. Minor omissions (download flag, cost/latency implications) keep it from a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 57%, the description compensates well: it explains image, prompt (with examples and the default-caption behavior), model (curated keys or owner/name), max_tokens, and extra_input. The undocumented 'download' parameter is the notable gap, but the important semantics are surfaced.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('run a vision-language model to describe, caption, or answer questions about an image') and clearly scopes it away from siblings like replicate_generate_image, replicate_upscale_image, or replicate_inpaint. An agent can pick this tool for image understanding without inspecting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete usage examples (describe an image, count people, read a chart) and mentions the prompt default, which establishes when to use it. It stops short of naming an explicit alternative such as replicate_run_model for arbitrary/custom models, so it lacks exclusions but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.