docs/nodes/media-understanding.md
OpenClaw can summarize inbound media (image/audio/video) before the reply pipeline runs, so command parsing and routing work off short text instead of raw bytes. Understanding auto-detects local tools or provider keys, or you can configure explicit models. Original media is always delivered to the model as usual; when understanding fails or is disabled, the reply flow continues unchanged.
Vendor plugins register capability metadata (which provider supports which media type, default model, priority). OpenClaw core owns the shared tools.media config, fallback order, and reply-pipeline integration.
tools.media holds a shared model list plus per-capability overrides:
{
tools: {
media: {
concurrency: 2, // max concurrent capability runs (default)
models: [
/* shared list, gate with capabilities */
],
image: {
/* optional overrides */
},
audio: {
/* optional overrides */
echoTranscript: true,
echoFormat: '๐ "{transcript}"',
},
video: {
/* optional overrides */
},
},
},
}
Per-capability (image/audio/video) keys:
| Key | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | auto (false disables) | Set false to turn off auto-detect for this capability |
models | array | none | Preferred before the shared tools.media.models list |
prompt | string | "Describe the {media}." (+ maxChars guidance) | Image/video only by default |
maxChars | number | 500 (image/video), unset (audio) | Output is trimmed if the model returns more |
maxBytes | number | image 10485760, audio 20971520, video 52428800 | Oversized media skips to the next model |
timeoutSeconds | number | 60 (image/audio), 120 (video) | |
language | string | unset | Audio transcription hint |
baseUrl/headers/providerOptions/request | - | - | Provider request overrides; see Tools and custom providers |
attachments | object | { mode: "first", maxAttachments: 1 } | See Attachment policy |
scope | object | unset | Gate by channel/chatType/keyPrefix |
echoTranscript | boolean | false | Audio only: echo the transcript back to the chat before agent processing |
echoFormat | string | '๐ "{transcript}"' | Audio only: {transcript} placeholder |
Deepgram-specific options go under providerOptions.deepgram (the top-level deepgram: { detectLanguage, punctuate, smartFormat } field is deprecated but still read).
Each models[] entry is a provider entry (default) or a CLI entry:
CLI templates can also use `{{MediaDir}}` (directory containing the media file), `{{OutputDir}}` (scratch dir created for this run), and `{{OutputBase}}` (scratch file base path, no extension).
Provider media understanding uses the same auth resolution as normal model calls: auth profiles, environment variables, then models.providers.<providerId>.apiKey. tools.media.*.models[] entries do not accept an inline apiKey field.
{
models: {
providers: {
openai: { apiKey: "<OPENAI_API_KEY>" },
moonshot: { apiKey: "<MOONSHOT_API_KEY>" },
},
},
}
See Tools and custom providers for profiles, env vars, and custom base URLs.
maxBytes skips that model and tries the next one.[Image] summary block and passes the original image into the model directly. MiniMax is an exception: minimax, minimax-cn, minimax-portal, and minimax-portal-cn always route image understanding through the plugin-owned MiniMax-VL-01 media provider, even if legacy MiniMax M2.x chat metadata claims image input (only MiniMax-M3 and later are treated as natively vision-capable).media://inbound/* refs so image/PDF tools or a configured image model can still inspect them instead of losing the attachment.openclaw infer image describe --file <path> --model <provider/model> (alias: openclaw capability image describe) runs that image-capable provider/model directly, including Ollama refs such as ollama/qwen2.5vl:7b when a matching image-capable model is configured under models.providers.ollama.models[].<capability>.enabled is not false but no models are configured, OpenClaw tries the active reply model when its provider supports the capability.When tools.media.<capability>.enabled is not false and no models are configured, OpenClaw tries these in order and stops at the first working option:
Bundled provider priority order (ties break alphabetically by provider id):
- Image: Anthropic/OpenAI → Google → MiniMax → Deepinfra → MiniMax Portal → Z.AI
- Video: Google → Qwen → Moonshot
To disable auto-detection for a capability:
{
tools: {
media: {
audio: {
enabled: false,
},
},
},
}
Provider-based audio and video understanding honors standard outbound proxy environment variables, including NO_PROXY/no_proxy bypass rules: HTTPS_PROXY, HTTP_PROXY, ALL_PROXY, https_proxy, http_proxy, all_proxy. Lowercase vars take precedence over uppercase. If none are set, media understanding uses direct egress; if the proxy value is malformed, OpenClaw logs a warning and falls back to direct fetch. Image understanding does not go through this proxy path.
Set capabilities on a models[] entry to restrict it to specific media types. For shared lists, OpenClaw infers defaults per bundled provider:
| Provider | Capabilities |
|---|---|
openai, anthropic, minimax | image |
minimax-portal | image |
moonshot | image + video |
openrouter | image + audio |
google (Gemini API) | image + audio + video |
qwen | image + video |
deepinfra | image + audio |
mistral | audio |
zai | image |
groq, xai, deepgram, senseaudio | audio |
Any models.providers.<id>.models[] catalog with an image-capable model | image |
For CLI entries, set capabilities explicitly to avoid surprising matches; if omitted, the entry is eligible for every capability list it appears in.
| Capability | Providers | Notes |
|---|---|---|
| Image | Anthropic, Codex app-server, Deepinfra, Google, MiniMax, MiniMax Portal, Moonshot, OpenAI, OpenAI Codex OAuth, OpenRouter, Qwen, Z.AI, config providers | Vendor plugins register image support; openai/* can use API-key or Codex OAuth routing; codex/* uses a bounded Codex app-server turn; image-capable config providers auto-register. |
| Audio | Deepgram, Deepinfra, ElevenLabs, Google, Groq, Mistral, OpenAI, OpenRouter, SenseAudio, xAI | Provider transcription (Whisper/Groq/xAI/Deepgram/OpenRouter STT/Gemini/SenseAudio/Scribe/Voxtral). |
| Video | Google, Moonshot, Qwen | Provider video understanding via vendor plugins; Qwen video understanding uses the standard DashScope endpoints. |
whisper-cli, whisper, gemini) help when provider APIs are unavailable.parakeet-mlx: with --output-dir, OpenClaw reads <output-dir>/<media-basename>.txt when the output format is txt or unspecified; other formats fall back to stdout.Per-capability attachments controls which attachments are processed:
When mode: "all", outputs are labeled [Image 1/2], [Audio 2/2], etc.
<<<EXTERNAL_UNTRUSTED_CONTENT id="...">>> / <<<END_EXTERNAL_UNTRUSTED_CONTENT id="...">>> plus a Source: External metadata line.SECURITY NOTICE: banner to keep the media prompt short; the boundary markers and metadata still apply.[No extractable text].[PDF content rendered to images] in the file block.When media understanding runs, /status includes a per-capability summary line:
๐ Media: image ok (openai/gpt-5.5) ยท audio skipped (maxBytes)
scope to limit where understanding runs (for example, only DMs).