@d-ai/pi

Pi extension for D.AI image, video, and music generation

Packages

Package details

extensionskill

Install @d-ai/pi from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@d-ai/pi
Package
@d-ai/pi
Version
0.2.4
Published
Sep 12, 2026
Downloads
794/mo · 412/wk
Author
liangdiandian
License
MIT
Types
extension, skill
Size
93.4 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "skills": [
    "./skills"
  ],
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@d-ai/pi

Pi package that adds D.AI image, video, and music generation as native tools.

Install

pi install npm:@d-ai/pi

From this repo:

cd sdks/pi && npm install && npm run build
pi install ./sdks/pi

Set a D.AI API key:

export DAI_API_KEY=ddsk_...

Or in Pi run /login, choose D.AI, and paste ddsk_.... That discovers chat models from GET /v1/models and media models from the public catalog. Then pick dai/<model> in /model. GPT-5.6 / GPT-6 expose thinking levels (lowmax); gpt-6-astra cannot turn thinking off.

/dai key also writes ~/.pi/agent/dai.json. Optional baseUrl defaults to https://dai.itbug.shop.

Reload Pi (/reload) after install.

Tools

Tool Default model
dai_generate_image gpt-image-2.5-flare
dai_generate_video veo-3.1-quality
dai_generate_music chirp-v5-5

Ask Pi to generate media, or pass a public model id (gpt-image-2.5-sunburst, gemini-3-pro-image-preview, flux-2-max, omni-flash).

gpt-image-2.5 is GPT Image 2.5(经济·非官方): explicitly select it for the lower-cost unofficial async channel. Pi submits and polls the job before returning the image. It generates one image only (count omitted or 1); size, quality, aspectRatio, outputFormat, and background are unsupported and rejected. Latency, reliability, and output may differ from the official channel. The default remains official gpt-image-2.5-flare; neither flare nor sunburst is automatically replaced with economy.

/dai prints status. /skill:dai-media loads the routing skill.

Spend is billed to the D.AI wallet. This package does not wrap Midjourney buttons, Novel, HappyHorse, or ASR.

Release

Bump version in package.json, commit, and git push github-private master. GitHub Actions publishes @d-ai/pi when that version is not yet on npm. Already-published versions are skipped.

Or tag:

git tag dai-pi-v0.2.4
git push github-private dai-pi-v0.2.4

The workflow uses npm Trusted Publishing (OIDC). Do not put an npm token in GitHub secrets. After install, users need pi update npm:@d-ai/pi — plain pi install does not replace.