> ## Documentation Index
> Fetch the complete documentation index at: https://evolink.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI command and API reference

> Complete commands, options, JSON output, recovery, and REST execution path

## CLI command reference

For released @evolinkai/cli **0.14.1**. Use evolink --help or evolink COMMAND --help --json for your installed version. Business commands support --json. Replace MODEL\_ID, QUOTE\_ID, TASK\_ID and UPLOAD\_ID with actual returned values.

### Authentication, diagnostics and skills

See [installation](https://evolink.ai/docs/en/cli/setup.md#cli-install).

| Command | Behavior |
| - | - |
| evolink --version | Version |
| evolink setup --agent codex --json | Prerequisites, login, skill sync and free connection verification |
| evolink auth login \[--no-browser] \[--timeout SECONDS] | OAuth, 30–900 seconds, default 180 |
| evolink auth status --json | Offline view of the saved login and access-token expiry; the token renews automatically, so an elapsed time is neither an expired login nor network verification |
| evolink auth logout | Revoke the current CLI session and sign out |
| evolink doctor --agent codex --json | Environment, storage, account, models and skills, plus a CLI update check; without `--agent` it also inspects installed skills (guidance only, `ok` unchanged) |
| evolink skills install \[--agent NAME] \[--replace-modified] | Install/sync; preserve edits by default |
| evolink skills status \[--agent NAME] --json | Missing, current, outdated, modified or conflicting skills |

Agent values: all/codex/claude-code/cursor/gemini/opencode/copilot/openclaw/hermes; default all. The assistant must still verify skill discovery.

Output from `setup`, `doctor` and `auth login` includes `update` (`status`, `update_available`, `latest_version`, `command`); other commands print a stderr notice at most once a day when a newer release exists. Set `EVOLINK_CLI_UPDATE_CHECK=0` to turn checks off; see [How to know a new version exists](https://evolink.ai/docs/en/cli/setup.md#update-check).

### Models, inputs and documentation

```bash theme={null}
evolink models search --type image --query seedream --limit 5 --page 1 --json
evolink models show MODEL_ID --json
evolink models schema MODEL_ID --json
evolink models pricing --model MODEL_ID --json
evolink models recommend --type video --query seedance --references image --limit 3 --json
evolink docs search --type video --query "first frame" --limit 5 --json
```

| Command | Options and output |
| - | - |
| models search | type image/video/audio/all, default all; limit 1–50, default 20; page 1–100000; query up to 100 characters |
| models show MODEL\_ID | Canonical ID, aliases, parameters, prices, references, documentation provenance and schema |
| models schema MODEL\_ID | Versioned input/submission schema; explicitly fails when unavailable |
| models pricing | Public default pricing rules, readable without login and not a task quote; optional --model, --modality text/image/video/audio, --view summary/full (default full), --product-id, --operation and --lifecycle active/preview/deprecated |
| models recommend | Required type image/video/audio; references comma-separated image/video/audio; limit 1–10 |
| docs search | Required query up to 100 characters; type as search; limit 1–20, default 5 |

Docs search uses the bundled official model-reference index, not a live website crawl. Recommendation is based on documented inputs, keywords and editorial platform preferences, not a popularity leaderboard. Unit prices are not task quotes.

### Quotes and generation

Create input.json using the model's real parameters, then obtain a free quote:

```bash theme={null}
evolink estimate --model MODEL_ID --input-file input.json --max-cost-usd 1 --json
```

| Option | Meaning |
| - | - |
| --model | Required canonical ID or supported alias |
| --input-file FILE / --input JSON | JSON object, choose one; omission starts with an empty object |
| --inputs-file FILE | JSON array or JSONL of 1–50 inputs for one model, instead of one input; one quote covers the batch |
| --prompt TEXT | Prompt shortcut; cannot conflict with JSON prompt |
| --max-cost-usd NUMBER | Positive submission estimate cap, at most USD10000 |
| --media-seconds NUMBER | Positive pricing hint up to 3600 seconds, not a model input |
| --pricing-parameters JSON | JSON object of measured or explicitly expected billing usage that the pricing rules need, such as `{"search_count":2}`; supply what `missing_usage` names and never invent values |
| --pricing-source pricing\_rules | Optional. Estimates always use the published pricing rules; the older values account and public\_reference are accepted as aliases |
| --refresh-quote QUOTE\_ID | Estimate a saved, unsubmitted quote again with its saved input and budget; cannot be combined with the options above |

A successful quote returns quote\_id, holds for **24 hours** from the estimate (`expires_at`), and binds login, backend, model and exact inputs. Generation reads the pricing rules again before submitting: the same input is submitted when its price is the approved one or lower, also under later rules; a higher price fails with `price_changed`, a changed input with `quote_input_changed`, and an expired quote with `quote_expired`. Nothing is sent in those cases, and a new quote and approval are needed. Failed/cap-refused estimates are not usable quotes. An estimate that lacks billing usage fails with each missing value and the option that supplies it, and saves no quote. Show specifications, range and warnings, wait for explicit approval, then select the matching command:

```bash theme={null}
evolink generate image --quote QUOTE_ID --confirm --wait --timeout 1800 --json
evolink generate video --quote QUOTE_ID --confirm --json
evolink generate audio --quote QUOTE_ID --confirm --json
```

These are separate examples; one quote covers one type/task. Generation accepts no replacement model/input. Requote and approve changes. --confirm declares approval was obtained; it cannot ask the user by itself.

To renew a quote that has not been submitted, for example after it expired or the price rose, refresh it:

```bash theme={null}
evolink estimate --refresh-quote QUOTE_ID --json
```

The refreshed quote has a new quote\_id, keeps the original request ID and replaces the earlier quote. Show it to the user, obtain approval again, and submit only the newest quote. Submitting or resuming a replaced quote fails with `quote_superseded`, which names the current quote or its task. A quote whose submission has started cannot be refreshed (`submission_already_started`); recover its task instead. A refresh that runs while another one replaces the same quote returns `quote_refresh_conflict`.

A quote from `--inputs-file` covers the whole batch: `generate --quote QUOTE_ID --confirm` submits every input at once (up to 10 at a time) and returns each input's task ID or error without waiting; `--wait` is for one task. Collect the results with `tasks batch --ids`.

Only when the user explicitly said not to estimate or confirm:

```bash theme={null}
evolink generate image --model MODEL_ID --input-file input.json --skip-estimate --json
```

`--skip-estimate` submits without a quote, also with `--inputs-file`: the price is not checked, the task is charged by actual usage, and the result says so (`estimate_skipped`). Invalid input is still refused, and an explicit `--max-cost-usd` still applies: a request over it, or one whose price cannot be checked against it, is not submitted. `--skip-estimate` cannot be combined with `--quote` or `--confirm`. The command saves a record with its own request ID and returns a quote\_id for `tasks resume`.

\--wait waits for the existing task. Timeout 1–86400 seconds, default 1800. Timeout/Ctrl-C does not cancel the server task. The timeout covers every read, retry and pause; at the limit, `wait_timeout` reports the last verified status and its `read_at`, or `status_check: unverified` when the latest status could not be read. Complete estimates default to their quoted maximum for submission checks. See [budget limitations](https://evolink.ai/docs/en/cli/billing.md).

### Tasks, batches and recovery

```bash theme={null}
evolink tasks get TASK_ID --json
evolink tasks wait TASK_ID --timeout 1800 --json
evolink tasks batch --ids TASK_ID_ONE,TASK_ID_TWO --json
evolink tasks list --type video --status processing --since 2h --limit 20 --page 1 --json
evolink tasks resume --quote QUOTE_ID --json
```

| List option | Contract |
| - | - |
| --status | processing/completed/failed/cancelled; processing includes queued; omit for all |
| --type | image/video/audio; omit for all media |
| --model | Exact canonical model ID |
| --since / --until | Creation time: ISO 8601, Unix seconds, 30m/2h/1d; until inclusive |
| --page / --limit | Page 1–100000; size 1–50, default 20 |

Time filtering affects only the selected page. History covers the account, not just this chat. An empty page cannot prove submission was absent; total precedes local time filtering. Batch IDs are 1–50 comma-separated values.

With a task ID, use get/wait. For a lost submit response, resume the original quote with its request ID and login. For a batch, `tasks resume --quote QUOTE_ID` finishes the inputs that were not submitted; accepted inputs return their original tasks without a new charge. `tasks resume` replays the request ID only within 23 hours of its first submission (EvoLink keeps it for 24 hours); after that it refuses with `recovery_window_passed`. It follows the quote rule as well: with an expired quote (`quote_expired`) or a higher price (`price_changed`) nothing is sent. In each case, check `tasks batch` or `tasks list` for what went through, and estimate only the rest as a new generation or batch. If records are lost, expired or the account changed, inspect history/console before another paid intent. CLI has no cancellation command.

### Balance and task usage

```bash theme={null}
evolink balance --json
evolink usage --since 7d --until 1h --type video --max-pages 5 --json
```

Balance returns account balance and applicable limits. Usage accepts model/type/creation time; default since 30d, max-pages 1–20, default 5, 50 tasks per page. Inspect missing costs, coverage and truncation.

Usage is reported completed-task cost from bounded account-wide retained history, not a bill, refund ledger, CLI/MCP-only usage or final budget.

### Uploads and original downloads

```bash theme={null}
evolink upload ./reference.mp4 --upload-path references --json
evolink uploads get UPLOAD_ID --json
evolink download TASK_ID --output ./result.mp4 --index 1 --json
evolink download TASK_ID --all --output-dir ./results --json
evolink download TASK_ID --all --output-dir ./results --resume --json
```

CLI accepts regular files from **1 byte to 95 MiB**, saving an upload ID first. uploads get only reads the original receipt. Without compatible backend support, it can report unknown without resending. References typically remain for 72 hours.

Download index is 1-based, default 1, range 1–50. Parent directories must exist; files are not overwritten. Each result is at most 1 GiB. Type/content checks reject HTML error pages masquerading as media.

Batch mode --all --output-dir DIR supports --template NAME and --resume. Resume uses original batch records and does not trust arbitrary same-name files. More in [task delivery](https://evolink.ai/docs/en/cli/workflows.md#tasks).

### JSON, exit codes and configuration

\--json writes one stdout JSON line with schema\_version:1 and ok. Progress goes to stderr. Errors use ok:false/error and nonzero exit; Ctrl-C usually exits with code 130. A task status:failed differs from a query invocation failure. Check command ok, then task state.

Local records remain in \~/.evolink-media; credentials use OS secure storage. Do not copy this directory to migrate login or delete quote/recovery records to fix an uncertain submission.

Advanced --server selects the OAuth resource/identity binding, default [https://mcp.evolink.ai/mcp](https://mcp.evolink.ai/mcp), without changing REST execution. Keep --api-url/--files-url production defaults; arbitrary external URLs are refused. --token-stdin is a one-command OAuth access token, not a platform API key, and is not for setup. Do not put tokens in command arguments or logs.

No generic run, text chat, cancellation, top-up, key management or custom alias-file command is provided. Use the corresponding console/API.

## CLI execution path and APIs

Since CLI 0.8.0, media requests use **terminal or agent → EvoLink CLI → platform REST API**. Input checks, model references, estimation, and result formatting run locally; business execution does not call remote MCP tools/call.

| Service | Address and role |
| - | - |
| Platform API | [https://api.evolink.ai](https://api.evolink.ai): models, media, tasks, and balance |
| Passport | [https://passport.evolink.ai](https://passport.evolink.ai): browser authorization and refresh |
| Files | [https://files-api.evolink.ai](https://files-api.evolink.ai): uploads and compatible receipts |
| OAuth resource | [https://mcp.evolink.ai/mcp](https://mcp.evolink.ai/mcp): identity binding, not the media execution path |
| Generated originals | HTTPS URLs returned by tasks: direct download without platform tokens |

### Commands and backend operations

| CLI capability | Backend operation or implementation |
| - | - |
| models search | `GET /v1/models`, combined with aliases, references, and availability |
| models show/schema, models recommend, docs search | Published bundled references, shared rules, and current account catalog |
| estimate | `GET /web/api/models/pricing` and client estimation rules |
| generate image | `POST /v1/images/generations` |
| generate video | `POST /v1/videos/generations` |
| generate audio | `POST /v1/audios/generations` |
| tasks get/wait | `GET /v1/tasks/{task_id}` |
| tasks batch | `POST /v1/tasks/batch` |
| tasks list, usage | `GET /v1/tasks`, pagination, and bounded aggregation |
| balance | `GET /v1/credits` |
| upload | `POST /v1/files/upload-token`, followed by direct file-service upload |
| uploads get | Compatible file service `GET /api/v1/files/upload-receipts/{upload_id}` |
| download | Direct task result download, format checks, and result records |

CLI quote\_id, --confirm, and recovery files implement a client workflow, not new backend fields. Published CLI 0.14.1 estimates from the public pricing rules (reference rates, no account discounts). --max-cost-usd is not a final settlement cap.

### Requests, recovery, and automation

Persist the quote and request identifier before submitting. REST uses existing Idempotency-Key / X-Evo-Run-Id identifiers. Recover with the original quote after a lost response; do not change identity, inputs, or identifiers to resubmit. Client records alone do not prove uniform backend idempotency across production nodes.

Scripts should inspect ok, then task status, then results and cost fields. Store quote\_id, task\_id, and download manifests instead of relying on the last terminal line. Query errors, failed tasks, and failed downloads require different handling. Do not unconditionally retry paid submissions.

CLI and native MCP sessions are managed separately, but account OAuth currently shares the permissions, limits, and pause state of `EvoLink MCP (OAuth)`. Use the [separate MCP documentation](https://evolink.ai/docs/en/mcp/overview.md) for native connections.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.