English | 简体中文 | 日本語 | Français
An unofficial PicLumen Node.js toolkit for local automation, scripting, and research-oriented integrations. It wraps image generation, video generation, file upload, task querying, and a reusable grouped API surface.
- Unofficial project. Not affiliated with PicLumen.
- Intended for local automation and integration under accounts you are authorized to use.
- Provides a reusable client, CLI commands, and grouped
client.api.*accessors.
- Create image generation tasks
- Create video generation tasks
- Request temporary upload credentials and upload files to COS
- Query queue, history, and cancel tasks
- Access grouped API modules through
client.api.* - Run a local pipeline from reference image to image to video
- This repository is for interoperability research, personal automation, and local integration.
- Make sure your usage complies with PicLumen terms, account permissions, rate limits, and copyright requirements.
- The repository does not include real tokens, real account data, or production secrets.
- Node.js 18+
- A PicLumen session token from an account you are authorized to use
npm installPrefer environment variables:
# macOS / Linux
export PICLUMEN_AUTH_TOKEN="your-piclumen-token"
# Windows PowerShell
$env:PICLUMEN_AUTH_TOKEN="your-piclumen-token"You can also use a local config file:
copy piclumen-auth.example.json piclumen-auth.jsonpiclumen-auth.json is ignored by Git and should never be committed.
If you want to use Chrome-based local session loading, read SECURITY.md first and keep that usage limited to your own machine.
Check authentication:
npm run auth
npm run meList models:
npm run modelsShow CLI help:
npm run cli -- helpCreate an image:
npm run cli -- create-image \
--model "your-model-id" \
--prompt "orange cat icon on white background"Create a video:
npm run cli -- create-video \
--model "your-model-id" \
--prompt "a cute dog walks in a cozy kitchen" \
--duration 5 \
--ratio 720PQuery tasks:
npm run queue
npm run history -- --page-size 5Upload a file:
npm run cli -- upload --file "C:/absolute/path/demo.png"Use the grouped API collection when you want this repository to act like a reusable local API layer:
const { createApi } = require('./shared/client-factory');
async function main() {
const api = createApi();
const me = await api.user.getInfo();
const models = await api.models.listInternal();
const result = await api.generation.image({
modelId: models[0].model,
prompt: 'orange cat icon on white background',
width: 1024,
height: 1024,
});
console.log({
userId: me.userId,
taskMarkId: result.markId,
});
}
main().catch(console.error);If you already manage a PiclumenClient instance directly:
const { PiclumenClient } = require('./src/core/piclumen-client');
async function main() {
const client = new PiclumenClient({
authToken: process.env.PICLUMEN_AUTH_TOKEN,
});
const queue = await client.api.tasks.getQueue();
const history = await client.api.tasks.getHistory({ pageNum: 1, pageSize: 10 });
console.log({
queueSize: queue?.concurrentJobList?.length || 0,
historyCount: history?.list?.length || 0,
});
}
main().catch(console.error);Available API groups:
api.userapi.modelsapi.tasksapi.uploadsapi.generationapi.communityapi.authapi.request(...)
src/core/pipeline.js runs a local automation chain:
- Pick a reference image from
IPS/ - Upload the reference image
- Generate an image with Banana2
- Generate a video from the resulting image
Example:
npm run pipeline -- \
--ip "狗1" \
--image-prompt "a cute dog character, cinematic lighting" \
--video-prompt "the dog waves happily to the camera" \
--video-model wan26 \
--duration 5src/core/piclumen-client.js: core client and grouped API collectionsrc/cli/cli.js: CLI entry pointsrc/core/pipeline.js: local pipelineshared/client-factory.js: client and API factoriespiclumen-integration-guide.md: integration research notespiclumen-model-catalog.md: model catalog snapshot
- Never commit
piclumen-auth.json - Never commit
.envor real tokens - Never expose credentials in issues, screenshots, or logs
- Run a local secret scan before publishing changes
See SECURITY.md for more details.