Free Claude Code Tutorial: Complete Configuration Guide for Connecting to Agnes Multi-Modal Models

Connect Claude Code to Agnes AI's free multi-modal models via Sense Switch for zero-cost AI usage.
This guide walks through connecting Claude Code to Agnes AI's free multi-modal models using Sense Switch as an interface switcher. The setup enables zero-cost text generation, image creation, and video production. Real-world testing shows the free Agnes 2.0 Flash model handles data analysis dashboards, professional headshot generation, and emotionally coherent video creation, though with caveats about stability and long-term availability.
Introduction: A New Approach to Using Claude Code for Free
Claude Code, widely recognized as one of the most powerful AI Agent programming tools available today, has always had a barrier to entry — using it requires either subscribing to an official paid plan or manually connecting to third-party API services, both of which cost real money.
This article introduces a free solution: by replacing Claude Code's backend with a free AI model platform, you can achieve zero-cost access to text, image, and video generation across three modalities. This setup not only handles coding and copywriting but also enables unlimited image and video generation. It's worth noting that this is a "workaround" involving third-party model integration — performance and stability will differ from official models, making it best suited for learning and low-cost experimentation.
The Roles and Collaboration of Three Core Tools
This entire solution relies on three tools working together. Understanding their relationships is key to successful configuration.
Claude Code: The AI Agent That Executes Tasks
Claude Code is the star of this setup. Installation is straightforward — just follow the one-line command from the official documentation. It plays the role of "executor" — receiving your instructions and calling models to complete programming, data analysis, copywriting, and other tasks.
From a technical standpoint, Claude Code is a command-line AI programming assistant released by Anthropic, falling under the AI Agent (intelligent agent) category. Unlike traditional code completion tools (such as early Copilot), AI Agents possess autonomous planning, tool invocation, and multi-step reasoning capabilities — they don't just answer questions but can decompose complex tasks, autonomously determine execution steps, and invoke the file system and terminal commands to complete work. This enables Claude Code to independently handle complete workflows from code writing and debugging to project refactoring, rather than merely providing code snippet suggestions.
Agnes AI: The Platform Providing Free Multi-Modal Models
Agnes AI is a free AI model platform. It's not a wrapper or relay service — its text, image, and video models are all self-developed, aiming to compete with first-tier models from OpenAI, Google, and others.
The term "multi-modal" here refers to an AI system's ability to simultaneously process and generate multiple types of data — text, images, audio, video, etc. Traditional AI models typically excel at only a single modality; for example, the GPT series initially only processed text, while DALL-E only generated images. The technical difficulty of multi-modal integration lies in the fundamentally different data representations across modalities: text consists of discrete token sequences, images are continuous pixel matrices, and video additionally involves inter-frame consistency across the temporal dimension. Providing all three capabilities on a single platform means different model architectures need to work together at the foundational level.
Most critically, they've made this entire multi-modal API completely free, with no time limits and no usage caps. According to public data, in the first week after the free launch on June 1st, their text model received over 10,000 API calls, image generation exceeded 2 million images, and video generation surpassed 2 million seconds. While the business logic behind this "free and fully open" strategy is questionable, it's undeniably a genuine benefit for users.
Sense Switch: The Interface Switcher Connecting Claude Code and Agnes
Sense Switch is a free open-source project that functions as an "interface switcher." It centrally manages which backend endpoint Claude Code connects to, what API address to use, and which model to call. Once configured, switching between options requires just a single click. In this solution, it's used to swap Claude Code's backend to Agnes AI.
To summarize the relationship between the three: Claude Code does the work, Agnes AI provides free models, and Sense Switch connects them together.

Complete Configuration Process for Connecting Claude Code to Agnes
Step 1: Obtain a Free Agnes API Key
Open the Agnes API platform, click "API Keys" in the left sidebar menu, then click "Create New Key" and give it any name to generate one.
An API Key (Application Programming Interface Key) is a credential that AI model platforms use to identify callers, similar to a digital key. When Claude Code sends requests to the backend, it includes this key in the HTTP request headers, allowing the server to determine whether the request is legitimate, which user it's from, and whether they have calling permissions. This authentication mechanism is standard practice in RESTful API design, adopted by virtually all major AI platforms (OpenAI, Google, Anthropic). If a key is leaked, others can impersonate your identity and consume your quota, so it must be stored securely.
Step 2: Configure the Provider in Sense Switch
Open Sense Switch and switch to the "Claude CLI" tab in the top toolbar (specifically for configuring Claude Code), then click the plus icon in the upper right to add a new provider:
- Type: Select Claude Provider, then choose "Custom Provider"
- API Key: Paste the key you just copied from the Agnes platform
- Request URL: Enter Agnes's gateway address, which forwards Claude Code's requests to Agnes
- API Format: Keep the default
After filling in the details, click "Get Model List." If you successfully retrieve a list of models, it means you're connected to Agnes.
Step 3: Model Mapping and Route Forwarding Setup
Next, set up model mapping to map all the models Claude Code needs to Agnes 2.0 Flash. This way, regardless of which model Claude Code tries to call, it actually routes through Agnes's free model.
Model Mapping addresses interface compatibility. Claude Code is designed to call Anthropic's native model names by default (such as claude-sonnet-4-20250514), but the actual backend has been swapped to Agnes. By using a mapping table to point all these model names to Agnes 2.0 Flash, Claude Code "thinks" it's calling native models while requests are transparently forwarded to the third party. Route Forwarding is a network-level concept — Sense Switch launches a local proxy service that intercepts all API requests from Claude Code and redirects them to the target address based on configuration rules, completely transparent to Claude Code.
Configuring the provider alone isn't enough — you also need to enable forwarding. Go to the "Routes" interface, turn on local routing, and enable the Claude route switch. Finally, return to the provider list, find Agnes, and click to enable it. From this point on, all Claude Code requests will flow through Sense Switch and be forwarded to Agnes's free gateway.
Type the claude command in your terminal and send "hello" — if you receive a response, the entire configuration is complete.

Real-World Testing: Text Model Capabilities
Configuration is just the first step — the actual performance of the free model is what determines this solution's true value.
For testing, I used a real work requirement: a spreadsheet containing over 100 rows of horizontal data covering video operations across multiple platforms. I had Claude Code call Agnes 2.0 Flash to create an operations review dashboard based on this data.
The results were quite usable — charts, filters, and detailed breakdowns were all present, with a clean interface that fully met daily review needs. I then had it upgrade the output into a business collaboration landing page ready to send directly to brand partners. This version was equally complete, featuring data snapshots, representative works, and collaboration methods — it looked professional and was ready for immediate use.
From an ordinary data spreadsheet to a reviewable dashboard to a business collaboration page — all powered by the free Agnes model. For a free model, this level of completion is quite impressive.
Real-World Testing: AI Image Generation
Since Claude Code can only connect to text models directly, you need to create a dedicated Skill for calling Agnes's image generation model. When using it, simply ask Claude Code in the chat to generate an image based on a prompt — it will automatically invoke the Skill and output the image to your project directory.

Text-to-Image Results
I tested by generating a portrait photo in 35mm film direct flash style. The output delivered convincing film grain texture, direct flash highlights on the face, realistic skin texture with visible pores, all presenting a street-sports aesthetic.
There's a key cost logic here: AI image generation often requires repeated "rolling the gacha" to get satisfactory results. With paid models, a single decent image costs several cents, and repeated attempts add up quickly. On Agnes, everything is zero-cost — you can experiment and re-roll freely.
The term "rolling the gacha" exists because AI image generation models (such as Diffusion Models) work by starting from random noise and progressively denoising to restore an image matching the prompt description. Since the initial noise is randomly sampled, even with identical prompts, each generation produces different results. Generation quality is heavily influenced by the random seed — sometimes you get a satisfactory result on the first try, sometimes it takes dozens of attempts to "roll" the ideal composition. With paid models, each generation consumes computing credits, while a free unlimited environment completely eliminates this trial-and-error cost.
Image-to-Image Results: Outfit Change, Same Face
Giving the model a reference image for secondary creation produced a standard professional headshot — half-body composition, natural expression, genuine smile. Most importantly, it achieved "outfit change without face change": the face remained the same, but the clothing, background, and lighting were completely replaced. One casual photo plus a prompt transforms into a professional headshot suitable for resumes, LinkedIn, or personal pages — highly practical.

Real-World Testing: AI Video Generation
Video generation was the most impressive part of this test. Using a prompt, I generated a short video of a female singer performing: a close-up shot of a red-haired singer, with curly hair strands and backlit highlights clearly visible.
The most remarkable aspect was the emotional progression — from calmly closing her eyes to build up, to opening her mouth to sing, to slightly furrowing her brows as she becomes fully immersed in the emotion. The hand gripping the microphone, lip movements, and breathing rhythm were all coherent, without the stiffness commonly seen in AI videos.
The core technical challenge in AI video generation is Temporal Consistency. Single-frame image generation is already quite mature, but maintaining coherent character appearance, motion trajectories, and background scenes across consecutive frames requires the model to understand physical motion laws and temporal dependencies. Current mainstream video generation architectures (such as DiT-based spatiotemporal diffusion models) address this through temporal attention mechanisms, but haven't fully solved it — which is why AI videos occasionally produce "glitches."
Of course, models have their "hiccups" too. In another nighttime street-style video, the background nightscape behind the main subject looked very realistic, but on closer inspection, a pedestrian on the left suddenly "cloned" into two people — a typical phenomenon where the model loses individual tracking when processing background moving objects, causing the same object to be redundantly generated in adjacent frames. However, the main subject remained stable throughout, with clarity maintained where needed. When this happens, simply generate a few more times — after all, it's completely free and unlimited.
Conclusion: Value and Limitations of the Free Solution
The core value of this "Claude Code + Agnes AI + Sense Switch" free solution lies in experiencing full multi-modal AI capabilities with an extremely low barrier to entry:
- Text capabilities: Can complete actual work tasks including data analysis, dashboard creation, and landing page generation
- Image generation: Text-to-image delivers excellent quality, image-to-image "outfit change without face change" is highly practical
- Video generation: Excellent expression and emotional coherence, occasional imperfections but easily retried
It's important to note that third-party free solutions like this carry inherent uncertainties: model quality, service stability, and the continuity of free policies cannot be guaranteed, and the capabilities are not equivalent to official Claude models. SLA (Service Level Agreement) is a formal commitment between cloud service providers and users regarding availability, latency, fault compensation, and other aspects. Free third-party services typically provide no SLA guarantees — platforms may adjust their free policies, limit call frequency, or even discontinue services at any time.
For learning, experimentation, and lightweight use, it's a high-value choice. However, for production environments, it's still advisable to evaluate official services or those with explicit SLAs. Overall, being able to get hands-on experience with a full multi-modal AI toolchain at zero cost is a remarkably rare opportunity in itself.
Related articles

Lighthouse: A Deep Dive into HarbourMasters' Open-Source Classic Game Porting Engine
A deep dive into the Lighthouse open-source game porting engine by HarbourMasters, exploring its C-based architecture, role in the decompilation porting ecosystem, and digital game preservation.

The Deeper Meaning Behind Cursor Giving Free Credits to FFmpeg Developers
Cursor gave free credits to FFmpeg open-source developers, sparking tech community debate. This article analyzes the dynamics between AI coding tools and open-source ecosystems.

The Flood of AI-Generated Books: How the Publishing Market Can Tackle the Content Dilution Crisis
AI-generated books are flooding the market at alarming rates, diluting quality content and threatening independent authors. This article analyzes the impact on readers, authors, and platforms, and explores solutions for rebuilding content trust.