CLI

Seedance CLI: create videos and images in your terminal and AI apps

The Seedance CLI runs in your terminal and in AI apps that run commands, such as Claude Code, Codex, Cursor and OpenCode. It spends the same credits at the same prices as the website and can use files on your computer as reference media.

For people who use AI apps on their computer, such as Claude Code, Codex, Cursor and OpenCode. If you use Claude or ChatGPT on the web or in the mobile app, use MCP instead. See how to use MCP

How it works

  1. 1

    Send the instruction to your AI app

    Paste the instruction below into Claude Code, Codex, Cursor, OpenCode or another AI app that runs commands. The app installs the CLI.

    Copy this instruction and send it to your AI app

    Read https://www.seedance2ai.io/mcp-guide.txt and set up the Seedance2 CLI on this computer. Let me sign in in my browser, and show me the credit cost before generating.
  2. 2

    Sign in and authorize

    The app opens your browser. Sign in to your Seedance 2.0 AI account and allow access.

  3. 3

    Say what you want to create

    For example: “Make a 5-second video of a paper boat drifting down a rainy street at night” or “Create an image of an orange cat watching the rain.” The app tells you the credit cost, then generates (asking you first when a generation is expensive) and saves the video or image in the folder it is working in (or wherever you ask). Each generation also appears in your history on the website.

See it run

You ask in one sentence and your AI app runs the commands. The output is from a real run; the wait is shortened here, and this generation took about two minutes.

result.mp4
result.mp4: the video these commands produced.

Set it up yourself

  1. 1

    Install the CLI

    Install the CLI with the first command. It needs Node.js 22 or later on macOS or Linux; on Windows, use WSL.

    npm install -g @seedance2ai/cli
  2. 2

    Sign in and authorize

    Run the second command, then sign in and allow access in the browser window that opens.

    seedance2 auth login
  3. 3

    Check your credit balance

    Check your credit balance with the third command.

    seedance2 account

Generate

Once it is set up, just tell the AI app what you want to generate. To generate by hand, follow these steps:

  1. 1

    Write the request

    Create a file named request.json with the model and its fields, as in the example below. Image and video fields also accept files on your computer.

    request.json

    {"model":"seedance2","quality_tier":"fast","prompt":"A paper boat drifting down a rainy street at night","duration":"5","resolution":"720p"}
  2. 2

    Check the price

    Run this command to see the credit cost. Checking the price is free.

    seedance2 estimate --input request.json
  3. 3

    Start the generation

    Replace CREDITS with that price; a generation that costs more is not submitted. The command waits for the result and returns the task ID.

    seedance2 create --input request.json --max-credits CREDITS --wait
  4. 4

    Download the result

    Replace TASK_ID with the task ID from the previous step.

    seedance2 download TASK_ID --output result.mp4

Run seedance2 --help to see every command.

Available models

Each model offers the same options as on the website and in the API.

  • Seedance 2.5
    Video
    Text, image or reference media to video; 4 to 30 seconds, up to 2K, with sound. Requires a previous purchase.
  • Seedance 2.0
    Video
    Text, image or reference media to video; 4 to 15 seconds, in the Mini, Fast and Pro quality tiers.
  • Kling 4.0
    Video
    Text, reference media or keyframes to video; 3 to 30 seconds, at 720p or 1080p.
  • GPT Image 2.5
    Image
    Text-to-image generation and image editing.
  • GPT Image 2
    Image
    Text-to-image generation and image editing, with up to four images per request.
  • Nano Banana Pro
    Image
    Text-to-image generation and image editing at up to 4K.
  • Nano Banana 2
    Image
    Text-to-image generation and image editing at up to 4K, with optional search grounding.
  • Nano Banana 2 Lite
    Image
    Text-to-image generation and image editing at 1K, at the lowest cost.
  • Seedream 5 Pro
    Image
    Text-to-image generation and image editing at 1K or 2K.
  • Seedream 5 Lite
    Image
    Text-to-image generation and image editing at 2K or 4K.

Credits and billing

  • Connecting, checking your balance, requesting a quote and checking task status are free of charge.
  • Credits are deducted only when a generation is submitted, from the same personal balance used on the website and in the API.
  • Failed generations are refunded automatically.
  • When the video duration is set to auto, the maximum duration is reserved, and unused credits are refunded after generation.
  • Your AI assistant subscription is billed separately from Seedance 2.0 AI credits.

Frequently asked questions

Which AI apps can use the Seedance CLI?

Any AI app that can run commands on your computer. In the terminal: Claude Code, Codex, Gemini CLI, OpenCode and Qwen Code. In code editors: Cursor, Windsurf, Trae and Kiro. As editor extensions: GitHub Copilot in Agent mode, Cline and Roo Code. Chat apps such as Claude, ChatGPT and Gemini on the web or in the mobile app cannot run commands; use MCP with them instead. The CLI requires Node.js 22 or later on macOS or Linux; on Windows, use WSL.

Can I use images or videos stored on my computer?

Yes, in AI apps that run on your computer, such as Claude Code, Codex, Cursor and OpenCode: the app uploads the file for you before generating. Chat apps such as Claude, ChatGPT and Gemini cannot access files on your computer, so with them the file must be available at a public HTTPS URL. Upload the file to a service that provides a direct link, then include that link in your request.

Which credits are used?

Your personal credit balance, which is also used on the website and in the API. Team credits are not used.