install
npm
npm install -g selfielab
# one-off without a global install:
npx selfielab tools --jsonauth
export SELFIELAB_API_KEY=sl_your_api_key
# optional — defaults to https://selfielabstudio.com
export SELFIELAB_BASE_URL=https://selfielabstudio.comexamples
selfielab tools --json
selfielab credits --json
selfielab generate "golden hour beach selfie" --json
selfielab video --image https://example.com/shot.jpg --prompt "slow smile" --jsoncanvas parity commands
| tool | what it does |
|---|---|
| create_image | generate image from prompt + optional face ref |
| create_image_batch | 2–4 images in one request |
| edit_image | restyle existing image with instruction |
| remove_background | transparent PNG cutout (2 credits) |
| overlay_text | caption image or video |
| create_video | animate image with motion prompt |
| edit_video | generative video restyle |
| stitch_videos | merge 2–5 clips in order |
| trim_video | cut start/end seconds |
| mute_video | strip audio track |
| write_shot_prompt | vision → reusable shot prompt |
| cli | example |
|---|---|
| generate | selfielab generate "beach selfie" -n 2 --json |
| edit-image | selfielab edit-image "night neon" -r ./shot.jpg --json |
| remove-bg | selfielab remove-bg --image https://… --json |
| overlay-text | selfielab overlay-text "hook line" --image https://… --json |
| video | selfielab video --image https://… --prompt "slow smile" --json |
| edit-video | selfielab edit-video --video https://… --prompt "anime" --duration 5 --json |
| stitch | selfielab stitch --videos u1,u2 --json |
| trim | selfielab trim --video https://… --start 0 --end 3 --json |
| mute | selfielab mute --video https://… --json |
| write-shot-prompt | selfielab write-shot-prompt --image https://… --json |
| credits | selfielab credits --json |
| characters | selfielab characters --json |
| status | selfielab status job_… --type video --json |
| tools | selfielab tools --json |
agent output
--json writes a single json object to stdout. status messages go to stderr so pipes stay clean.
example
selfielab generate "golden hour" -n 2 --json
# {"success":true,"jobId":"…","status":"completed","images":["https://…","https://…"]}global flags
- --api-key · --base-url
- --json · --no-wait · --timeout <secs>
- -h / --help · -v / --version