pi-xai-imagine
Pi extension for xAI image, video, and vision workflows
Package details
Install pi-xai-imagine from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-xai-imagine- Package
pi-xai-imagine- Version
0.1.0- Published
- Apr 22, 2026
- Downloads
- 128/mo · 11/wk
- Author
- luxusai
- License
- MIT
- Types
- extension
- Size
- 2.3 MB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi xAI Imagine

Standalone Pi extension for xAI media workflows.
Install
Via npm registry:
pi install pi-xai-imagine
Via git:
pi install github:luxus/pi-xai-imagine
Features
generate_image— create images from prompt or remix from reference imagesedit_image— edit one or more images with natural languagegenerate_video— text-to-video, image-to-video, or reference-to-videoedit_video— edit existing public or xAI-hosted video URLextend_video— continue existing video from last frameunderstand_image— analyze images with xAI vision/reasoning via/v1/responsesopen_xai_studio— open native Glimpse studio for refs, remix, edits, image-to-video, video edit/extendcheck_xai_health— verify xAI auth, base URL, models visibility, config source/xai-studio— command alias to open studio/xai-health— command alias to run health check
Dev
bun install
bun run format:fix
bun run lint:fix
bun run typecheck
Pre-commit hook via lefthook runs format, lint fix, typecheck on staged files.
Typecheck uses tsgo (@typescript/native-preview).
GitHub Actions runs bun run check:ci on push/PR.
CI pinned to Bun 1.3.11.
Notes
- API key source:
XAI_API_KEYenv var or Pi settings at./.pi/settings.jsonor~/.pi/agent/settings.json - Shared config namespace ready for reuse:
{ "xai": { "apiKey": "xai-...", "baseUrl": "https://api.x.ai/v1", "imagine": { "autoOpenGlimpse": true }, "voice": {}, "search": {} } } - Legacy
piXaiGensettings still merge intoxai.imagine - Image output supports
urlandb64_json - Video flow supports polling timeout + interval controls
- Video generation blocks invalid
image + referenceImagescombination - Image understanding uses
store: false
Repo assets
- Banner:
assets/pi-xai-imagine-github-banner.png