dsh-tool-draw
A DeepSeek Harness plugin that adds a draw_picture tool for AI image generation.
Supported providers:
- Volcengine ARK API — Doubao Seedream model
- xAI API — Grok Imagine (
grok-imagine-image-2.0)
Installation
Via npm (recommended)
# Install as a dependency in your dsh profile
dsh plugin --profile <name> add dsh-tool-draw
Or manually:
npm install dsh-tool-draw
Via tarball
pnpm pack
dsh plugin --profile <name> add ./dsh-tool-draw-0.1.0.tgz
Configuration
1. Get an API Key
Choose a provider:
2. Set up the plugin
If you installed via dsh plugin add, the bundle is already registered. Just configure the provider and API key in your profile's cordis.patch.yml.
Using Volcengine ARK (default):
- insert:
- id: dsh-tool-draw
name: 'dsh-tool-draw'
config:
provider: 'ark'
apiKey: 'your-ark-api-key-here'
model: ''
size: '1920x1920'
timeoutMs: 120000
Using xAI Grok Imagine:
- insert:
- id: dsh-tool-draw
name: 'dsh-tool-draw'
config:
provider: 'xai'
apiKey: 'your-xai-api-key-here'
model: 'grok-imagine-image-2.0'
size: '1024x1024'
timeoutMs: 120000
Alternatively, you can set the ARK_API_KEY or XAI_API_KEY environment variable instead of putting the key in the config file.
Configuration Options
| Option | Type | Default | Description |
|---|
provider | 'ark' | 'xai' | 'ark' | Image generation provider |
apiKey | string | (required) | API key of the selected provider. Can also be set via ARK_API_KEY (ark) or XAI_API_KEY (xai) env var |
model | string | per provider | Model name. Defaults: doubao-seedream-5.0-lite (ark), grok-imagine-image-2.0 (xai). Leave empty to use the provider default |
size | string | 1024x1024 | Image size, e.g. 1024x1024, 1920x1920 |
timeoutMs | number | 120000 | Request timeout in milliseconds |
Usage
Once installed and configured, the AI agent will have access to the draw_picture tool. Simply ask the agent to draw something:
"画一只猫"
"draw a landscape"
"帮我生成一张夕阳图片"
The tool accepts these parameters:
prompt (required) — Description of the image to generate
size (optional) — Image size, e.g. 1920x1920
n (optional) — Number of images to generate, default 1
API
This plugin exposes a single tool:
draw_picture
Generates images using the configured provider (Volcengine ARK Doubao Seedream or xAI Grok Imagine).
License
MIT