Introduction

When extending agent capabilities in DeepSeek Harness (DSH), handling authentication, task submission, result polling, and output address retrieval is often required when tools need to call external generation services. dsh-plugin-muapi encapsulates MuApi’s image, video, and audio generation models into DSH tools, reducing this kind of glue code.

What is This

SamurAIGPT/dsh-plugin-muapi is a DeepSeek Harness plugin maintained by SamurAIGPT, licensed under MIT. It registers a tool named muapi_generate, exposing MuApi’s 100+ image, video, and audio generation models to the agent.

Core Features

The tool registered by the plugin is:

muapi_generate

The tool selects a MuApi model slug via the model field and passes the model’s parameter object via the input field. For example:

{
  "model": "flux-schnell-image",
  "input": {
    "prompt": "a serene mountain lake at dawn"
  }
}

In the example above, model is the MuApi model slug, and input is the model parameter object.

The process to call MuApi is:

  1. Submit task:
POST https://api.muapi.ai/api/v1/{model}
  1. Poll for results until completion or failure:
GET https://api.muapi.ai/api/v1/predictions/{request_id}/result
  1. Return the output URL.

Configurable items and default values are as follows:

tool.enabled = true
tool.apiKeyEnv = <credential reference>
tool.baseUrl = https://api.muapi.ai/api/v1
tool.pollIntervalMs = 3000
tool.timeoutMs = 600000

Where tool.enabled controls whether to expose the tool, tool.apiKeyEnv is the MuApi API key credential reference, tool.baseUrl is the API base address, tool.pollIntervalMs is the polling interval, and tool.timeoutMs is the upper limit for waiting for task completion.

Installation and Enablement

First, execute the installation command:

dsh plugin add @dsh-plugin/dsh-plugin-muapi

After installation, configure the MuApi API key credential in settings:

Settings → muapi

You can go to the following address to create a key:

https://muapi.ai/access-keys

package.json shows the version requirements for @deepseek-ai/* in the plugin’s peerDependencies. You should verify they are met in the host environment before enabling:

peerDependencies
@deepseek-ai/*

If you need to adjust timeout or polling behavior, you can modify tool.pollIntervalMs and tool.timeoutMs.

Typical Usage

When calling in an agent, simply pass the MuApi model slug and model parameter object. Taking the image model as an example:

{
  "model": "flux-schnell-image",
  "input": {
    "prompt": "a serene mountain lake at dawn"
  }
}

If you need to view available models, you can browse the MuApi model directory:

https://muapi.ai/playground

The parameter documentation path for a specific model is:

https://muapi.ai/playground/{model}/llms.txt

For example, slugs like flux-schnell-image or kling-v2-1-image-to-video can be found in the corresponding documentation in the directory above.

Applicable Scenarios and Notes

Suitable for developers who need to integrate MuApi’s generation capabilities into a DSH agent. When using it, please note:

  • The plugin calls the external MuApi API and polls for results according to the configuration.
  • A MuApi API key is required; tool.apiKeyEnv is a credential reference and keys should not be hardcoded into the configuration.
  • The default tool.timeoutMs is 600000; generation tasks exceeding this limit will fail.
  • The plugin runs with the permissions of the current dsh process; check the source code, license, and dependencies before installation.
  • The DSH Community Directory is an independent site with no official affiliation with DeepSeek/Huansuan, and should not be interpreted as an official app store.

Conclusion

The value of dsh-plugin-muapi lies in converging MuApi’s task submission, polling, and output URL return into a single DSH tool. You can view it on the directory page:

https://www.skillhub.cn/plugins/SamurAIGPT/dsh-plugin-muapi

The source code repository is:

https://github.com/SamurAIGPT/dsh-plugin-muapi