MCP & CLI usage guide
Connect. Estimate. Create.
A step-by-step reference for connecting Wan27 to your agent or terminal, checking the credit cost, and following your task to a downloaded result.
Quick start · 4 steps
Step 01: Connect and check your account
Choose the instructions for your client on the MCP page, or the CLI installation path. After installation, sign in through your browser.
wan27 auth loginwan27 accountwan27 modelswan27 model wan2.7-imageA successful account response and model list verify the connection without generating media. If subscription access is refused, upgrade at the website before trying again.
Step 02: Prepare an image request
Save this as request.json. Run wan27 model MODEL_ID for every supported option before changing it.
{
"modelId": "wan2.7-image",
"prompt": "A paper crane on a quiet blue desk, soft morning light",
"resolution": "1K",
"aspectRatio": "16:9",
"outputFormat": "png"
}Step 03: Estimate, then create
Can spend creditsThe estimate returns the credit cost without charging anything.
wan27 estimate --input request.jsoncreate spends credits at the website price. When an agent runs it for you, it should show the estimate and wait for your OK first.
Spends credits
wan27 create --input request.json --waitStep 04: Follow the task and download
Replace TASK_ID with the returned task id. Statuses are queued, processing, succeeded and failed. A succeeded task lists download URLs in outputs; failed tasks are refunded automatically.
wan27 wait TASK_ID --timeout 300wan27 task TASK_IDwan27 download TASK_ID --output result.pngA wait timeout only stops waiting; the task keeps running. Check it again later with wan27 task.
Reference
Retry with the same request ID
createprints its request ID on stderr and retries transient failures with it automatically.- After a network error, run it again with the same
--request-id. You get the same task and are never charged twice. - In MCP, pass the same
requestIdtogenerate_imageorgenerate_video. - Reusing an ID for a different request returns
IDEMPOTENCY_CONFLICT.
wan27 create --input request.json --request-id REQUEST_ID --waitReference images and access management
- Upload a PNG, JPEG or WebP under 5 MiB. The CLI returns its
url. - Image models take
imageUrls, a list of URLs;wan27 modelshows the limit per model. wan27-image-to-videotakes oneimageUrlas the first frame.- MCP tools accept https image URLs but do not upload files.
wan27 upload frame.png# {"url":"https://..."}{
"modelId": "wan27-image-to-video",
"prompt": "The paper crane takes off",
"imageUrl": "https://...",
"durationSeconds": 5,
"resolution": "720p"
}Revoke access
Logout disconnects the CLI and its local MCP server. Changing your website password disconnects every assistant.
wan27 auth logoutInstructions for your agent
The Markdown guide documents the MCP tool sequence, CLI commands and error codes. It is a readable guide, not a published installable Skill.
Read the agent guide