AIGC CLI
@thusdesign/cli is the command-line entry point for the thusDesign AIGC gateway. It uses a project-bound thusDesign API key and the account's points.
Install and authenticate
After a release containing these commands is published, run the CLI directly:
npx @thusdesign/cli --helpOr install it globally:
npm install -g @thusdesign/cli
thusdesign --helpCreate a project-bound key at API Keys, then save it locally:
npx @thusdesign/cli login --key thus_...You can instead set THUS_API_KEY. Use --key for a one-off override and --base-url or THUS_BASE_URL for a self-hosted gateway.
List available models
Ask the authenticated gateway for its current public model IDs and supported operations:
npx @thusdesign/cli models
npx @thusdesign/cli models --output jsonThe list omits retired, hidden billing-only, provider routing, credentials, and internal options. Treat the returned operation names as the model's supported capabilities.
Generate and inspect tasks
npx @thusdesign/cli generate image \
--prompt "a red fox in a snowy forest" \
--model seedream-5.0-pro
npx @thusdesign/cli generate audio \
--model lyria-3-pro \
--prompt "an upbeat synthwave track"
npx @thusdesign/cli estimate image --prompt "a red fox"
npx @thusdesign/cli status <taskId> --wait --timeout 300Run thusdesign generate <kind> --help for the accepted flags. For audio, the CLI checks an explicit model against the current catalog and uses its uniquely supported operation; use --operation when the input is ambiguous. models --output json shows current model IDs and operations.
Reference media must use publicly reachable http(s) URLs. The CLI has no desktop workspace, local-file upload, project/canvas context, or canvas-delivery step.
--json accepts the same flat parameter names as the flags, including object values. Unknown keys are rejected:
npx @thusdesign/cli generate image --json '{"prompt":"restyle this photo","sourceDimensions":{"w":1920,"h":1080}}'
npx @thusdesign/cli generate image --json '{"prompt":"cat","unknownField":true}'
# The second command fails with an unknown-parameter error.Billing and task status
Generation submissions that pass authorization and pricing checks and are accepted by the gateway are billed to the API key's account. Task failures follow the gateway's refund lifecycle. models, estimate, and status are read-only and do not charge points. A task ID can be checked or waited on with status; outputs are returned as URLs.