Generating Images and Videos in DSH with Logged-In Grok/GPT Accounts

Preface

When building agents in DeepSeek Harness (DSH), the common practice is to configure an API Key separately, or let the model make HTTP requests on its own. Image and video generation often rely on a different account system: OAuth login happens on the Host side, and the conversational model may not necessarily be Grok or GPT. If you want the agent to directly invoke the image/video generation capabilities of the “currently logged-in desktop account” at the tool layer—rather than stuffing tokens into the conversation or letting the model run curl—you need a Host plugin to tie together token renewal, download verification, and file-save strategies. The shengcheng plugin targets exactly this path.

What is This

shengcheng is a DSH desktop plugin released by maintainer yueyexiayu, categorized under model inference. It calls remote image generation APIs through already-logged-in Grok / GPT accounts inside DSH; Grok also supports video generation. Whether it is available depends on whether the remote API accepts the account and its permissions—successful conversational OAuth does not guarantee that the generation API is necessarily available. The plugin only reads llm-pi-ai/xai and llm-pi-ai/openai-codex from $DSH_HOME/.credentials.yaml on the Host; tokens do not enter the conversational context.

  • Grok: grok-imagine-image-2.0 for image generation, grok-imagine-video-1.5 for video generation
  • GPT: gpt-image-2 for image generation (Codex account API; README notes that real-account verification is not yet complete). This plugin does not provide GPT video generation

Community directory page: yueyexiayu/dsh-shengcheng (SkillHub is an independent community site and has no official affiliation with DeepSeek / High-Flyer). Source code and documentation are available on GitHub. The current package version is 0.1.1.

Core Features

There is only one tool: shengcheng. The default is kind=image; video requires kind=video and is only supported by Grok—specifying provider=gpt will directly return an error.

Generation results are written to the session working directory by default; if there is no working directory, they are written to the download folder. The new display component zhanshi prioritizes reading the structured result shengcheng_result {"path":"…"}, fully preserving spaces, quotes, and Chinese paths; it is also backward compatible with the legacy saved … first-line protocol.

When provider=auto: if the current conversation is Grok or GPT, the corresponding account is used; otherwise Grok is preferred, then GPT. The plugin does not read ~/.grok/auth.json / ~/.codex/auth.json.

Token renewal is performed within the DSH shared credential lock; switching accounts or logging out during the wait period will not be overwritten by the old renewal. Generated files are downloaded only over HTTPS, and download requests do not carry account credentials. File extensions follow the actual format (e.g., if you request image.png but the server returns JPEG, it is saved as image.jpg). Cancellation or timeout aborts the request and video polling; concurrent saves do not overwrite existing files.

Installation and Activation

The installation method is to copy the plugin directory and insert a Cordis patch in the desktop profile; the README does not provide a dsh plugin add-style command.

  1. Copy the project to $DSH_HOME/plugins/shengcheng.

  2. Write the following into $DSH_HOME/profiles/desktop/cordis.patch.yml:

- insert:
    - id: shengcheng
      name: ../../plugins/shengcheng/lib/index.js
  1. Install FFmpeg, and ensure both ffmpeg and ffprobe are launchable in PATH (macOS example: brew install ffmpeg). The plugin actually launches both programs before paid generation; missing or failed launches will directly error out.

  2. Install dependencies in the plugin source directory (following pnpm@11.7.0):

pnpm install --frozen-lockfile
  1. Fully exit DeepSeek Harness (macOS: ⌘Q) and reopen it, then start a new session. Simply refreshing the page or editing the source on disk will not replace the implementation already loaded by the current Host.

OAuth renewal uses the official @earendil-works/pi-ai@0.87.1 implementation; the Grok / GPT renewal paths do not depend on other providers’ install scripts.

Typical Usage

  1. Log in to a Grok or GPT (Codex) account using the OAuth plugin below the DSH input box.

  2. In the conversation, let the agent call the shengcheng tool with parameters such as the prompt; keep the default kind=image for image generation, and set kind=video with Grok for video generation.

  3. View the file in the workspace or download directory based on the path returned by the tool; if the Host has integrated zhanshi, you can rely on shengcheng_result for preview.

GPT image aspect ratios currently supported: 1:1 → 1024x1024, 3:2 → 1536x1024, 2:3 → 1024x1536; unsupported ratios or conflicts between size / aspect_ratio will be rejected before the request. Images do not accept duration / image_path; videos do not accept quality / size; Grok images do not accept size; GPT images do not accept resolution.

Use Cases and Notes

Suitable for developers who have already completed Grok / GPT OAuth on the DSH desktop and want their agents to generate images (and Grok videos) through a single tool. The project README states that it is currently deeply tailored for personal use and is intended as a reference for ideas—do not copy it wholesale.

The plugin runs with the current DSH process’s permissions; write paths are validated through sandboxPolicy.resolve and the official fs.resolve. read-only rejects saving generated outputs; workspace-write follows the rules for the workspace and platform temporary directories. Before installing, you should read the source code and repository license yourself, and confirm that the credential and output directory policies match your environment.

Historically, the README has documented entries for isolation of Grok image generation and image-to-video generation, as well as real-account verification; GPT real generation has not yet been verified, and Grok success should not be equated with GPT availability. The README also emphasizes: reading, saving credentials, or generation failures will produce explicit errors—displaying a failure result as a successful generation is prohibited.

Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye