cli
npm install -g selfielab — generate, video, stitch, trim, mute, remove-bg, write-shot-prompt with --json for agents.
mcp connector
one-click remote mcp at /api/mcp — oauth browser sign-in for claude, codex, grok; optional cli fallback.
rest api
Full HTTP API: image/video generation, characters, media tools, credits. Bearer sl_ keys.
llms.txt
Machine-readable agent docs for GEO/AEO crawlers and coding agents.
quick install
npm install -g selfielab
# one-off without a global install:
npx selfielab tools --jsonexport SELFIELAB_API_KEY=sl_your_api_key
# optional — defaults to https://selfielabstudio.com
export SELFIELAB_BASE_URL=https://selfielabstudio.comcanvas parity tools
external agents can run the full creative loop without the web ui. authenticate with a personal sl_ api key (settings → api keys).
| 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 |
auth
Authorization: Bearer sl_your_api_key
# or
X-API-Key: sl_your_api_key
# OAuth access tokens from the connector flow also work as:
# Authorization: Bearer <access_token>create keys in the app under settings. api keys require a pro or studio subscription. generation spends the same credits as the web product.
suggested agent workflow
- write_shot_prompt on a reference look (optional)
- create_image / create_image_batch with face reference
- edit_image or remove_background / overlay_text
- create_video to animate
- trim_video · mute_video · stitch_videos · edit_video
- poll job status with selfielab status or the jobs api