Skip to main content

How to use dsh-image-gen

Adds in-conversation image generation to DeepSeek Harness web client, supporting Google Gemini, OpenAI, and ByteDance Seedream, with a built-in local image gallery.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-image-gen

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add dsh-image-gen

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 💬 对话中直接生图:不需要切换到其他网站,也不需要手动复制 Prompt,直接告诉 Agent 你想画什么即可。
  • 🖼️ 历史生图画廊:顶栏自带「画廊」Tab,自动汇总所有历史生成的图片,支持关键词搜索、厂商筛选与一键复制/下载。
  • 🔍 交互式图片工具:支持点击全屏大图预览、一键复制图片到剪贴板、本地下载与新标签页打开。
  • 🎨 多 Provider 支持:目前支持 Google Gemini、OpenAI Images、OpenAI Compatible API 以及 ByteDance Seedream / Volcengine Ark。Provider、模型和 Endpoint 都可以在设置界面中自由修改。
  • 🔑 BYOK (自带 Key):插件使用你自己的 API Key。API Key 通过 DeepSeek Harness 的 credentials 服务管理,采用写保护隔离,不需要写进项目源码或配置文件,前端不存明文。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Where do I fill in the API Key after installation?

Open DSH Web (default http://localhost:3080), go to Settings → Plugins → Image generation, expand the card, select a Provider and fill in the corresponding API Key to save. The Key is encrypted and stored through the DSH credential service, and the frontend does not display it in plain text.

Do I need to prepare Keys for all three Providers?

No, you only need to prepare it for the currently selected Provider. You can add the corresponding Key after switching Providers.

Which services can be connected in OpenAI Compatible mode?

Any service that provides an interface compatible with OpenAI's /v1/images/generations can be used, including various relay stations, self-deployed gateways, or similar protocol access points like Volcano Ark. Just change the Base URL to the /v1 address of the corresponding service.

Where are the generated images stored?

Image binaries are persisted by DSH's own Attachment service and can be reopened with historical conversations; the gallery's indexed metadata (Prompt, Provider, model, etc.) is stored in the browser's IndexedDB. Uninstalling the plugin or switching browsers will not automatically sync them.

What to do if the "Gallery" tab is not visible in the top bar?

The Gallery tab is injected by the plugin into the conversation.view slot and will appear automatically after installation is complete; if it doesn't appear, please confirm you are on the web profile, refresh the page, or check if the plugin is disabled.

What does the error "generate_image requires the XXX credential" mean?

The API Key for the currently selected Provider has not been configured yet. Go back to Settings → Plugins → Image generation to fill in and save. The corresponding environment variable names are GEMINI_API_KEY / OPENAI_API_KEY / ARK_API_KEY.

Can multiple images be generated at once?

The generate_image tool returns one image per call, but the Agent can automatically make multiple consecutive calls as needed. All results will be managed uniformly in the gallery.

Can I download the generated images to local?

Yes. Hover over the image in the conversation or the gallery card, a toolbar will appear. Click the download icon to save it as PNG/JPEG locally.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: >=0.1.0-rc.5
  • Node: >=22.19.0
  • Platforms: Web

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule