Nano GPT logo
NanoGPT

Private AI

Back to Blog

CLI Device Login Now Available

Jan 15, 2026
CLI Device Login Now Available

We've added device login for CLI applications. If you're building a terminal tool that uses NanoGPT, your users can now authenticate with a single browser click instead of manually copying API keys.

How It Works

The flow is simple and familiar - it's the same pattern used by GitHub CLI and Claude Code:

  1. Your CLI requests a login code from NanoGPT
  2. User opens a URL in their browser
  3. User signs in and clicks "Approve"
  4. Your CLI automatically receives an API key

No copying, no pasting, no friction.

Why This Matters

Before this, CLI tools had to ask users to:

  1. Log into NanoGPT
  2. Navigate to settings
  3. Create an API key
  4. Copy it
  5. Paste it into the terminal

Now it's just: run login command → click approve → done.

For Developers

Integrating this into your CLI takes three API calls:

Start the flow:

curl -X POST "https://nano-gpt.com/api/cli-login/start" \
  -H "Content-Type: application/json" \
  -d '{"client_name": "your-app-name"}'

Show the user the verification URL, then poll:

curl -X POST "https://nano-gpt.com/api/cli-login/poll" \
  -H "Content-Type: application/json" \
  -d '{"device_code": "..."}'

Once approved, you get back an API key (sk-nano-...) that works with all NanoGPT endpoints.

Full integration guide: CLI Device Login Documentation

For Users

If a CLI tool you use supports NanoGPT device login, you'll see something like:

To authenticate, open this URL in your browser:

  https://nano-gpt.com/cli-login/verify?code=VS8Q-ZY3Q

Waiting for approval...

Open the link, sign in if needed, click Approve, and you're done. The CLI will automatically receive your credentials.

Key Management

API keys created through this flow appear in your account as CLI (<app-name>). You can view and revoke them anytime from the API Keys section in settings. Each CLI tool gets its own dedicated key, so you can revoke access to one tool without affecting others.

What's Next

We're working with CLI tool developers to add NanoGPT device login support. If you're building something and want to integrate, check out the documentation or reach out.

Happy building.

Milan de Reede

Milan de Reede

CEO & Co-Founder

milan@nano-gpt.com

Related articles

Continue with more NanoGPT guides and research on this topic.

Claude Opus 4.6 is now available on NanoGPT — with thinking and adaptive effort

Anthropic's newest flagship model brings a 1M token context window, adaptive thinking with configurable effort levels, and best-in-class coding and reasoning. Available now on NanoGPT with prompt caching.

Feb 5, 2026

Sofya is now on NanoGPT: search, fetch, extract, and deep research

Sofya is now available on NanoGPT as a web search provider and as the Sofya Research model, bringing page-content search, URL fetching, AI extraction, and multi-source research into one workflow.

Jun 20, 2026

Qwen Image 2.0 and Qwen Image 2.0 Pro are now live on NanoGPT

Qwen Image 2.0 and Qwen Image 2.0 Pro are now available on NanoGPT's Media page with unified text-to-image and image editing, strong prompt adherence, and improved text rendering.

Mar 3, 2026

The open-weight models worth trying on NanoGPT right now

DeepSeek V4 Flash, GLM 5.2, MiniMax M3, and Nemotron 3 Ultra show why open-weight models now deserve first-round testing for coding, long-context work, agents, and enterprise workflows on NanoGPT.

Jun 28, 2026
Back to Blog