unlucid ai Toolsunlucid ai Generation CLI
EnglishCredits

unlucid ai Generation CLI

Create images and videos from scripts and check their status using your account credits.

Pass your API key in the Authorization header. Keep the key in a server environment or a local shell.

Install and sign in

Download the CLI and run it with Node.js 20 or later. Set the base URL to your running site.

Download CLI
export UNLUCID_URL='https://unlucidai.net'
export UNLUCID_API_KEY='YOUR_KEY'
node unlucid.mjs models
node unlucid.mjs credits
node unlucid.mjs quote request.json
node unlucid.mjs generate request.json job-001
node unlucid.mjs task TASK_ID --wait
node unlucid.mjs download TASK_ID output.png

Save your generation settings in request.json using the body shown in the API reference.

Use a unique job key for each generation. If a request times out, retry with the same key.

Run an image or video request from a terminal

Save your request settings in a JSON file. Quote the job first and use a distinct job key when you submit. Save the task ID so you can check it from another terminal session.

When this helps

Use the CLI when your input is already a JSON request and your next step is to save a finished asset in the same project directory.

Examples

Small camera beside a laptop displaying a media editor
Keep your request JSON and downloaded files in the same project folder.

Example

In a batch script, save job-001 and its task ID together. If a later download fails, retry the download with that ID.

Run your first request

  1. Set the site URL and API key in your local environment.
  2. Run quote with the request file, then submit with a distinct job key.
  3. Save the task ID, wait for success and download the result.

Requirements

Runtime
Node.js 20 or later
Configuration
UNLUCID_URL and UNLUCID_API_KEY
Workflow
Quote, generate, poll and download

Questions about AI Image and Video Generation CLI

Which Node.js release do I need?

Use Node.js 20 or newer. The downloadable command file runs with Node directly.

When should I reuse the job key?

Reuse the same key when retrying a submission for the same job. Choose another key when the request changes.

Can I continue a download after an error?

Check the saved task ID for success and run download again. A download error does not require a new generation.

Can I check the cost without starting a job?

Run the quote command with your request file and review the displayed credits. Use generate only when you are ready to place the job, then pass the returned task ID to task or download.