How to Harness Free Agnes AI Models in Claude Code for Unlimited Token Use
The author walks through integrating Agnes AI's free text, image, and video models with Claude Code via CC Switch, details each setup step, runs real‑world tasks such as codebase analysis, webpage generation, diagram creation, and short‑video production, and evaluates the models' capabilities and limitations.
1. Integrating Claude Code with Agnes API
Claude Code can be routed through CC Switch to the Agnes multimodal API. Required items: Agnes API Key, CC Switch, Claude Code.
API endpoint: https://apihub.agnes-ai.com/v1 and model name agnes-2.0-flash.
Step 1: Get Agnes API Key
Visit https://platform.agnes-ai.com/, register, create and copy a new key.
Step 2: Install CC Switch
Download from https://github.com/farion1231/cc-switch/releases, install, and select claude-cli at the top.
Step 3: Enable CC Switch routing
Open the routing config, enable the Claude route so requests flow: Claude Code → CC Switch → Agnes API.
Step 4: Add Agnes as a vendor
API Key: paste the key created earlier
Endpoint: https://apihub.agnes-ai.com/v1 API format: openai chat completions
Model:
agnes-2.0-flashStep 5: Fetch model list
Confirm the key and endpoint work by retrieving the model list and selecting agnes-2.0-flash.
Step 6: Add compatibility parameters
{
"allowed_openai_params": ["thinking", "context_management"],
"litellm_settings": {"drop_params": true}
}This prevents failures from unsupported parameters.
Step 7: Verify in Claude Code
Send a simple query like "你好"; the response comes from agnes-2.0-flash, confirming the pipeline works.
2. Text Model Evaluation
Task A – Codebase analysis
Prompted the model with the MewCode Agent source (link omitted) to produce a project‑structure overview and core‑module documentation. The model launched a sub‑agent, scanned directories, and generated two Markdown files within minutes: one listing directories, responsibilities, and entry files; another detailing three key modules with file paths, interfaces, and call relationships, plus a section for TODO/FIXME markers.
Task B – Webpage generation
Prompted the model to create a single‑page World Cup forum HTML ( worldcup-forum.html) with navigation, post list, and schedule cards, all styled inline. The generated file met every layout requirement and opened directly in a browser.
The text model currently supports a 256 K token context window; an announced upgrade will increase this to 1 M tokens.
3. Image Model Evaluation
Architecture diagram
Prompt: "Generate a clear micro‑service architecture diagram, landscape 16:9, with user/App entry, API Gateway, three core services, MySQL/Redis/Kafka, blue‑gray style. No watermarks." Result: a clean diagram with the described components and connections, ready for inclusion in presentations.
Creative images
Two Chinese‑style scenes were generated:
Photorealistic image of a university student receiving a Tencent offer, with realistic faces and lighting.
Illustration of a high‑school “golden list” (金榜题名) in a red‑gold Chinese festive style, without modern elements.
The image model’s 4K ultra‑HD output is in gray‑scale testing and will be publicly available soon.
4. Video Model Evaluation
Drama short – Dragon‑boat race
Prompt described a 15‑second clip of a dragon‑boat race with specific camera cuts. The generated video captured the actions, timing, and visual style as described.
Cartoon animation – Fox learning programming
Prompt asked for a 10‑second Pixar‑style animation of an orange fox coding, with supporting characters and UI elements. The output showed smooth character transitions, correct props, and consistent lighting.
Both videos demonstrated stable multi‑character storytelling despite video generation typically being costly.
5. Usage Statistics (first week)
Text model agnes-2.0-flash consumed over 1 trillion tokens.
Image model Agnes-Image-2.1-Flash generated more than 2 million images.
Video model Agnes-Video-2.0 generated over 2 million seconds of video.
6. Conclusions and Outlook
Agnes’s free models (text, image, video) are less capable than Claude Opus but incur no token or usage cost, enabling extensive experimentation. A practical workflow is to use Claude Opus for high‑level planning and Agnes models for concrete execution.
Upcoming upgrades include expanding the text model’s context window to 1 M tokens, adding a 4K output tier for the image model, and further improvements to the video model.
Agnes AI documentation: https://agnes-ai.com/doc/Agnes | API Platform: https://platform.agnes-ai.com/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
