$npx -y skills add pexoai/pexo-skills --skill text-to-videoTurn a text prompt or script into a finished, multi-shot video with Pexo. Auto-selects the best model across 10+ engines (Seedance, Kling, Veo, Sora), writes the prompts, generates every shot, and returns a publish-ready video with music and subtitles. Use when the user wants a v
| 1 | # Text to Video — Pexo |
| 2 | |
| 3 | **Pexo:** https://pexo.ai — get an API key, watch your project render, and buy credits there. |
| 4 | |
| 5 | Turn a written prompt or script into a finished, publish-ready video. You do not generate |
| 6 | anything yourself: you hand the request to the hosted Pexo agent (same backend as `pexo-agent`, |
| 7 | scoped to text-to-video) and deliver the result. Pexo writes the script, picks the best model |
| 8 | per shot, generates every shot, and adds music, subtitles, and transitions. |
| 9 | |
| 10 | ## Your role: relay, don't create |
| 11 | |
| 12 | Create a project, send the user's request **verbatim**, poll, deliver. Pexo's backend handles |
| 13 | all creative work — scriptwriting, model choice, prompts, music. Adding your own direction |
| 14 | (duration, style, models the user didn't ask for) overrides its judgment and produces worse |
| 15 | videos. |
| 16 | |
| 17 | ## Config |
| 18 | |
| 19 | `~/.pexo/config`: |
| 20 | ``` |
| 21 | PEXO_BASE_URL="https://pexo.ai" |
| 22 | PEXO_API_KEY="sk-<your-api-key>" |
| 23 | ``` |
| 24 | **No account / first run →** read `references/SETUP-CHECKLIST.md` and walk the user through it — it carries the signup flow with the **invite code that grants new users bonus credits**, plus how to create the config above. **Config error →** run `scripts/pexo-doctor.sh` and follow its output. |
| 25 | |
| 26 | ## Workflow |
| 27 | |
| 28 | Scripts live in this skill's `scripts/`. Reply to the user in their language. |
| 29 | |
| 30 | 1. **Create a project:** `pexo-project-create.sh "<short brief>"` → save the `project_id`. |
| 31 | 2. **Upload any files** the user gave: `pexo-upload.sh <project_id> <path>` → save `asset_id`, |
| 32 | reference it inline as `<original-image>asset_id</original-image>` (or `<original-video>` / |
| 33 | `<original-audio>`). Tags are required — a bare `asset_id` is ignored. Pexo can't crawl URLs — |
| 34 | download, then upload. |
| 35 | 3. **Send the request:** `pexo-chat.sh <project_id> "<user's exact words> <asset tags>"`. |
| 36 | Copy the user's words exactly; only add asset tags. |
| 37 | 4. **Tell the user** (their language): submitted ✓ · ~15–20 min · `https://pexo.ai/project/<project_id>`. |
| 38 | 5. **Poll:** every ≥60s run `pexo-project-get.sh <project_id>` and act on `nextAction`: |
| 39 | - **WAIT** → keep polling; every ~5 polls send a one-line update with the project link. |
| 40 | - **RESPOND** → handle each event in `recentMessages`: relay Pexo's text (wait for the |
| 41 | user's answer if it asked, then `pexo-chat.sh` their reply); for `preview_video`, run |
| 42 | `pexo-asset-get.sh <project_id> <assetId>` per option, show the URLs (A/B/C), let the user |
| 43 | pick, then `pexo-chat.sh <project_id> "<choice>" --choice <assetId>`; for a `document` |
| 44 | event, mention it to the user. |
| 45 | - **DELIVER** → `pexo-asset-get.sh <project_id> <final assetId>`, then send the user the |
| 46 | **full** asset URL as plain text — all `?…` query params, never truncated or wrapped in |
| 47 | markdown — plus the project link. |
| 48 | - **FAILED** → explain `nextActionHint` in plain terms and offer to retry. |
| 49 | - **RECONNECT** → `pexo-chat.sh <project_id> "continue"`, tell the user the connection |
| 50 | dropped and you're resuming, then keep polling. |
| 51 | - Never call `pexo-chat.sh` during WAIT — it triggers duplicate production. |
| 52 | - **Taking too long** → if it's been >30 min and still WAIT, tell the user (with the project |
| 53 | link + `https://pexo.ai/connect/openclaw`) it's running long; ask whether to keep waiting or |
| 54 | stop. Don't poll forever. |
| 55 | |
| 56 | ## Revisions |
| 57 | |
| 58 | After delivery, the user's tweaks ("make it shorter", "new music", "different shot") reuse the |
| 59 | **same** project: `pexo-chat.sh <project_id> "<their feedback>"`, then poll again (step 5). Never |
| 60 | create a new project for a revision — it throws away Pexo's server-side context. |
| 61 | |
| 62 | ## Credits |
| 63 | |
| 64 | If a script fails with "Credits balance" / "Insufficient credits": if the error carries a |
| 65 | purchase link, pass it to the user; otherwise tell them to add credits at `https://pexo.ai/home` |
| 66 | → Credits → Buy Credits. Retry after they confirm. |
| 67 | |
| 68 | ## Example |
| 69 | |
| 70 | User: "Make a 30-second video about our new coffee subscription." |
| 71 | |
| 72 | ```bash |
| 73 | pid=$(pexo-project-create.sh "coffee subscription promo") |
| 74 | pexo-chat.sh "$pid" "Make a 30-second video about our new coffee subscription." |
| 75 | # Tell the user: submitted, ~15–20 min, https://pexo.ai/project/$pid |
| 76 | # Poll pexo-project-get.sh "$pid" until nextAction is DELIVER, then deliver the asset URL. |
| 77 | ``` |
| 78 | |
| 79 | ## Scripts |
| 80 | |
| 81 | | Script | Usage | Ret |