Novita AI CLI
Access all Novita AI APIs from the command line. 95 tests pass (34 unit + 61 E2E, zero mocks).
For the full command reference, read references/commands.md.
For verified endpoint coverage, read references/endpoints.md.
For workplace image prompt templates, read references/easy-image/.
Quick Reference
# LLM
novita chat "Hello" -m deepseek/deepseek-v3-0324
novita embed "text" -m baai/bge-m3
novita rerank "query" -d "doc1" -d "doc2"
novita models list --filter deepseek
# Image generation
novita image flux "a sunset" -W 512 -H 512 # sync, fast
novita image generate "a cat" -W 512 -H 512 --steps 20 # async, SD
# Image editing (sync)
novita image remove-bg photo.jpg -o clean.png
novita image reimagine photo.jpg -o new.png
novita image to-prompt photo.jpg
novita image remove-text photo.jpg -o clean.png
novita image cleanup photo.jpg mask.png -o out.png
novita image outpainting photo.jpg "forest" -W 1536
novita image merge-face face.jpg target.jpg -o merged.png
# Image editing (async)
novita image img2img photo.jpg "watercolor" --strength 0.5
novita image inpainting photo.jpg mask.png "red flower"
novita image upscale photo.jpg --scale 2
novita image replace-bg photo.jpg "beach sunset"
# Video (async)
novita video generate "snow scene" --frames 32
novita video from-image photo.jpg --model SVD-XT
novita video hunyuan "a cat playing piano"
# Audio
novita audio tts "Hello" --voice Calm_Woman -o hello.mp3
novita audio glm-tts "Hello" --voice jam -o hello.wav
novita audio asr recording.wav
novita audio voice-clone https://example.com/voice.mp3
# Account
novita account balance
novita account billing
novita account usage-billing
novita account fixed-billing
# Async task management
novita task status <task_id>
novita task wait <task_id> -o ./results --timeout 300
# Batch & files
novita files upload batch.jsonl
novita files list / get / content / delete <file_id>
novita batch create <file_id>
novita batch list / get / cancel <batch_id>
# GPU instances
novita gpu products / cpu-products / clusters
novita gpu create --product-id xxx --image pytorch:latest --gpu-num 1
novita gpu list / get / start / stop / restart / delete <id>
novita gpu metrics / edit <id>
# Templates
novita template list / get / create / edit / delete
# Storage
novita storage list / create / delete
# Serverless
novita serverless list / get / create / update / delete
Decision Guide
Workplace image assistant
When the user asks for a business/workplace visual (PPT cover, poster, product photo, report graphic, social content, avatar, badge, sticker, intro graphic, flowchart, UI prototype, exploded diagram):
- Parse the request into scene, channel, subject, style, ratio, text content, and any brand/product constraints.
- If the core subject is missing, ask one concise question. Otherwise proceed.
- Load the matching template from
references/easy-image/templates/{scene}.md; use references/easy-image/glossary.md for professional terminology if useful.
- Build one polished English prompt. If visible text is requested, specify the exact text and language.
- Choose dimensions from the channel map below, then call Novita CLI. Prefer
novita image flux for quick drafts and novita image generate for higher-control Stable Diffusion jobs.
- Show a short enhancement summary before generation, then save images to the requested output directory or the current directory.
Channel size map:
| Channel |
Size |
| PPT / presentation |
-W 1280 -H 720 |
| WeChat Moments / square product image |
-W 1024 -H 1024 |
| Xiaohongshu / portrait social post |
-W 768 -H 1024 |
| Douyin / short video cover |
-W 576 -H 1024 |
| WeChat article header |
-W 1408 -H 600 |
Available easy-image templates:
avatar, badge-id, emoji-sticker, exploded-diagram, flowchart, intro-graphic, marketing-poster, ppt-slides, product-photo, report-illustration, scene-photo, social-media-grid, ui-prototype.
Which image command?
- Text -> Image:
image flux (fast, sync) or image generate (SD, async, more control)
- Image + Text -> New Image:
image img2img (async)
- Edit part of image:
image inpainting (mask + prompt, async) or image cleanup (erase masked area, sync)
- Extend image:
image outpainting (sync)
- Remove elements:
image remove-bg (background), image remove-text (text overlay)
- Describe image:
image to-prompt (sync)
- Enlarge image:
image upscale (async)
- Swap face:
image merge-face (sync)
- Restyle:
image reimagine (sync)
- New background:
image replace-bg (async)
Which TTS?
- English, high quality:
audio tts (MiniMax, returns download URL, mp3/wav/flac)
- Chinese, low latency:
audio glm-tts (GLM, returns binary PCM/WAV)
Sync vs Async?
- Sync (result immediately):
flux, remove-bg, reimagine, cleanup, outpainting, remove-text, to-prompt, merge-face
- Async (returns task_id, poll with
task wait): generate, img2img, inpainting, upscale, replace-bg, all video commands
Common Workflows
Generate, upscale, and remove background
novita image flux "product photo" -W 512 -H 512 -o ./tmp
novita image upscale ./tmp/novita_flux_0.png --scale 4 --no-wait
novita task wait <task_id> -o ./results
novita image remove-bg ./results/task_xxx_0.png -o final.png
Batch LLM processing
novita files upload batch.jsonl
novita batch create <file_id>
novita batch get <batch_id> # poll until completed
novita files content <output_file_id> -o results.jsonl
TTS -> ASR round-trip
novita audio tts "Hello world" -o hello.mp3
novita audio asr hello.mp3
Agent Guidance
- API Key:
NOVITA_API_KEY env var is required. If not set, guide the user to create one at https://novita.ai/settings/key-management. Alternatively pass --api-key per-command.
- Use
--json-output for all machine-readable output
- Use
--no-stream with chat for complete JSON responses
- For async commands, use
--no-wait to get task_id, then novita task wait <id> for control
- All commands exit with code 1 on error, printing to stderr
- For image requests that mention current, latest, real brands/products, or exact public figures, use web search before prompt assembly when up-to-date visual accuracy matters.
- GPU instance creation costs real money — check
novita gpu products for pricing first
- Template CRUD is free — safe for testing
Common Errors
- "API key required" → Set
NOVITA_API_KEY env var or pass --api-key. Get a key at https://novita.ai/settings/key-management
- "INSUFFICIENT_RESOURCE" on GPU create → Try a different
--product-id or --billing spot
- Task timeout → Increase
--timeout value, or use --no-wait and poll manually
- 404 on storage/billing APIs → These endpoints may not be available for all account types
- GLM TTS returns binary → Output is raw PCM/WAV audio, saved directly to file (not JSON)
1---2name: novita3description: CLI for all Novita AI APIs — LLM chat, image generation/editing (Stable Diffusion, FLUX), video generation, text-to-speech, speech-to-text, voice cloning, GPU cloud instance management, and serverless endpoints. Use this skill whenever the user wants to call Novita AI services, generate or edit images, create videos, do TTS/ASR, manage GPU instances, deploy serverless workloads, or interact with any novita.ai API. Also trigger when the user mentions the `novita` CLI tool, Novita AI pricing/models/balance, or asks for workplace image assets such as PPT graphics, marketing posters, product photos, social media visuals, avatars, flowcharts, UI mockups, exploded diagrams, report illustrations, or prompt-polished image generation.4---56# Novita AI CLI78Access all Novita AI APIs from the command line. 95 tests pass (34 unit + 61 E2E, zero mocks).910For the full command reference, read `references/commands.md`.11For verified endpoint coverage, read `references/endpoints.md`.12For workplace image prompt templates, read `references/easy-image/`.1314## Quick Reference1516```bash17# LLM18novita chat "Hello" -m deepseek/deepseek-v3-032419novita embed "text" -m baai/bge-m320novita rerank "query" -d "doc1" -d "doc2"21novita models list --filter deepseek2223# Image generation24novita image flux "a sunset" -W 512 -H 512 # sync, fast25novita image generate "a cat" -W 512 -H 512 --steps 20 # async, SD2627# Image editing (sync)28novita image remove-bg photo.jpg -o clean.png29novita image reimagine photo.jpg -o new.png30novita image to-prompt photo.jpg31novita image remove-text photo.jpg -o clean.png32novita image cleanup photo.jpg mask.png -o out.png33novita image outpainting photo.jpg "forest" -W 153634novita image merge-face face.jpg target.jpg -o merged.png3536# Image editing (async)37novita image img2img photo.jpg "watercolor" --strength 0.538novita image inpainting photo.jpg mask.png "red flower"39novita image upscale photo.jpg --scale 240novita image replace-bg photo.jpg "beach sunset"4142# Video (async)43novita video generate "snow scene" --frames 3244novita video from-image photo.jpg --model SVD-XT45novita video hunyuan "a cat playing piano"4647# Audio48novita audio tts "Hello" --voice Calm_Woman -o hello.mp349novita audio glm-tts "Hello" --voice jam -o hello.wav50novita audio asr recording.wav51novita audio voice-clone https://example.com/voice.mp35253# Account54novita account balance55novita account billing56novita account usage-billing57novita account fixed-billing5859# Async task management60novita task status <task_id>61novita task wait <task_id> -o ./results --timeout 3006263# Batch & files64novita files upload batch.jsonl65novita files list / get / content / delete <file_id>66novita batch create <file_id>67novita batch list / get / cancel <batch_id>6869# GPU instances70novita gpu products / cpu-products / clusters71novita gpu create --product-id xxx --image pytorch:latest --gpu-num 172novita gpu list / get / start / stop / restart / delete <id>73novita gpu metrics / edit <id>7475# Templates76novita template list / get / create / edit / delete7778# Storage79novita storage list / create / delete8081# Serverless82novita serverless list / get / create / update / delete83```8485## Decision Guide8687### Workplace image assistant88When the user asks for a business/workplace visual (PPT cover, poster, product photo, report graphic, social content, avatar, badge, sticker, intro graphic, flowchart, UI prototype, exploded diagram):89901. Parse the request into scene, channel, subject, style, ratio, text content, and any brand/product constraints.912. If the core subject is missing, ask one concise question. Otherwise proceed.923. Load the matching template from `references/easy-image/templates/{scene}.md`; use `references/easy-image/glossary.md` for professional terminology if useful.934. Build one polished English prompt. If visible text is requested, specify the exact text and language.945. Choose dimensions from the channel map below, then call Novita CLI. Prefer `novita image flux` for quick drafts and `novita image generate` for higher-control Stable Diffusion jobs.956. Show a short enhancement summary before generation, then save images to the requested output directory or the current directory.9697Channel size map:9899| Channel | Size |100|---------|------|101| PPT / presentation | `-W 1280 -H 720` |102| WeChat Moments / square product image | `-W 1024 -H 1024` |103| Xiaohongshu / portrait social post | `-W 768 -H 1024` |104| Douyin / short video cover | `-W 576 -H 1024` |105| WeChat article header | `-W 1408 -H 600` |106107Available easy-image templates:108`avatar`, `badge-id`, `emoji-sticker`, `exploded-diagram`, `flowchart`, `intro-graphic`, `marketing-poster`, `ppt-slides`, `product-photo`, `report-illustration`, `scene-photo`, `social-media-grid`, `ui-prototype`.109110### Which image command?111- **Text -> Image**: `image flux` (fast, sync) or `image generate` (SD, async, more control)112- **Image + Text -> New Image**: `image img2img` (async)113- **Edit part of image**: `image inpainting` (mask + prompt, async) or `image cleanup` (erase masked area, sync)114- **Extend image**: `image outpainting` (sync)115- **Remove elements**: `image remove-bg` (background), `image remove-text` (text overlay)116- **Describe image**: `image to-prompt` (sync)117- **Enlarge image**: `image upscale` (async)118- **Swap face**: `image merge-face` (sync)119- **Restyle**: `image reimagine` (sync)120- **New background**: `image replace-bg` (async)121122### Which TTS?123- **English, high quality**: `audio tts` (MiniMax, returns download URL, mp3/wav/flac)124- **Chinese, low latency**: `audio glm-tts` (GLM, returns binary PCM/WAV)125126### Sync vs Async?127- **Sync** (result immediately): `flux`, `remove-bg`, `reimagine`, `cleanup`, `outpainting`, `remove-text`, `to-prompt`, `merge-face`128- **Async** (returns task_id, poll with `task wait`): `generate`, `img2img`, `inpainting`, `upscale`, `replace-bg`, all `video` commands129130## Common Workflows131132### Generate, upscale, and remove background133```bash134novita image flux "product photo" -W 512 -H 512 -o ./tmp135novita image upscale ./tmp/novita_flux_0.png --scale 4 --no-wait136novita task wait <task_id> -o ./results137novita image remove-bg ./results/task_xxx_0.png -o final.png138```139140### Batch LLM processing141```bash142novita files upload batch.jsonl143novita batch create <file_id>144novita batch get <batch_id> # poll until completed145novita files content <output_file_id> -o results.jsonl146```147148### TTS -> ASR round-trip149```bash150novita audio tts "Hello world" -o hello.mp3151novita audio asr hello.mp3152```153154## Agent Guidance155156- **API Key**: `NOVITA_API_KEY` env var is required. If not set, guide the user to create one at https://novita.ai/settings/key-management. Alternatively pass `--api-key` per-command.157- Use `--json-output` for all machine-readable output158- Use `--no-stream` with chat for complete JSON responses159- For async commands, use `--no-wait` to get task_id, then `novita task wait <id>` for control160- All commands exit with code 1 on error, printing to stderr161- For image requests that mention current, latest, real brands/products, or exact public figures, use web search before prompt assembly when up-to-date visual accuracy matters.162- GPU instance creation costs real money — check `novita gpu products` for pricing first163- Template CRUD is free — safe for testing164165## Common Errors166167- **"API key required"** → Set `NOVITA_API_KEY` env var or pass `--api-key`. Get a key at https://novita.ai/settings/key-management168- **"INSUFFICIENT_RESOURCE"** on GPU create → Try a different `--product-id` or `--billing spot`169- **Task timeout** → Increase `--timeout` value, or use `--no-wait` and poll manually170- **404 on storage/billing APIs** → These endpoints may not be available for all account types171- **GLM TTS returns binary** → Output is raw PCM/WAV audio, saved directly to file (not JSON)