Introduction

In the development of DeepSeek Harness (DSH), when agents need to generate images or videos, they typically need to encapsulate the HTTP call logic themselves. dsh-seedance2 is a plugin that directly integrates image and video generation capabilities into Harness through the Seedance 2 AI public API. The plugin is maintained by SynMind AI and supports generation via the Seedance 2 or 2.5 models.

Installation and Enablement

Installing the plugin requires using DSH’s plugin management commands. After installation, you need to check the configuration dump to confirm that the plugin is active.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-seedance2
npx -y @deepseek-ai/dsh --profile web --dump-config
npx -y @deepseek-ai/dsh web --profile web

The above command adds the seedance2 configuration layer to Harness. If you need to install from a local code repository, you can use:

npx -y @deepseek-ai/dsh plugin --profile web add .

Configuration and Authentication

The plugin resolves the API key through Harness’s credential system, ensuring the key is not directly exposed in the Prompt as a model parameter.

  1. Register or log in on the official Seedance 2 website and purchase credits.
  2. Create an API Key on the API management page.
  3. Set the environment variable in the environment where Harness is started:
export SEEDANCE2_PUBLIC_API_KEY='sk-...'
  1. Restart Harness.

Core Features

The plugin provides the following core capabilities:

  • seedance2_generate_image: Generate images.
  • seedance2_generate_video: Generate videos.
  • seedance2_get_task: Retrieve task status.
  • seedance2_account_help: Account help.

Typical Usage

Below are usage examples supported by the plugin. All reference materials must use public HTTPS URLs.

  1. Image Generation
    Use Seedance 2 AI Nano Banana Pro to generate a high-quality 1:1, 2K-level packaging mockup with a clean studio floor background.

  2. Video Generation
    Use Seedance 2 Pro to convert a public HTTPS starting image into a 5-second 720p 16:9 video. Require a slow push-in camera effect and generate audio.

  3. Media to Video
    Use Seedance 2.5 to generate a video based on public HTTPS reference images and videos. Explicitly state the role of each reference material in the Prompt.

Prompts and Reference Resources

To achieve the best results, the Prompt should include the following elements:
* Subject
* Action
* Scene
* Camera movement
* Visual style
* Constraints
* Role of reference materials

Configuration Options

The default configuration is production-ready; override it only when necessary. The configuration file is located at $DSH_HOME/profiles/web/cordis.patch.yml.

- id: seedance2
  config:
    apiBaseUrl: https://www.seedance2ai.io
    apiKeyEnv: SEEDANCE2_PUBLIC_API_KEY
    requestTimeoutMs: 30000
    pollIntervalMs: 3000
    imageWaitTimeoutMs: 300000
    videoWaitTimeoutMs: 900000
    maxRetries: 2
    retryDelayMs: 500
    requireApproval: true
    allowLocalHttp: false

Behavior and Error Handling

  • Idempotency and Retries: Paid requests carry an Idempotency-Key, which is reused for automatic retries. For retryable 429 and 5xx responses, the plugin uses a bounded backoff strategy.
  • Cancellation: Cancellation operations abort in-progress requests and foreground polling.
  • Timeout Handling: If the foreground wait times out, continue to use seedance2_get_task to query the original task to avoid duplicate paid submissions.
  • Refund Information: When a task fails, the credits_refunded value returned by the API is displayed.
  • Credential Restrictions: The plugin does not accept internal credentials (such as SEEDANCE_API_KEY); it only accepts public credentials passed via Harness environment variables.

Ecosystem and Summary

This plugin resolves the secure exposure issue of API keys through Harness’s credential management and includes built-in retry, backoff, and timeout handling logic, reducing the cost of integrating external video generation models. Related documentation and source code are available in the community directory and the GitHub repository.