Package 'wan30'

Title: Client for a 'Wan30' Video Account
Description: Client for a wan30.video account. It speaks the same Streamable HTTP MCP endpoint as the Wan30 command line client: POST {origin}/api/mcp/. Purchased wan30.video credits are required for generation. Sign-up, check-in and gift credits alone do not qualify. Estimation does not spend credits. Generation does not call the service unless confirm_spend is TRUE, and that flag is not sent. This is not an official Alibaba, DashScope, or Tongyi client.
Authors: Wan30 [aut], NotUsingGithub [aut, cre] (https://github.com/NotUsingGithub)
Maintainer: NotUsingGithub <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-12-01 02:05:30 UTC
Source: https://github.com/NotUsingGithub/wan30-mcp

Help Index


Client for a Wan30 video account

Description

Talks to the Streamable HTTP MCP endpoint used by the Wan30 command line client. Purchased wan30.video credits are required for generation. wan30_estimate does not spend credits. wan30_generate does not call the service unless confirm_spend is exactly TRUE, and that flag is not sent.

Usage

wan30_client(token = NULL, origin = NULL, request = NULL, env = Sys.getenv)

wan30_account(client)

wan30_models(client)

wan30_model(client, model_id)

wan30_estimate(client, input)

wan30_generate(client, input, request_id = NULL, confirm_spend = FALSE)

wan30_tasks(client, limit = NULL)

wan30_task(client, task_id)

wan30_close(client)

wan30_disconnect(client)

Arguments

token

Bearer token. When omitted, WAN30_ACCESS_TOKEN is read from the process environment. .env files are not read.

origin

Exact HTTPS origin. When omitted, WAN30_ORIGIN or https://wan30.video is used.

request

Optional function replacing HTTP. The default does not follow redirects.

env

Environment lookup with the same arguments as Sys.getenv.

client

A client created by wan30_client.

model_id

One published model id.

input

Generation object. Optional fields that are omitted are not filled in.

request_id

Idempotency key matching ^[A-Za-z0-9_-]{16,128}$. Created after confirmation when omitted.

confirm_spend

Local confirmation. The default does not call the service and is not sent.

limit

Optional integer from 1 to 50. NULL is not sent.

task_id

Task id, 1 to 128 characters.

Value

wan30_client returns a client. The tool functions return the server's structured data. wan30_close returns the client invisibly. wan30_disconnect returns NULL invisibly.

Examples

message <- tryCatch(
  wan30_generate(
    wan30_client(token = "example-token", env = function(name, unset = "") ""),
    list(modelId = "wan30-text-to-video", prompt = "A paper boat")
  ),
  wan30_error = function(error) conditionMessage(error)
)
stopifnot(grepl("purchased wan30.video credits", message))