DocsPlugins

CI publishing

Use a publish token to upload new plugin versions from scripts or CI. Uploads go through the same validation and review as uploads on the web.

Before you start

  1. Create the plugin under "My works" first (the key cannot be changed later). The upload API does not create plugins.
  2. At the bottom of the "Release version" page, create a "CI publish token". You can limit it to one plugin and set an expiry.
  3. The token is shown only once. Store it in your CI secrets, for example as DEEPDOER_PUBLISH_TOKEN.

Publish tokens can only upload versions and check review status. They cannot call models, change prices or withdraw funds. If a token leaks, revoke it right away in the same place.

Upload a version

Shell
curl -X POST "https://deepdoer.cn/developers/v1/plugins/my-plugin/versions" \
  -H "Authorization: Bearer $DEEPDOER_PUBLISH_TOKEN" \
  -F file=@my-plugin.zip \
  -F changelog="Fixed export format"

On success it returns 201 with the version details; status is pending (awaiting review):

JSON
{
  "id": 1024,
  "key": "my-plugin",
  "version": "1.2.0",
  "status": "pending",
  "sha256": "…",
  "sizeBytes": 18342,
  "permissions": ["clipboard.write"]
}
  • manifest.json must be at the zip root; maximum size 32MB.
  • version must be higher than the highest approved version. A rejected version can be re-uploaded with the same version number.
  • Each token can upload at most 30 times per hour.

Check review status

Shell
curl "https://deepdoer.cn/developers/v1/plugins/my-plugin/versions" \
  -H "Authorization: Bearer $DEEPDOER_PUBLISH_TOKEN"

Returns the latest 50 versions, newest first. status values: pending awaiting review, approved listed, rejected rejected (see reviewComment), obsolete replaced by a newer version.

GitHub Actions example

YAML
name: publish-plugin
on:
  push:
    tags: ['v*']
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Pack
        run: cd my-plugin && zip -r ../my-plugin.zip . -x '.*'
      - name: Upload
        run: |
          curl --fail-with-body -X POST \
            "https://deepdoer.cn/developers/v1/plugins/my-plugin/versions" \
            -H "Authorization: Bearer ${{ secrets.DEEPDOER_PUBLISH_TOKEN }}" \
            -F file=@my-plugin.zip \
            -F changelog="${GITHUB_REF_NAME}"

Errors

Errors use the same format as the Model API: {"error": {"message": "…", "type": "…", "param": null, "code": "…"}}. Branch on code.

HTTP code Cause
401 invalid_token Token missing, mistyped, revoked or expired
403 forbidden The token is limited to another plugin
400 invalid_request Invalid plugin key, or file was not sent as multipart/form-data
400 rejected Invalid package, version not new enough, plugin not found, and so on; message has the details
413 payload_too_large Package larger than 32MB
429 rate_limited Too many uploads: at most 30 per token per hour
500 server_error Service temporarily unavailable; retry later