The specialx CLI lets you generate AI video from a terminal. Install it from npm, sign in through your browser, and call the same generate_video action the web app uses, with any model in the catalog. A render returns a task id straight away, and specialx call get_task gives you the clip URL when it is done. Because every command can print JSON, it slots into shell scripts, Makefiles and CI jobs as easily as into an interactive session.
Video model
Text, image and audio-reference video with native sound · fal.ai
Video model
Cost-efficient Veo 3.1 with native audio
npm install -g specialx
specialx login
specialx init "My workspace" .
npx specialx works too if you prefer not to install globally. login opens specialx.ai in your browser, you approve, and the CLI stores a key in ~/.specialx/config.json. On a server or CI runner with no browser, use specialx login --token and paste a key from the Developers page.
init ties the current directory to a workspace by writing a small .specialx-workspace.json marker with no credentials in it. Generated clips then land in that workspace's media library. In CI, pass --workspace <id> or set SPECIALX_WORKSPACE_ID instead.
Video inputs are nested objects, so send them with --json:
specialx call generate_video --json '{"model":"alibaba/wan-3.0/reference-to-video","input":{"prompt":"a red kite rising over sand dunes at dusk, wind noise"}}'
The command prints a task_id. Check on it with:
specialx call get_task task_id=<id>
While it runs you see the status. When it completes, the output lists the video URL. If the provider fails, the task reports failed and the credits are refunded.
To see which models exist and what each one accepts, run specialx call list_models kind=video. Each model comes with its input schema, so you can tell whether it wants reference_images, a start_image, an aspect ratio or a duration before you spend anything.
Video is the expensive part of most budgets, so price a request before running it. specialx call quote_video --json '{"model":"google/veo-3.1-lite","input":{"prompt":"..."}}' returns the credit cost of exactly that input and generates nothing. A good habit is to draft on a cheaper model or a shorter length, then render the keeper on the model you want. The spec cards above show live costs for two common choices. Your current balance is one call away too: specialx call billing_status reports your plan and remaining credits.
Because call is a thin wrapper over the HTTP action API, a loop is all a batch needs. Here is the idea in bash:
while read -r prompt; do
specialx call generate_video --json "{\"model\":\"kwaivgi/kling-v3\",\"input\":{\"prompt\":\"$prompt\",\"aspect_ratio\":\"9:16\"}}"
done < prompts.txt
Collect the task ids, then poll each with get_task and download the URLs once they complete. If you would rather describe the job in plain words, specialx ask "render three vertical clips of our logo spinning on different backgrounds" runs one agent turn and returns its reply, which works in cron jobs as well.
Two habits keep batches tidy. Run them from a folder that was initialized for the right workspace, so every clip lands in the library your team expects. And keep the task ids in a file as you go, so a dropped terminal session does not lose track of renders that are still running on the server.
Rendering is often step one. The same CLI can publish: specialx call post_to_social sends a clip URL to Instagram, Facebook, YouTube, X, LinkedIn or Threads, now or at a scheduled_at time, after you connect accounts on the social page. specialx social accounts lists what is connected. For images there is a shortcut, specialx social post, which generates and posts in one command.
For TikTok, download the vertical clip and upload it in the TikTok app yourself.
14-day trial with up to 1,000 credits
Card required. Plans from $18/month after the trial. See pricing
Start 14-day trialRun npm install -g specialx, or use npx specialx without installing. It needs Node 18 or later. Then run specialx login to sign in through your browser.
generate_video returns a task id immediately. Run specialx call get_task with that id to see progress and collect the URL when it completes.
Yes. Use specialx login --token with a key from the Developers page, and pass --workspace or set SPECIALX_WORKSPACE_ID so the job knows which workspace to use.
All of them, since it calls the same actions as the web app. Run specialx call list_models kind=video for the current list and each model's input fields.
No. It spends credits from the same balance at the same per-model rates, and failed renders are refunded.