Xiaomi Million Token Free Claim Tutorial: Connecting to Claude Code via CC Switch
Xiaomi Million Token Free Claim Tutori…
How to claim Xiaomi's free tokens and connect their AI model to Claude Code via CC Switch.
This tutorial covers the complete process of applying for Xiaomi's Million Token Plan free credits and integrating Xiaomi's large model into Claude Code using CC Switch. It includes application tips, configuration steps, and a practical test generating a Gomoku game, demonstrating a zero-cost AI-assisted programming solution for developers.
Xiaomi's Large Model Open Beta: Claim Millions of Free Tokens
Xiaomi recently launched its "Quadrillion Token Plan" open beta, offering developers free large model API credits. For developers looking to experience AI-assisted programming at low cost, this is definitely an opportunity worth exploring. In his latest hands-on tutorial, Bilibili creator Lao Zhang demonstrated in detail how to apply for Xiaomi's free tokens and connect Xiaomi's large model to Claude Code, achieving zero-cost AI-assisted programming.
This article will walk through the complete process from applying for tokens to configuring the development environment, helping you get started quickly.
Understanding Tokens: The "Billing Currency" of Large Models
Before diving into the process, it's important to understand what tokens are. Tokens are the basic units that large language models use to process text — think of them as the smallest fragments the model "reads" and "writes." A Chinese character typically corresponds to 1-2 tokens, while an English word corresponds to roughly 1-1.5 tokens. When developers call large model APIs, costs are usually calculated based on the total number of input and output tokens. Taking GPT-4 as an example, the price per million input tokens ranges from tens of dollars, and API costs can accumulate rapidly in high-frequency usage scenarios. The million-level free token quota Xiaomi is offering can support hundreds of medium-length code generation conversations — a substantial resource for learning and prototype development.
Detailed Application Process for Xiaomi's Million Token Plan
The application process isn't complicated, but there are a few key details to note.
First Three Questions: Basic Information
The first three questions on the application form are standard information fields. Simply fill them in truthfully based on your actual situation, including basic developer identity and use case descriptions.
Question Four: Describing Practical Experience (The Core Challenge)
Many developers struggle with the fourth question — it asks you to describe your actual experience using large models. For beginners, this can be a real hurdle. Lao Zhang shared a clever approach in his video: use AI itself to solve this problem.
The specific method is: prepare a reference case template first, then have AI generate a similar content description modeled after that case. This approach ensures professional quality while allowing you to complete the form quickly. Once generated, simply copy and paste.
Question Five: Proof of Usage and Influence
This item requires proof of your usage experience and influence — this could be a tech blog, open-source projects, social media accounts, etc. Fill it in based on your actual situation. After submission, wait briefly for the review to pass and you'll receive your free token quota.
Connecting Xiaomi's Large Model to Claude Code via CC Switch
Once you have your API Key, the next step is connecting Xiaomi's large model to Claude Code. This requires a key tool — CC Switch.
What is Claude Code?
Before introducing CC Switch, let's briefly explain Claude Code's positioning. Claude Code is an AI programming tool from Anthropic that runs as a command-line tool and IDE plugin. It can understand the entire project's code context and perform tasks like code writing, debugging, and refactoring. Unlike GitHub Copilot, which primarily provides line-level code completion, Claude Code excels at handling complex cross-file programming tasks — such as generating complete functional modules from natural language descriptions, or analyzing an entire codebase for systematic refactoring. It calls Anthropic's own Claude model by default, which means users need to bear the corresponding API costs.
What is CC Switch?
CC Switch's core function is to serve as a middleware layer that allows Claude Code to connect to external AI large models. In other words, it breaks the restriction of Claude Code only being able to use Anthropic's official models, enabling developers to freely switch between different large model providers.
From a technical perspective, CC Switch is essentially a locally-running API proxy service. It starts a local service endpoint on the developer's computer, intercepts API requests sent by Claude Code, replaces the model parameters and authentication information with the corresponding format for the target model provider, then forwards the request to the actual API server. Since most mainstream large model providers currently follow OpenAI-compatible API interface specifications, this request forwarding is technically feasible. Similar tools include LiteLLM, OneAPI, and others — their common goal is to achieve "one client, multiple model backends" flexible scheduling.
CC Switch Installation and Configuration Steps
-
Download CC Switch: Find the CC Switch release page, scroll to the bottom, and select the version that matches your computer's operating system. The installation path can be changed freely — it's recommended to place it on a non-system drive to save space.
-
Add Xiaomi Model: After installation, click the plus button in the upper right corner of the interface and select the Xiaomi model from the model list.
-
Enter API Key: Enter the Xiaomi API Key you obtained earlier in the corresponding input field. Keep other configuration items at their default settings.
-
Enable Configuration: After clicking add, select to enable the configuration. At this point, Xiaomi's large model is successfully connected to Claude Code.
Once configured, you can directly use Xiaomi's large model-powered Claude Code for AI-assisted programming through the VS Code plugin.
Practical Test: Generating a Gomoku Game with Xiaomi's Large Model
To verify the integration results, Lao Zhang conducted a simple practical test in his video — having Xiaomi's large model-powered Claude Code generate a Gomoku (Five in a Row) game webpage.
From the demonstration results, the model successfully generated a Gomoku page with alternating black and white piece placement functionality. The basic game logic and interface rendering worked properly. Although the video didn't deeply test more complex programming scenarios, for a free solution, this level of performance already has practical value.
Pros, Cons, and Suitable Use Cases
Advantages
- Zero cost: The million-token free quota is very friendly for individual developers and learners
- Simple configuration: Integration can be completed in just a few steps through CC Switch, with a low technical barrier
- Flexible switching: CC Switch supports multi-model switching, not limited to a single provider
Points to Note
- There may be differences between Xiaomi's large model and Anthropic's native Claude in code generation capabilities. For complex projects, comparative testing is recommended. In recent years, Chinese domestic large models have made significant progress in code generation — besides Xiaomi's MiLM series, DeepSeek Coder, Alibaba's Tongyi Lingma, and Zhipu's CodeGeeX have all demonstrated strong competitiveness. However, different models perform differently across various types of programming tasks, and actual results need to be evaluated based on specific projects.
- Free tokens have quota limits — suitable for learning and lightweight development. Heavy usage still requires considering paid plans.
- During the open beta phase, there may be service stability fluctuations. It's not recommended for production environments.
Conclusion
Xiaomi's Million Token Plan provides developers with a low-barrier entry point to experience AI programming. Through the CC Switch tool, you can seamlessly connect Xiaomi's large model to Claude Code and gain AI-assisted programming capabilities in VS Code. For developers who want to try AI programming without bearing high API costs, this is a solution worth trying. We recommend interested readers apply early — free quotas during open beta phases are typically first-come, first-served.
Related articles

Claude Code for Test Development in Practice: An AI Programming Workflow That Doubles Your Efficiency
A practical guide to Claude Code for test development: auto-generating test scripts, Plan Mode workflows, MCP + Playwright integration, and Subagent parallel tasks to build systematic AI-assisted workflows.

Hermes Agent Hands-On Review: An AI Efficiency Revolution for Indie Game Developers
Indie game developer reviews Hermes Agent vs OpenClaude: intelligent context compression, real-time Memory, remote control via Telegram, and practical use cases in game dev, social media, and email.

Vibe Coding Beginner's Guide: Tool Selection Across Three Categories with Practical Examples
A comprehensive guide to Vibe Coding's three tool categories: Agent frameworks, CLI Coding, and IDE tools, with practical examples including Snake game and data analysis workbench.