The official command-line interface for ZeroGPU — run fast, edge-optimized inference models (classification, extraction, redaction, chat, summarization) right from your terminal.
- Installation
- Quick Start
- Authentication
- Commands
- Environment Variables
- Output
- Troubleshooting
- Contributing
- License
npm install -g zerogpu-cli@latestRequires Node.js 20+.
Verify the install:
zerogpu --version
zerogpu --help# 1. Sign in (you'll be prompted for your API key)
zerogpu login
# 2. Check your session
zerogpu status
# 3. Run your first command
zerogpu summarize "ZeroGPU runs small, fast models at the edge so you can ship AI features without managing GPUs."Every inference command requires a valid API key. You can provide it in two ways:
zerogpu login— stores the credential in a local config file and exportsZEROGPU_API_KEYto your shell profile.- Environment variable — set
ZEROGPU_API_KEYdirectly (useful for CI).
Get your API key (zgpu-api-…) from the ZeroGPU dashboard.
All commands follow the pattern:
zerogpu <command> [arguments] [options]Run zerogpu <command> --help for command-level help.
Sign in to ZeroGPU. Prompts for your API key (masked input), validates it, and persists the credential.
zerogpu login
zerogpu login --api-key zgpu-api-xxxxxxxx| Option | Description |
|---|---|
--api-key <key> |
Provide the API key directly (skips the prompt). |
Check whether you're signed in and where the API key was loaded from.
zerogpu statusChat with a ZeroGPU text-generation model. Defaults to LFM2.5-1.2B-Instruct; use --model to reach for a larger reasoning model.
zerogpu chat "Explain edge inference in one sentence."
zerogpu chat "Translate to French: Good morning." -i "You are a precise translator."
# Frontier-grade reasoning, with the trace printed alongside the answer
zerogpu chat "Why does my API keep getting rate-limited?" -m gpt-oss-120b -r
# Multilingual reasoning
zerogpu chat "Explique la mise en cache en une phrase." -m qwen3-30b-a3b-fp8
# A 1M-token context, for whole repos and very long documents
zerogpu chat "$(cat ARCHITECTURE.md)" -m glm-5.2
# Coding and agentic work, at a fraction of the flagship price
zerogpu chat "Port this helper to async/await." -m deepseek-v4-flash| Option | Description |
|---|---|
-i, --instructions <text> |
System instructions that steer the assistant's behavior. |
-m, --model <model> |
Model to use (default LFM2.5-1.2B-Instruct). |
-r, --reasoning |
Also print the reasoning trace, for models that return one. |
| Model | Notes |
|---|---|
LFM2.5-1.2B-Instruct |
Default. Fast edge chat. |
LFM2.5-1.2B-Thinking |
Compact reasoning model. |
gpt-oss-120b |
117B MoE, 131K context, reasoning + function calling. |
qwen3-30b-a3b-fp8 |
30.5B MoE, 100+ languages, reasoning + function calling. |
glm-5.2 |
753B MoE, 1M context, reasoning + function calling. The platform's most capable model, and its priciest. |
deepseek-v4-flash |
284B MoE (13B active), 1M context, coding and agentic workflows. |
qwen3-30b-a3b-fp8, glm-5.2, and deepseek-v4-flash are served by the Chat Completions API rather than the Responses API; the CLI routes them automatically.
Chat with the LFM2.5-1.2B-Thinking model, which returns reasoning alongside its answer.
zerogpu chat_thinking "If a train leaves at 3pm at 60mph, when does it arrive 180 miles later?"Summarize text with the llama-3.1-8b-instruct-fast model.
zerogpu summarize "Long article text goes here..."Generate contextual follow-up questions using the ZeroGPU follow-up edge model.
zerogpu generate_followups "We just shipped a new pricing page focused on enterprise plans."Classify text against the IAB audience and content taxonomy using the ZeroGPU IAB edge model.
zerogpu classify_iab "Tips for first-time homebuyers in 2026."Same as classify_iab but returns enriched output: audience, topics, keywords, and intent.
zerogpu classify_iab_enriched "Best running shoes for marathon training."Classify a domain name against the IAB taxonomy using the ZeroGPU domain edge model. Takes only the hostname — no page fetch or body text — so it suits bidstream enrichment and inventory-level targeting.
zerogpu classify_domain nytimes.comReturns scored content categories plus topics, keywords, and inferred user intent for the domain. When you have the page text and need per-URL precision, use classify_iab instead.
Classify text against a structured schema of categories and allowed labels using GLiNER2.
zerogpu classify_structured "The product arrived broken and I want a refund." \
--schema '{"sentiment":["positive","negative","neutral"],"intent":["complaint","praise","question"]}'| Option | Description |
|---|---|
-s, --schema <json> |
Required. JSON object mapping category name → allowed labels. |
Zero-shot classification against arbitrary candidate labels using DeBERTa v3.
# Repeat --label for each candidate
zerogpu classify_zero_shot "The stock market dropped 3% today." \
--label finance --label sports --label politics
# Or pass them as a comma-separated list
zerogpu classify_zero_shot "The stock market dropped 3% today." \
--labels finance,sports,politics| Option | Description |
|---|---|
-l, --label <label> |
Candidate label (repeatable). |
--labels <a,b,c> |
Comma-separated list of candidate labels. |
Extract named entities from text using GLiNER2 with custom labels.
zerogpu extract_entities "Tim Cook visited the Cupertino campus on Tuesday." \
--label person --label organization --label location --threshold 0.4| Option | Default | Description |
|---|---|---|
-l, --label <label> |
— | Entity label to extract (repeatable). |
--labels <a,b,c> |
— | Comma-separated entity labels. |
-t, --threshold <number> |
0.3 |
Confidence threshold between 0 and 1. |
Extract structured JSON from text against a provided schema using GLiNER2.
zerogpu extract_json "Email Jane Doe at jane@example.com or call 555-0100." \
--schema '{"contact":["name::str::Full name","email::str::Email address","phone::str::Phone number"]}'| Option | Description |
|---|---|
-s, --schema <json> |
Required. Schema as a JSON string. Field format: name::type::description. |
Extract PII entities (persons, emails, phone numbers, etc.) using gliner-multi-pii-v1.
zerogpu extract_pii "Contact John Smith at john@acme.com or +1-415-555-0100." \
--threshold 0.5 --categories identity,contact| Option | Default | Description |
|---|---|---|
-t, --threshold <number> |
0.5 |
Confidence threshold. |
-c, --categories <list> |
identity,contact |
Comma-separated PII categories. |
Detect and redact PII in text — returns the input with sensitive spans masked by label.
zerogpu redact_pii "Call Sarah at 415-555-0100 or email sarah@acme.com."| Variable | Purpose |
|---|---|
ZEROGPU_API_KEY |
Overrides the API key from the config file. Set automatically by zerogpu login for your default shell. |
- Inference commands print the model's response to stdout. When the response is valid JSON, it is pretty-printed.
- Errors and diagnostic messages are written to stderr.
- All commands exit with code
0on success and1on failure — safe to use in pipelines and scripts.
Example:
zerogpu classify_iab "Tips for first-time homebuyers." > result.jsonYou're not fully signed in yet.Runzerogpu loginagain, or checkzerogpu status.That doesn't look like a valid API keyKeys must start withzgpu-api-.ZEROGPU_API_KEYnot picked up in a new shell: open a new terminal, orsourceyour shell config file (thelogincommand prints the path).- HTTP errors are surfaced with the response status and body — inspect them to debug request issues.
Issues and pull requests are welcome. See CONTRIBUTING.md and our Code of Conduct.
Security concerns? See SECURITY.md.
git clone https://github.com/zerogpu/cli.git
cd cli
npm install
npm run build
npm testReleased under the MIT License.