Cremi CLI
BetaRun Cremi's generation tools straight from your terminal.
Prefer the terminal, or want to keep your coding agent's context lean? The CLI wraps the same tools in a scriptable interface with JSON output and meaningful exit codes.
1.Get your access token
The CLI signs in with the same personal access token as MCP, so if you've already set one up you can skip straight to the install below.
How to create a token →2.Install and authenticate
npm install -g @cremi_ai/cli
Published on npm as @cremi_ai/cli. Requires Node.js 18 or newer.
cremi login
Paste your access token when prompted — it's validated and stored in ~/.config/cremi/config.json.
3.Check it works
Before spending credits, confirm the token is valid and see which tools your account can reach.
# confirm the token works and see which tools you have cremi doctor cremi tools
4.Generate an image
`cremi image` takes the prompt as its only required argument. Everything else has a default, so start simple and add options as you need them.
# simplest form — prompt only, everything else defaults cremi image "neon koi fish swimming through clouds" # choose a model, shape and save location cremi image "dreamy lofi album cover" \ --model nano-banana-pro \ --aspect-ratio 1:1 \ --resolution 2K \ --output covers/lofi.png # edit or reference existing images (nano-banana family, flux-pro-ultra) cremi image "same character, now in the rain" \ --model nano-banana \ --reference https://example.com/character.png
- --model
- Which model renders the image. Defaults to imagen-4-fast, the cheapest.
- --aspect-ratio
- Shape of the output: 16:9, 3:2, 4:3, 1:1, 3:4, 2:3 or 9:16.
- --resolution
- 1K, 2K or 4K. Only the nano-banana family honours this; other models ignore it.
- --output
- Where to save the file. Pass a directory to keep the generated name, or a filename to set your own.
- --reference
- One or more image URLs to work from, for edits and style references. Repeat the flag for several.
Without --output the command prints the image URL and leaves nothing on disk. With it, the CLI downloads the full-resolution original rather than the smaller preview shown in chat clients.
| Model | Notes |
|---|---|
| imagen-4-fast · imagen-4-standard · imagen-4-ultra | Google Imagen 4 — fast, standard and ultra quality tiers |
| flux-pro · flux-pro-ultra | FLUX 1.1 Pro and Pro Ultra |
| openai | OpenAI gpt-image-1 |
| nano-banana · nano-banana-pro · nano-banana-2 | Nano Banana family — editing and reference images, 1K / 2K / 4K resolution |
5.Generate a video
Video has no dedicated subcommand — use `cremi run generate_video`, which passes parameters straight through to the tool. Renders take minutes, so the command waits for a while and then hands back a task id you can collect later.
# text to video — returns a task id, then polls until it is ready cremi run generate_video \ prompt="a red apple slowly rotating on a wooden table" \ model=grok-imagine duration=5 aspect_ratio=16:9 # animate a still image (required for wan-2.6-flash) cremi run generate_video \ prompt="gentle slow zoom" \ model=wan-2.6-flash duration=5 \ image_url="https://example.com/first-frame.jpg" # collect a render that outlived the call, and see live credit costs cremi run get_video_task_status task_id=<TASK_ID> cremi run list_video_models
- prompt=
- What to generate. Required.
- model=
- Which model renders the video. See the table below.
- duration=
- Length in seconds. Each model accepts its own set of values — anything else is rejected before you are charged.
- aspect_ratio=
- 16:9, 9:16 or 1:1.
- image_url=
- A public image URL to use as the first frame. Required by image-to-video models, optional elsewhere.
If the render outlives the call you get a task id instead of a URL. Credits are charged when the job is accepted and returned automatically if it fails.
| Model | Notes |
|---|---|
| grok-imagine | Cheapest option — 720p, 1–15s |
| kling-2.1-standard · kling-2.5-turbo-pro | Kling 2.1 Standard and 2.5 Turbo Pro — 5s or 10s |
| veo-3.1-fast-silent · veo-3.1-fast · veo-3.1 | Google Veo 3.1 — silent, fast and full quality tiers; the non-silent tiers add a native audio track. 4 / 6 / 8s |
| seedance-2.0 | ByteDance Seedance 2.0 — 720p, 4–15s |
| wan-2.6-flash | Wan 2.6 Flash — image-to-video only, so image_url is required. 5 / 8 / 10 / 15s |
6.Use it in scripts
Every command takes --json, and `cremi run` can call any tool by name — including ones added after your CLI version, so you do not need to upgrade to reach them.
# --json prints a machine-readable result instead of prose cremi image "album art" --json | jq -r .url # `run` calls any tool by name, so new tools work without a CLI upgrade cremi run generate_image prompt="misty forest" model=imagen-4-ultra --json
The CLI talks to the same MCP server, so every new tool appears automatically in cremi tools and cremi run.
Credit costs are not listed here because they come from the live pricing table. Run `cremi run list_video_models` for current video prices, or check Usage in your account.