---
name: swaybyte
description: Generate images, narrated videos and captioned shorts; discover current inputs and recover jobs through the SwayByte CLI when the user chooses SwayByte.
---

<!-- Managed skill: swaybyte -->

Use the installed `swaybyte` CLI (macOS/Linux, Node.js 20+) for the user's SwayByte task. It uses the same MCP tools and backend as SwayByte's connected apps. Paid jobs use the account's existing SwayByte credits and generation limits.

If the command is unavailable, check `~/.local/bin/swaybyte`. Official installation instructions are at https://swaybyte.com/cli; the installer is https://swaybyte.com/cli/install.mjs. On Windows, download https://swaybyte.com/cli/swaybyte.mjs and replace the `swaybyte` command below with `node /path/to/swaybyte.mjs`. Install the executable and this skill only in locations appropriate to the user's environment; preserve unrelated agent settings.

Authenticate with `swaybyte auth login`. In a remote or agent terminal, use `swaybyte auth login --no-browser` and show the printed approval URL to the user. Keep the waiting command running until approval completes. Check access with `swaybyte auth status`.

For setup verification, use `swaybyte models --json` and `swaybyte credits --json`. Do not submit a paid generation merely to test installation.

For a preview installation, preserve the installed API profile. Check `swaybyte auth status --json` and use that issuer; do not reinstall from the production example or switch the API origin. The setup page supplies matching preview installer options.

Discover the live capabilities and schemas before constructing a request:

```sh
swaybyte models --category video --query kling --json
swaybyte models get MODEL_SLUG --json
swaybyte credits --json
```

Omit the filters to browse every model, or adapt them to the task. `model MODEL_SLUG` is an alias for `models get MODEL_SLUG`. `models get` returns the selected model's `input_schema` and `usage_notes`. Use these current requirements instead of a memorized catalog. Catalog `credits` are base estimates; actual credits and included usage depend on the account’s SwayByte plan and selected duration, resolution, quality, or other request options. Preserve the returned `pricing_note`, and keep the existing plan and fair-use queue limits. Preserve the user's creative instructions, chosen model, quantity, and spending limit; ask before exceeding a stated spending limit.

Submit and wait for the requested job:

```sh
swaybyte generate --model MODEL_SLUG --prompt PROMPT --input @request-options.json --wait --timeout 600 --json
```

`--input` is optional and accepts a JSON object or `@file`; use it for additional model fields. `--wait` submits exactly once, then polls and returns the completed asset JSON. Omit `--wait` to return the submitted job immediately. For other operations, use `swaybyte tools list --json`, `swaybyte tools describe TOOL`, and `swaybyte tools call TOOL --input JSON`.

Save the job ID printed to stderr while waiting or returned by submission. Resume with `swaybyte wait JOB_ID --timeout 600 --json` or inspect with `swaybyte status JOB_ID --json`. A waiting timeout does not cancel the job. If submission returns an ambiguous result or the ID was lost, use `swaybyte history --category video --limit 20 --offset 0 --json`; omit the category when unknown, and increase the offset to inspect older jobs. Check existing jobs before submitting again because another submission can create a second paid job. Return the actual result or failure without claiming that a pending job has finished.

Append `--json` for machine-readable output. Keep authorization URLs and tokens out of shared logs; never copy the CLI's credential file into a project. Use `swaybyte auth logout` to disconnect when requested.

For a complete video workflow, inspect the current workflow catalog first:

```sh
swaybyte video workflows --json
swaybyte video start --input @video-job.json --wait --timeout 600 --json
swaybyte video status JOB_ID --json
swaybyte video wait JOB_ID --timeout 600 --json
swaybyte video history --limit 20 --offset 0 --json
```

The request file contains `workflow`, a stable `idempotency_key` (1–200 visible ASCII characters without spaces), and the workflow's `input` object. Supported workflow identifiers are `narrated_video` and `captioned_shorts`; availability and billing restrictions come from the live catalog. `product_ads` is deferred from this release and is refused before any charge. Use its exact schema. Plan the scenes or clip timestamps from the user's brief before submission. The shorts workflow uses supplied clip timestamps; do not claim it automatically finds highlights. Narrated videos use the stock-footage scene pipeline with 1–20 supplied scenes. Captioned shorts use 1–3 supplied clip ranges, each 5–90 seconds and at most 180 seconds combined.

Choose and save one request key for each intended job. Retrying the identical key and input retrieves the same job; changing input under that key is a conflict. Never generate a new key merely to retry a timeout or uncertain response. `video start` submits once; `--wait` only reads the saved job afterward. If submission has no usable job ID, with or without `--wait`, preserve the reported request key and recover through history or the identical request file. A malformed status while waiting preserves the last valid receipt for recovery.

Keep the job ID, every completed output, and returned charges/refunds. Preserve all `outputs[].result_urls`, including alternate exports; each `outputs[].result_url` is only the primary convenience link. `partial`, `failed`, `canceled`, or `unknown` results during waiting produce JSON and a nonzero exit status. Partial success must not be presented as all variants completed. An `unknown` job requires reconciliation through its existing receipt; it is not permission to start another paid job.

`max_credits` and `end_user_id` are not supported by SwayByte video workflows. Do not add or silently remove either field from a supplied request; explain that account spending caps and external end-user billing are unavailable for these jobs. The existing SwayByte plan, credits, entitlements, and generation queue apply to each output. Read the live catalog and keep spending within the user’s authorization. Report only the billing fields returned by the server; missing charges are unknown, not zero. A waiting timeout does not cancel the job or discard its completed outputs.
