@d-ai/pi0.2.10
Pi extension for D.AI image, video, and music generation
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
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_.... Chat models come from the public capability catalog; GET /v1/models then drops ids this key cannot use. Claude models call Anthropic Messages at the gateway origin (POST /v1/messages). Each Claude model also lists @300k and @1m; Opus 4.8 and Opus 5 add :fast and :slow on those rows. :fast is billed at 2×, and the request still uses the base model id. Pi's $ total sums each reply from these per-million rates: input, output, cache read at 0.1× input, and 5-minute cache write at 1.25× input. :fast doubles that total; a 1-hour cache write is 2× input. The unsuffixed id stays the full catalog window at standard speed. Media models come from the same catalog. Then pick dai/<model> in /model. GPT-5.6 / GPT-6 and Claude expose thinking levels; gpt-6-astra cannot turn thinking off. Claude Opus 4.7+ and Fable use adaptive effort (xhigh / max).
/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 (npm skips a version that is already published), commit, then from sdks/pi run npm publish --access public. Push the same commit to github-private master. The old GitHub Actions workflow was removed because Gitea also runs files under .github/workflows/.
After install, users need pi update npm:@d-ai/pi — plain pi install does not replace.