Official CLI contract for WisyLink API operations.
#Availability
npm i -g @wisylink/cli#Authentication
CLI requests use the same API key auth as the HTTP API.
Set your API key:
export WISYLINK_API_KEY="your_api_key"Or pass per command:
wisylink links get 67e6f6e6c5a91e4d2d9b0a77 --api-key "your_api_key"#Global Flags
| Flag | Type | Description |
|---|---|---|
--api-key <value> | string | Overrides WISYLINK_API_KEY |
--timeout <ms> | number | Request timeout (1000..120000) |
--help | boolean | Show command help |
--version | boolean | Show installed CLI version |
#Rules
| Rule | Value |
|---|---|
| File id format | 24-char hex |
| Link id format | 24-char hex |
| Max file_ids per link request | 10 |
| Prompt max length | 5000 chars |
| Link statuses | pending, generating, completed |
#Commands
CLI command reference grouped by resource. Each command maps directly to an HTTP API endpoint.
#Files
Upload, inspect, and delete file assets that can be attached to link generation.
#Upload File
wisylink files upload <path>Maps to chunk upload flow:
POST /filesPOST /files/chunks?id=...
CLI uploads in <=4 MB chunks automatically (up to 25 MB total file size). The final chunk is sent with last=true.
Example:
wisylink files upload "./asset.png"Success output:
{
"id": "67e6f6e6c5a91e4d2d9b0a11",
"ok": true
}#Get File
wisylink files get <id>Maps to GET /files/:id.
Example:
wisylink files get 67e6f6e6c5a91e4d2d9b0a11#Delete File
wisylink files delete <id>Maps to DELETE /files/:id.
Example:
wisylink files delete 67e6f6e6c5a91e4d2d9b0a11Success output:
{
"ok": true
}#Links
Create, read, update, and delete links backed by the WisyLink API.
#Create Link
wisylink links create --type <type> --prompt <prompt>Maps to POST /links.
Rules:
- New links are created with
status: pending.
Arguments:
| Flag | Type | Required | Rules |
|---|---|---|---|
--type | string | Yes | image, audio, video, pdf, page |
--prompt | string | Yes | 1..5000 chars |
--hosted | boolean | No | Defaults to false |
--private | boolean | No | Defaults to false |
--file-id | string | No | Repeatable flag, max 10 total |
Example:
wisylink links create \
--type "video" \
--prompt "Create a short product trailer with energetic pacing." \
--hosted true \
--private true \
--file-id 67e6f6e6c5a91e4d2d9b0a11 \
--file-id 67e6f6e6c5a91e4d2d9b0a22Success output:
{
"id": "67e6f6e6c5a91e4d2d9b0a77",
"shared_url": "https://wisylink.com/67e6f6e6c5a91e4d2d9b0a77",
"status": "pending",
"created_at": 1762432496000,
"updated_at": 1762432496000
}#Get Link
wisylink links get <id>Maps to GET /links/:id. Response includes type, prompt, hosted, private, status, meta (title, description, cover, duration), outputs, file_ids, timestamps, and shared_url. meta is present only when status is completed; meta.duration is included only for audio and video types.
Example:
wisylink links get 67e6f6e6c5a91e4d2d9b0a77#Update Link
wisylink links update <id>Maps to PATCH /links/:id.
Arguments:
| Flag | Type | Required | Rules |
|---|---|---|---|
--prompt | string | No | 1..5000 chars |
--hosted | boolean | No | true / false |
--private | boolean | No | true / false |
--file-id | string | No | Repeatable flag, full replacement when sent |
Rules:
- Provide at least one updatable flag.
- If
--file-idis sent, it replaces the full attachment set. - To keep existing attachments, include them again in the same update command.
- Hosted links cost 1 credit/day; hosted + private links cost 2 credits/day.
Example:
wisylink links update 67e6f6e6c5a91e4d2d9b0a77 \
--prompt "Create a 20-second trailer, emphasize motion graphics." \
--hosted false \
--private true \
--file-id 67e6f6e6c5a91e4d2d9b0a22#Delete Link
wisylink links delete <id>Maps to DELETE /links/:id.
Example:
wisylink links delete 67e6f6e6c5a91e4d2d9b0a77Success output:
{
"ok": true
}#Output
All command outputs are root-level JSON objects aligned with API responses.