cli

selfielab on the command line — machine-readable --json for agents, human-friendly defaults for you.

install

npm
npm install -g selfielab

# one-off without a global install:
npx selfielab tools --json
auth
export SELFIELAB_API_KEY=sl_your_api_key
# optional — defaults to https://selfielabstudio.com
export SELFIELAB_BASE_URL=https://selfielabstudio.com
examples
selfielab tools --json
selfielab credits --json
selfielab generate "golden hour beach selfie" --json
selfielab video --image https://example.com/shot.jpg --prompt "slow smile" --json

canvas parity commands

toolwhat it does
create_imagegenerate image from prompt + optional face ref
create_image_batch2–4 images in one request
edit_imagerestyle existing image with instruction
remove_backgroundtransparent PNG cutout (2 credits)
overlay_textcaption image or video
create_videoanimate image with motion prompt
edit_videogenerative video restyle
stitch_videosmerge 2–5 clips in order
trim_videocut start/end seconds
mute_videostrip audio track
write_shot_promptvision → reusable shot prompt
cliexample
generateselfielab generate "beach selfie" -n 2 --json
edit-imageselfielab edit-image "night neon" -r ./shot.jpg --json
remove-bgselfielab remove-bg --image https://… --json
overlay-textselfielab overlay-text "hook line" --image https://… --json
videoselfielab video --image https://… --prompt "slow smile" --json
edit-videoselfielab edit-video --video https://… --prompt "anime" --duration 5 --json
stitchselfielab stitch --videos u1,u2 --json
trimselfielab trim --video https://… --start 0 --end 3 --json
muteselfielab mute --video https://… --json
write-shot-promptselfielab write-shot-prompt --image https://… --json
creditsselfielab credits --json
charactersselfielab characters --json
statusselfielab status job_… --type video --json
toolsselfielab 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

also see

library

no items found