> ## 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.

# MCP tool and API reference

> Parameters, examples, results, protocol, and backend mapping for 16 tools

## MCP tool reference

This page describes the 16 tools in the **1.12.1** OAuth remote MCP release. The connected server's `tools/list` is authoritative. Local stdio does not expose `prepare_upload` or `get_upload`; its `upload_file` also accepts paths within explicitly allowed directories.

The `name` and `arguments` examples describe MCP tool calls, not REST request bodies. An example does not authorize a paid generation.

| Tool | Purpose | Generation charge |
| - | - | - |
| search\_models | Search available models and aliases | None |
| recommend\_models | Compare models matching the request and reference types | None |
| search\_docs | Search the versioned official model-reference index | None |
| get\_model | Inspect parameters, schema, references, and pricing | None |
| estimate\_cost | Validate inputs and estimate cost | None |
| get\_pricing\_rules | Read public default pricing rules (reference rates, not a quote) | None |
| generate\_image | Generate or edit images | Paid |
| generate\_video | Generate, edit, or extend video | Paid |
| generate\_audio | Generate music, songs, or speech | Paid |
| get\_task | Inspect a task, results, and reported cost | None |
| list\_tasks | Query IDs or paginated account history | None |
| get\_task\_usage | Summarize reported costs within a bounded scan | None |
| check\_balance | Inspect account balance and shared limits | None |
| upload\_file | Upload a URL or base64 reference | No generation charge; file quotas apply |
| prepare\_upload | Prepare a one-use upload for a local file | No generation charge; file quotas apply |
| get\_upload | Recover an existing upload's status and URL | None |

### search\_models

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| type | string | No | image/video/audio/all; default all |
| query | string | No | Search keywords, up to 100 characters |
| limit | integer | No | 1–50; default 20 |
| page | integer | No | 1–100000; default 1 |

```json theme={null}
{"name":"search_models","arguments":{"type":"image","query":"seedream","limit":5,"page":1}}
```

Returns models, total\_matches, page, page\_size, and next\_page. Entries include canonical IDs, aliases, references, documentation coverage, and starting prices. Ordering considers keyword relevance first, then price availability, editorial preference, and ID. It is not a quality or popularity ranking. Starting prices are not task totals, and availability can change between pages.

### recommend\_models

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| type | string | Yes | image/video/audio |
| query | string | No | Up to 100 characters; all search terms must match |
| references | string\[] | No | image/video/audio; at most 3 entries; default empty |
| limit | integer | No | 1–10; default 3 |

```json theme={null}
{"name":"recommend_models","arguments":{"type":"video","query":"seedance","references":["image"],"limit":3}}
```

Returns documented candidates with reasons, reference\_inputs, selection\_basis, and unit pricing. Required reference types must have documented input fields. If no model matches, adjust the request transparently rather than dropping a necessary reference. Editorial preferences are not live popularity or release-date statistics.

### search\_docs

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| query | string | Yes | 1–100 characters after trimming |
| type | string | No | image/video/audio/all; default all |
| limit | integer | No | 1–20; default 5 |

```json theme={null}
{"name":"search_docs","arguments":{"query":"first frame","type":"video","limit":5}}
```

Returns documents, total\_matches, scope, and source version. It searches bundled official model titles, IDs, and parameter descriptions for available models. It does not crawl the live documentation site or search account and billing documentation.

### get\_model

Required `model`: a string of 1–128 characters, using a returned canonical ID or supported alias.

```json theme={null}
{"name":"get_model","arguments":{"model":"z-image-turbo"}}
```

Returns the canonical model, requirements, examples, public pricing, reference\_inputs, parameters\_source, and, when available, input\_schema with its source. Parameter references are versioned; account availability is queried live. Follow missing-information warnings rather than inventing defaults.

### estimate\_cost

| Parameter | Type | Required | Description |
| - | - | - | - |
| model | string | Yes | 1–128 characters |
| input | object | No | Planned model parameters; defaults to an empty object |
| inputs | object\[] | No | 1–50 inputs of one model instead of input, in the order they will be submitted |
| pricing\_parameters | object | No | Measured or explicitly expected billing usage that the pricing rules need, such as `{"search_count":2}`; up to 100 entries. Not used for token counts of GPT Image, Gemini Omni Flash or Qwen TTS. Do not invent values |
| pricing\_source | string | No | Defaults to pricing\_rules, the published pricing rules; the older values account and public\_reference are accepted as aliases |
| media\_seconds | number | No | Greater than 0 and at most 3600; estimation hint only |

```json theme={null}
{"name":"estimate_cost","arguments":{"model":"z-image-turbo","input":{"prompt":"A cream ceramic coffee cup on a white background"}}}
```

Returns input\_valid, problems, warnings, estimate, pricing\_scope, final\_budget\_enforced, and balance/limits when available. The estimate status can be estimated, partial, token\_billed, needs\_input, or no\_price; token\_billed carries a reference price billed by actual tokens. When the price depends on usage the input does not give, the estimate has no amount and no `pricing_quote`: `total_known` is false, `missing_usage` names each missing value and `usage_help` says how to supply it. See [billing](https://evolink.ai/docs/en/mcp/billing.md). A successful query does not prove valid input or a complete quote.

An estimate that can be approved also returns `pricing_quote`, the approval record for exactly this input. After the user approves, pass it with the same input to the generation tool. It holds for 24 hours from the estimate (`expires_at`), at the approved price or lower: the generation tool estimates again and submits when the price is unchanged or lower, also under later pricing rules. A higher price is refused with `price_changed`, a changed input with `quote_input_changed`, and an expired `pricing_quote` with `quote_expired`; each needs a new estimate and approval. With `inputs`, the result lists each input's estimate and the total, and one `pricing_quote` approves exactly those inputs in that order. It never approves a single input, and a single input's `pricing_quote` never approves a batch.

This tool has no `max_cost_usd` argument and does not produce the CLI's local quote\_id. MCP budget checks belong to generation tools. media\_seconds does not set output duration or fill unknown reference-video multipliers.

### get\_pricing\_rules

| Parameter | Type | Required | Description |
| - | - | - | - |
| model | string | No | One model ID, up to 100 characters |
| product\_id | string | No | Filter by product family |
| operation | string | No | Filter by operation, such as `text_to_video` |
| modality | string | No | `text`, `image`, `video`, or `audio` |
| lifecycle | string | No | `active`, `preview`, or `deprecated` |
| view | string | No | `summary` or `full`; default `full` |

```json theme={null}
{"name":"get_pricing_rules","arguments":{"model":"seedance-2.5-text-to-video","view":"full"}}
```

Returns the public default pricing rules: each billing component's unit rate (decimal strings), minimum charge, tiers and full expressions, plus price\_scope and price\_selection. These are reference rates without account discounts, not a task quote, a bill or a final spending cap; do not multiply unit rates into a bill. Use `estimate_cost` for the expected cost of a specific generation; it evaluates the same rules for the actual input. An empty result means no matching public rules, not a free model. In a list, a model whose rules cannot be read or are incomplete is left out, listed in `rejected_models` and named in `warnings`; the other models are returned as usual, and a left-out model is not free. A single-model lookup still fails when its rules cannot be read.

### generate\_image, generate\_video, generate\_audio

Choose the tool matching the output type. They share these top-level arguments:

| Parameter | Type | Required | Description |
| - | - | - | - |
| model | string | Yes | 1–128 characters; must match the media type |
| input | object | No | Parameters from get\_model; do not include model or callback\_url |
| inputs | object\[] | No | 1–50 inputs of one model instead of input, submitted in one call; see [batches](#batches) |
| prompt | string | No | Shortcut for input.prompt; up to 20000 characters, subject to model limits |
| client\_request\_id | string | No | 16–96 characters: letters, digits, . \_ -; reuse when recovering the same request; with inputs at most 93, since each item adds .NN |
| pricing\_quote | object | No | Approval record from estimate\_cost for exactly this input or batch, valid until its expires\_at; checked against the current rules before submission |
| pricing\_parameters | object | No | The same billing usage passed to estimate\_cost |
| max\_cost\_usd | number | No | Greater than 0 and at most 10000; submission-time estimate check |
| media\_seconds | number | No | Greater than 0 and at most 3600; estimation hint only |
| wait\_seconds | integer | No | 0–40; how long to wait for the result after submitting. Images default to 40, video and audio to 0; 0 returns the task\_id right away. A batch accepts only 0 |
| skip\_estimate | boolean | No | Only when the user explicitly said not to estimate or confirm; submits without an approved estimate. See [generating without an estimate](#skip-estimate) |

Inspect the model and inputs, estimate the complete request, disclose limitations, and obtain explicit cost approval before calling, unless the user opted out of estimates (below). This is an illustrative call shape:

```json theme={null}
{"name":"generate_image","arguments":{"model":"z-image-turbo","input":{"prompt":"A cream ceramic coffee cup on a white background"},"client_request_id":"coffee-image-demo-001"}}
```

Image generation waits for up to approximately 40 seconds, returning results if ready or a task\_id otherwise. Video and audio return a task\_id after submission; continue with get\_task. `wait_seconds` changes this wait for each of the three tools. Submission can report a precharge, which must be distinguished from completed-task cost.

Query a running task rather than calling generation again to check progress. If the response is lost, retain the original ID, account, inputs, and request identifier. A different identifier creates a new paid intent. Client recovery protections do not prove identical backend idempotency guarantees across all production nodes.

**Generating without an estimate.** When the user explicitly says not to estimate or confirm (for example "generate directly" or "from now on just generate"), the assistant skips `estimate_cost` and the confirmation and passes `skip_estimate: true`, within the scope the user gave: this task, this batch or the rest of the conversation. It never infers this from silence, the balance or its own suggestion. When the user opts out for the rest of the conversation, the assistant says once that later generations will be submitted without asking; a new conversation, or asking to restore estimates, brings them back. The generation is submitted even when its price cannot be computed or a `pricing_quote` is refused as expired, higher-priced or changed, and the result says so (`estimate_skipped`, `estimate_skip_reason`); the task is charged by actual usage. Invalid input is still refused, an explicit `max_cost_usd` still applies (a request over it, or one whose price cannot be checked against it, is not submitted), and enabling model web or image search still needs the user's approval. If an estimate fails or has no total and the user has not opted out, the assistant asks once whether to generate anyway at actual usage.

**Batches.** For several tasks of one model, pass `inputs` (1–50 items, each like `input`) to `estimate_cost` and then, with its `pricing_quote`, to the generation tool: one estimate, one approval for the total, and one call that submits every item (up to 10 at a time) and returns each item's `task_id` or error without waiting. If any item is invalid, nothing is submitted. `max_cost_usd` applies to the batch total; `media_seconds` and `pricing_parameters` apply to every item. Collect the results with `list_tasks` (`task_ids`, up to 50 per call). Submit tasks of different models one per call with `wait_seconds: 0`. Do not rely on `n` for the image count: some models, such as GPT Image, often return fewer images than `n`, so use one item per image.

No item starts more than 25 seconds after the call began, and a started submission is never cut off; items not started are listed as not submitted. To finish a batch, call again with the same `client_request_id` and exactly the same `inputs` within 24 hours of the first submission: the items the result lists to finish are submitted, and accepted items return their original tasks without a new charge. If the `pricing_quote` has expired by then, estimate the same inputs again and pass the new one. For an item with an unknown outcome, retry later the same way or check `list_tasks`. Within those 24 hours, never resubmit accepted, not-submitted or unknown-outcome items under a new `client_request_id`: that creates and charges new tasks. After them the same `client_request_id` no longer prevents a second charge: check `list_tasks` first, then submit only the items that did not go through, as a new batch with a new estimate and `client_request_id`. An item whose input differs from what that `client_request_id` submitted earlier is refused (`idempotency_conflict`); it is a new task that needs its own estimate, approval and `client_request_id`.

### get\_task

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| task\_id | string | Yes | Original supported task ID; 4–128 characters |
| wait\_seconds | integer | No | 0–45; default 30; bounds the whole call, including retries. 0 reads once without waiting for the task; that read can still take up to 15 s |

```json theme={null}
{"name":"get_task","arguments":{"task_id":"TASK_ID_FROM_RESPONSE","wait_seconds":30}}
```

Returns status, progress, results, reported cost, or error. Continue querying the same ID while it runs. A failed task returns its error code (`error.code`), the explanation the API also returns (`error.message`), and a `billing_note`: the task is not charged, and the credits reserved at submission are returned automatically. Original results are generally retained for 24 hours. Preview rendering depends on the host client.

### list\_tasks

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| task\_ids | string\[] | No | 1–50 IDs; batch mode |
| status | string | No | processing/completed/failed/cancelled |
| type | string | No | image/video/audio |
| model | string | No | Exact model ID; 1–128 characters |
| page | integer | No | 1–100000; default 1 |
| since / until | string | No | ISO 8601, Unix seconds, or 30m/2h/1d; up to 40 characters |
| limit | integer | No | 1–50; default 20 |

```json theme={null}
{"name":"list_tasks","arguments":{"type":"video","since":"2h","page":1,"limit":20}}
```

```json theme={null}
{"name":"list_tasks","arguments":{"task_ids":["TASK_ID_ONE","TASK_ID_TWO"]}}
```

task\_ids cannot be combined with status/type/model/page/since/until. Batch mode returns tasks and missing; history returns total/page/page\_size/next\_page/last\_page. If result links or error codes cannot be read for finished rows, the base page is kept: details\_status, a per-row details\_reason (read\_failed, invalid or not\_returned) and details\_retry\_task\_ids say what is missing and what to retry for free; check not\_returned rows with get\_task. processing includes queued tasks. Time filters apply to the selected page; total is counted before time filtering. History is account-wide, not limited to this conversation. An empty page does not prove that submission never happened.

### get\_task\_usage

| Parameter | Type | Required | Default / range |
| - | - | - | - |
| since | string | No | Default 30d; lower creation-time bound |
| until | string | No | Default current time; inclusive boundary |
| model | string | No | Exact ID; 1–128 characters |
| type | string | No | image/video/audio |
| max\_pages | integer | No | 1–20; default 5; 50 tasks per page |

```json theme={null}
{"name":"get_task_usage","arguments":{"since":"7d","type":"video","max_pages":5}}
```

Returns totals, by\_model, by\_status, coverage, and as\_of. Inspect missing\_cost\_tasks, truncated, concurrent\_change\_detected, and complete\_for\_retained\_tasks. It summarizes reported costs for retained completed account tasks. It is not a complete invoice, payment/refund ledger, MCP-only usage report, or settlement limit.

### check\_balance

No arguments:

```json theme={null}
{"name":"check_balance","arguments":{}}
```

Returns account\_balance\_credits/usd, spent\_scope, spent\_credits, and available total/daily limits with console links. OAuth Key spending includes the account's CLI and all OAuth MCP sessions, rather than only this conversation.

### upload\_file

| Parameter | Type | Required | Description |
| - | - | - | - |
| file\_url | string | One source required | Public HTTPS media; no private-network or credential URLs |
| base64\_data | string | One source required | At most 1 MiB decoded in remote mode |
| mime\_type | string | Conditional | Required for raw base64; data URLs contain MIME |
| file\_name | string | No | Plain filename, without directories |
| upload\_path | string | No | Relative directory, without .. |

```json theme={null}
{"name":"upload_file","arguments":{"file_url":"https://example.com/reference.png","file_name":"reference.png"}}
```

Replace the URL with actual accessible media. Returns file\_url, file properties, and expiration information. References are generally retained for 72 hours. Remote MCP cannot accept file\_path. Local stdio can instead use an absolute path in an allowed directory; choose exactly one source. Successful upload does not prove that the selected model supports the media.

### prepare\_upload

Required `file_name`: string with an extension used to determine media type. Optional `upload_path`: relative directory.

```json theme={null}
{"name":"prepare_upload","arguments":{"file_name":"reference.mp4"}}
```

Returns upload\_id, upload\_url, method:PUT, command, max\_bytes, and expires\_at. The URL lasts approximately 15 minutes, is single-use, and accepts at most **95 MiB**. Run the returned command where the file can actually be read, then use the confirmed file\_url. A browser attachment may not be accessible this way. The address contains temporary authorization; do not publish it or append a personal Key.

### get\_upload

Required `upload_id`, from the original prepare result:

```json theme={null}
{"name":"get_upload","arguments":{"upload_id":"UPLOAD_ID_FROM_RESPONSE"}}
```

States include waiting/uploading/done/failed/expired/outcome\_unknown. Use file\_url only after a confirmed done result. Server-local state lasts about one hour; compatible file services can provide receipts for approximately 72 hours. Unsupported or unverifiable receipts can yield outcome\_unknown. Querying does not upload the file again; retain the original ID and inspect status first.

### Results and errors

Tools return readable text and structuredContent; failures can include isError/error/next\_step. Completed media can include resource\_link and an optional image thumbnail. Hosts differ in content-block support. The original URL remains the delivery reference; previews are not guaranteed in every host.

Check tool errors and business fields such as input\_valid, estimate status, and task.status. HTTP 200 alone does not establish generation success. Submission timeout may follow task creation and is not proof of no charge. A failed query is not proof that the original task failed.

## Task progress and results

Use balance and model queries for free connection verification. Use get\_task/list\_tasks for existing tasks, then deliver original URLs and reported actual costs. The [workflow guide](https://evolink.ai/docs/en/mcp/overview.md#workflows) covers references, recovery, saving, and gray previews. A display problem must not trigger another paid generation.

## MCP protocol and backend APIs

| Mode | Execution path | Authentication and installation |
| - | - | - |
| Remote MCP | Client → hosted EvoLink MCP → platform API | Streamable HTTP and browser OAuth; no local server installation |
| Local stdio | Client → local MCP process → platform API | Node.js 20+, npx startup, and a personal API Key |

The remote endpoint is `https://mcp.evolink.ai/mcp`. Passport provides OAuth; the server requests [https://api.evolink.ai](https://api.evolink.ai) and the file service. MCP URLs, platform /v1 routes, documentation, and llms.txt are separate entry points.

### Initialize and call tools

Let the host or MCP SDK handle initialize, protocol versions, Accept, authentication, sessions, and content blocks. Read tools/list after initialization, then call tools/call:

```json theme={null}
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_balance","arguments":{}}}
```

Examples using name / arguments describe tool input, not REST request bodies. Tools can return text, structured data, resource links, and thumbnails; display depends on the host. Check tool errors and task status, not just HTTP success.

### Tools and backend operations

| MCP tool | Backend operation or implementation |
| - | - |
| search\_models | `GET /v1/models` plus aliases, availability, and references |
| get\_model, recommend\_models, search\_docs | Versioned references and account catalog, not same-name REST routes |
| estimate\_cost | `GET /v1/catalog/models/{model_id}/pricing-rules?view=full` and server-side estimation rules (since 1.7.0) |
| get\_pricing\_rules | `GET /v1/catalog/pricing-rules` and `GET /v1/catalog/models/{model_id}/pricing-rules` (view=full) |
| generate\_image | `POST /v1/images/generations` |
| generate\_video | `POST /v1/videos/generations` |
| generate\_audio | `POST /v1/audios/generations` |
| get\_task | `GET /v1/tasks/{task_id}` |
| list\_tasks with task\_ids | `POST /v1/tasks/batch` |
| list\_tasks, get\_task\_usage | `GET /v1/tasks`, pagination, and bounded aggregation |
| check\_balance | `GET /v1/credits` |
| Upload authorization | `POST /v1/files/upload-token` |
| upload\_file | File service /url or /base64; local stdio can read allowed directories |
| prepare\_upload, get\_upload | Hosted single-use PUT URL and status; receipt recovery depends on file-service support |

Model parameters belong in arguments.input and are converted to REST requests by the server. media\_seconds is a billing hint; max\_cost\_usd only checks estimates before submission. Published 1.12.1 estimates from the public pricing rules (reference rates, no account discounts) and still has no final settlement cap.

### Uploads, recovery, and access

Use a prepare\_upload PUT URL only in an environment that can read the file, then query get\_upload. A remote server cannot read desktop paths, and chat attachments may not expose original bytes. See [reference uploads](https://evolink.ai/docs/en/mcp/overview.md#files).

Save client\_request\_id, normalized inputs, account identity, and returned task\_id for paid submissions. Query the original task and history when the outcome is unknown; do not change identifiers to resubmit. Client identifiers alone cannot guarantee uniform backend protection against every duplicate charge.

OAuth exposes limited media operations, not arbitrary Key management or administrative APIs. No usable cancellation tool is currently provided; stopping a wait does not cancel the task. CLI commands and execution are documented separately in the [CLI reference](https://evolink.ai/docs/en/cli/reference.md#api).

## CLI command documentation

The complete CLI reference is now in the [separate CLI section](https://evolink.ai/docs/en/cli/reference.md#cli-reference). This page documents MCP tools and protocol.


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