AI 资讯
How I Built a Free AI Image Tool That Runs 100% in the Browser (No Server Needed)
I recently built a free online image processing tool that runs entirely in the browser. No uploads, no servers, no sign-ups. Here's how it works under the hood. https://img.aixiaot.com The Problem Most online image tools require uploading your photos to someone else's server. This raises privacy concerns and limits file sizes. I wanted to build something that processes everything locally. Tech Stack - Next.js for the frontend - TensorFlow.js + Real-ESRGAN for AI upscaling - @imgly/background-removal for AI background removal - Tesseract.js for OCR - Canvas API for compression, resizing, format conversion Features • AI Background Removal - one click, works for portraits, products, animals • Image Compression - reduce file size up to 96% • Format Conversion - JPG, PNG, WebP • ID Photo Maker - passport and visa photos with customizable backgrounds • AI Image Upscaler - 2x to 8x with Real-ESRGAN • OCR - extract text from images, 20+ languages • Image Resizer - enlarge or shrink Architecture All processing happens client-side using WebAssembly and the Canvas API. When you upload an image, it never leaves your device. The AI models (background removal, upscaling) run locally in your browser using TensorFlow.js and ONNX Runtime Web. Open Source The entire project is open source under AGPL v3. You can find it on GitHub: https://github.com/haizeigh/ai-image-tools Try It https://img.aixiaot.com I'd love to hear your feedback! What features would you add?
AI 资讯
Dev log #8 Hardening the Orchestrator: A Week of Making dev-publish Resilient
Spent the week deep-diving into my dev-publish tool, focusing on durability and orchestrator resilience. 21 commits across two repos, with a massive cleanup of the publishing logic and some much-needed architecture documentation. TL;DR There is a specific kind of satisfaction that comes from taking a tool you use every day and finally giving it the "production-grade" treatment it deserves. This week was exactly that. I spent most of my time in the guts of dev-publish , moving past the "it works on my machine" phase and into "it works even if the world is on fire" territory. With 21 commits and over 11,000 lines of code churn, I focused on making the publishing orchestrator resilient and the state durable. What I Built The star of the show this week was dev-publish . If you’ve ever tried to automate cross-platform technical writing, you know that the edge cases are where the real pain lives. I pushed 16 commits here, touching about 45 files. The diff was pretty wild: +6,926 additions and -4,289 deletions. That net positive tells part of the story, but the deletions represent me ripping out brittle logic that just wasn't cutting it. Hardening the Orchestrator The biggest win was a massive fix to make the publish state durable and the orchestrator resilient. In the previous iteration, if a network request to an API (like Dev.to) failed halfway through a multi-platform push, the state was... let's just say "vague." I spent a lot of time in src ensuring that the orchestrator can now pick up where it left off. I also documented the published-flag semantics and re-run resilience in the README. It sounds like a small thing, but knowing that a re-run won't accidentally double-post your article is a huge weight off my mind. I also spent some time on the "boring but important" stuff. I normalized how tags are handled to make them safer across different platforms and implemented a much stricter resolution for cover images. If a local image is required but missing, the tool now
AI 资讯
Spanlens
Spanlens is an open-source (MIT) LLM observability platform that lets developers monitor every call their application makes to OpenAI, Anthropic, Gemini, Mistral, OpenRouter, Azure OpenAI, or a local Ollama model. Integration takes one line: swap your client's baseURL to the Spanlens proxy, or run "npx @spanlens /cli init" and the wizard rewrites your code automatically. From that moment, every request is recorded with its model, token counts, latency, cost, and full prompt and response body, with streaming responses reconstructed automatically. The dashboard turns that raw log into operational insight. Cost tracking breaks spend down per request, per model, and per end user, and parses prompt-cache tokens separately so you see real cache savings rather than sticker price. Agent tracing visualizes multi-step workflows as Gantt waterfalls and node-and-edge graphs, highlighting the critical path so you can find the slowest dependency chain in a fan-out. Anomaly detection flags 3-sigma deviations in latency, cost, or error rate against a rolling 7-day baseline with root-cause hints. Alerts on budget, error rate, and p95 latency are delivered to Email, Slack, or Discord. Spanlens goes beyond passive logging. A regex-based PII and prompt-injection scanner inspects request and response bodies and can block injections at the proxy. The savings engine spots calls that match a cheaper model's profile (for example, a gpt-4o call that looks like a classification task) and estimates the monthly saving from switching. Prompt versioning with A/B experiments compares versions on latency, cost, and error rate using Welch's t-test for statistical significance, and an LLM-as-judge evaluation framework (judge with OpenAI, Anthropic, or Gemini) scores outputs against rubric anchors, with human agreement measured by Pearson r or Cohen's kappa. Reusable datasets power offline evals and regression checks.
AI 资讯
How I Organize 10,000+ Prompts Across Projects
One question I get surprisingly often is: "How do you manage thousands of AI prompts without losing track of them?" The answer is simple. I don't treat prompts as conversations. I treat them as reusable software assets. Over the years, I've created prompt libraries across multiple AI projects, books, research initiatives, and client work. That means managing well over 10,000 prompts covering everything from Python development and AI agents to content generation and workflow automation. If you're still storing prompts in random ChatGPT conversations, you're making life much harder than it needs to be. Here's the system that works for me. Stop Thinking of Prompts as Temporary Most people write a prompt, get an answer, and move on. That's fine for casual use. But builders rarely solve the same problem only once. If you find yourself writing: API documentation SQL queries FastAPI endpoints Docker configurations Code reviews Git commit messages ...you're probably solving recurring problems. Recurring problems deserve reusable prompts. My Folder Structure Instead of organizing prompts by AI tool, I organize them by purpose. For example: AI-Prompts/ │ ├── Python/ │ ├── FastAPI │ ├── Django │ ├── Flask │ └── Automation │ ├── JavaScript/ │ ├── React │ ├── Node.js │ └── TypeScript │ ├── DevOps/ │ ├── Docker │ ├── Kubernetes │ └── GitHub Actions │ ├── AI/ │ ├── RAG │ ├── Agents │ ├── MCP │ └── Prompt Engineering │ └── Documentation/ This mirrors how software projects are organized. Finding a prompt takes seconds. Every Prompt Has Metadata A prompt isn't just text. It's documentation. Each prompt in my library includes: Category: Purpose: Model: Input: Expected Output: Version: Last Updated: For example: Category: FastAPI Purpose: Generate CRUD endpoints Model: GPT-4o Expected Output: Production-ready FastAPI code Six months later, I know exactly why that prompt exists. I Version My Prompts Developers version code. Why not prompts? For example: FastAPI_CRUD_v1.md FastAPI_CRUD_v
AI 资讯
Why Every Developer Will Become an AI Orchestrator
For decades, developers were judged by one thing: How much code they could write. The best programmers wrote faster. Debugged faster. Built faster. That era is ending. The next generation of developers won't spend most of their time writing code. They'll spend it directing AI. Welcome to the age of the AI Orchestrator. The Evolution of Software Development Software development has always evolved. First, developers wrote machine code. Then came assembly. Then high-level languages. Then frameworks. Then cloud platforms. Then DevOps. Each evolution removed repetitive work and let developers focus on bigger problems. AI is simply the next step. But this time, it isn't replacing a tool. It's becoming a teammate. Coding Is Becoming a Smaller Part of the Job Building software isn't just writing code. A typical project includes: Understanding requirements Researching documentation Designing architecture Writing code Reviewing code Debugging Testing Writing documentation Deploying applications Monitoring production Fixing incidents Only one of those is coding. Everything else is coordination and decision-making. That's where AI is changing the game. From Programmer to Orchestrator Think about how modern teams work. A tech lead rarely writes every line of code. Instead, they: Assign work. Review solutions. Provide feedback. Make architectural decisions. Remove blockers. Developers are beginning to work with AI in much the same way. Instead of writing every function, they'll: Define the goal. Provide the right context. Choose the right tools. Review AI-generated code. Run tests. Improve weak areas. Approve the final result. The value shifts from typing code to guiding its creation. What Does an AI Orchestrator Do? An AI orchestrator doesn't ask one question and accept one answer. They manage a workflow. For example: Break a large project into smaller tasks. Give each AI the context it needs. Decide when to retrieve documentation. Decide when to search the codebase. Ask AI to g
AI 资讯
Nano Banana 2 Lite and Gemini Omni Flash: What's Actually New in Google's Gemini API
Google added two new models to the Gemini API today: Nano Banana 2 Lite (image generation) and Gemini Omni Flash (video generation + editing). Neither is the Gemini 3.5 Pro release people have been waiting for, so it's easy to miss. Here's what's actually in them. TL;DR Nano Banana 2 Lite: gemini-3.1-flash-lite-image = text-to-image in ~4s, $0.034/1K images Gemini Omni Flash: gemini-omni-flash-preview = video gen + conversational editing, $0.10/sec Both are built to be chained: generate an image fast, then animate it into video Neither model is positioned as a quality upgrade = both are cost/speed plays Nano Banana 2 Lite Model ID: gemini-3.1-flash-lite-image Text-to-image output in about 4 seconds $0.034 per 1K-resolution image Positioned as the direct replacement for the original Nano Banana ( gemini-2.5-flash-image ) - if you're on that model, this is a drop-in upgrade Available in Google AI Studio, Gemini API, Gemini Enterprise Agent Platform, and consumer surfaces (Search AI Mode, Gemini app, Photos, NotebookLM, Flow, Google Ads) Gemini Omni Flash Model ID: gemini-omni-flash-preview Public preview in Google AI Studio and the Gemini API Conversational editing - refine a generated video using plain-language instructions instead of re-prompting from zero Multimodal referencing - combine text, image, and video inputs to keep a scene consistent $0.10 per second of video output (same rate as Veo 3.1 Fast) Known limitations right now Generations capped at 10 seconds No audio reference uploads yet No scene extension yet Video references under 3 seconds are accepted by the API schema but not correctly processed yet Character consistency across scene changes/pans still has rough edges Google says longer durations are coming. The part worth paying attention to: chaining them Generate an image with Nano Banana 2 Lite (fast, cheap) Pass that image as a reference into Omni Flash Omni Flash animates it into a video Both models are optimized for throughput and cost, not for to
AI 资讯
Switching from Claude Code to Grok – Same Interface, Different Model
At the beginning of June I started a “ Claude withdrawal ” challenge. The plan was to run MiniMax 3 for a month, to see if I can get the same level of quality, but at 5x less the price. Until then, Claude Code was my main driver, with MiniMax on the backup, for when I was running out of quota, or sometimes for code review. The monthly bill for Claude was $100 on the Max plan, whereas for MiniMax I would pay $20 for the Token plan. All in all, it seemed like an interesting experiment. Then, half way through the challenge, Grok came into the picture. I got a very interesting offer at $35 for 3 months, then $35/month. But Grok has something neither Claude, nor MiniMax can give me out of the shelf: video and image generations. The only unknown was if switching from Claude Code to Grok will still maintain the same coding power. So I instantly took the offer, and did whatever I had to do to understand if this was the right path. And here comes the “whatever I had to do”, in plain technical terms. Switching from Claude Code to Grok – the Actual Steps The switch itself was interesting because I didn’t want to lose the Claude Code interface. I like the harness. The way it works with my codebase, the commands, the flow. So I used a helper called cliproxyapi . It’s a small proxy that sits between the Claude Code client and whatever model you point it at. You run it locally, tell it to forward requests to Grok’s API instead of Anthropic’s. Then you launch Claude Code the same way you always do, but it talks to Grok under the hood. Here’s how it goes in practice. Step 1: Install the proxy. I used brew to install it, I’m on a Mac, and also because I wanted to have it started as a service. Step 2: Set two environment variables. One is the target API base URL, for Grok that’s something like https://api.x.ai . The other is your API key. "env" : { "ANTHROPIC_BASE_URL" : "http://localhost:8317" , "ANTHROPIC_API_KEY" : "cliproxy-local-key" } , Notice how we use “cliproxy-local-key”, be
AI 资讯
The 2026 AI CLI Landscape: Claude Code, Gemini CLI (Antigravity CLI), and OpenClaw
Terminal-based AI agents have evolved considerably over the past few months, and several changes are significant enough that developers relying on these tools should be aware of them. Most notably, Google has begun retiring Gemini CLI for individual users in favor of Antigravity CLI — a closed-source successor that has drawn some pushback from the community that built out Gemini CLI's open-source ecosystem. Meanwhile, Claude Code has moved to the Opus 4.8 and Fable 5 models with a 1M-token context window, and OpenClaw, the open-source "always-on" agent, has grown into one of the most-starred projects on GitHub — alongside a documented CVE worth knowing about before deployment. I've just published an updated, fact-checked comparison covering: What actually changed with Gemini CLI's retirement, and what it means if you have scripts or CI/CD pipelines depending on it Claude Code's current model lineup, context window, and new Dynamic Workflows feature OpenClaw's architecture, extensibility via ClawHub, and the security considerations that come with deep system access A full feature-comparison table (cost, context window, open-source status, setup complexity) A practical case study walking through how all three tools can work together on a real project Would be curious to hear which of these you're using day-to-day, and whether the Gemini → Antigravity transition has affected your workflow. Full article here: Devlycan - Technology & Programming Insights Devlycan - Technology, programming, AI, lifestyle, and future trends—simple insights for the new digital generation. devlycan.com
AI 资讯
The Promotion Doc That Writes Itself
TL;DR: I set up a Claude Code skill that checks in with me about my workday, asks follow-up questions, and saves a structured markdown file I can use as promotion evidence. Here's why it works, and how to build one in about five minutes. May 6th On May 6th I had an energy level of 2 out of 5. I got my Claude Certified Architect exam score back that day: 717 out of 1000. I needed 720. I missed it by three points. Four lines down in the same entry, my manager had told me: "your leadership is being felt around Artium. You're making a good impact." Here's the thing about that day: the bad number is vivid and self-evident. 717. Three points short. That number was going to live in my head rent-free for weeks. But the recognition? That quietly evaporates. Left to memory, May 6th is the day I failed the exam by three points. On the page, it's also the day my manager told me my leadership was landing across the company. The entry keeps the thing I'd lose otherwise. The Problem With Memory I've been bad at this for years. At performance review time, I'd stare at a blank document trying to remember what I'd actually done. I'd come up with four things instead of forty. My manager would advocate for me based on what she happened to see, which was never the full picture. The thing is, I did good work. I just didn't capture it. A few years ago I tried to solve this with Google Forms , a structured form I'd fill out at the end of each day that fed into a spreadsheet. It worked, kind of. The data was there, but it felt like homework. The form didn't ask follow-up questions. It didn't notice when I was being vague. I had to go somewhere specific to fill it out. And when review time came, I had to go back somewhere else to compile everything, figure out what mattered, and assemble it into something coherent. The friction wasn't just the daily entry. It was the whole chain: capture, retrieve, synthesize, present. I was on my own at every step. So I built something better. What I Built
AI 资讯
Structured output broke on us three times. The third time taught us operator-ready.
Structured output broke on us three times. The third time taught us what "operator-ready" means. Last quarter we shipped a contract-extraction agent to an enterprise legal team. Schema validation passing at 97%. Human reviewers satisfied with the output quality in testing. Rollout went smoothly. Then it broke. Three times. In three completely different ways. The first two failures we fixed with better prompts and stricter schemas. The third one taught us something the first two hadn't: that "operator-ready" is not a technical checklist. It's a claim about your agent's behavior under conditions you didn't design it for. Failure one: the validation paradox Week two. A lease agreement came through with a renewal clause formatted as a table instead of prose. Our extractor looked for renewal terms in a specific JSON path. The table format populated the schema differently. Validation passed. The extracted renewal date was off by two years. The fix was obvious in retrospect: add a canonical-format normalization step before extraction. But the lesson was sharper than that. Schema validation tells you the shape of the output, not whether the content is correct. A JSON object with the right keys and the right types can still contain wrong values. Our 97% validation success rate was measuring the wrong thing. It was measuring structure conformance, not content accuracy. After this failure, we separated validation into two signals: schema validity (does the object have the required fields) and field confidence (do we have evidence the content is correct). We started logging both. An output is trusted only when both signals are above threshold. Failure two: the retry loop that lies Month one. A particular clause type appeared in a contract format we hadn't trained our test set on. The extractor failed schema validation on the first attempt. Our retry logic kicked in, filled missing fields with model-inferred defaults, and passed validation on the third try. The output looked rig
AI 资讯
Mark Zuckerberg tells staff that AI agents haven’t progressed as quickly as he’d hoped
At an internal meeting, the Meta CEO reportedly said that AI development efforts were not moving as quickly as anticipated.
AI 资讯
"I built an AI agent that pays its own bills — and you can fork it for $0"
Three months ago, the idea of an AI agent earning money autonomously was a thought experiment. Today, it's a $0-budget repo on GitHub. AIA — Autonomous Insight Agent is what I shipped this week. It's an LLM agent that: Collects signal from 6 free public APIs every 6 hours (Hacker News, GitHub trending, V2EX, dev.to, Lobsters, HN Algolia) Curates 100+ raw items down to 40 ranked, topic-tagged, de-duped entries using deterministic scoring (recency × source weight × topic boost × negative penalty) Publishes a free public dashboard at https://razel369.github.io/aia/ Exposes a paid x402 API at https://aia-x402.rmalka06.workers.dev — USDC on Base, no KYC, no API key, the HTTP 402 status code IS the payment request Auto-bids on agent marketplace jobs (MoltJobs) where AIA fits — research, data, competitive intel Fulfills accepted jobs autonomously — generates a research report from the latest feed, submits via the same API Why x402 matters The x402 protocol (Coinbase, https://x402.org ) revives the long-reserved HTTP 402 Payment Required status code as a real machine-to-machine payment primitive. The flow: Agent → GET /v1/signals → 402 + PAYMENT-REQUIRED header → Agent signs a USDC payment to my wallet → Agent retries with PAYMENT-SIGNATURE header → 200 OK + PAYMENT-RESPONSE header + signal JSON No Stripe, no accounts, no monthly subscriptions. Pay $0.01 USDC per call, instantly settled on Base. The agent consumer never has to ask a human to buy credits. Why this is novel Most "data feeds" today are static dumps or human-curated. AIA is the first agent-curated, agent-paid-for, agent-consumed stream. The LLM layer IS the moat — anyone can scrape HN, but de-noising, de-duping, and topic-classifying 100+ items into 40 ranked signals in 17 seconds is the actual product. The killer line in my dev plan: every job AIA accepts on MoltJobs can be fulfilled by calling its own paid endpoint. The agent pays for its own LLM compute via marketplace earnings — a positive feedback loop tha
AI 资讯
Fable 5 got jailbroken again
Fable 5 got jailbroken again Researcher Vitto Rivabella tested Fable 5’s defenses and managed to find a bypass. According to him, most attempts failed. The protection is multi-layered: the model checks the prompt, conversation history, system context, and its own response. Some filters run during generation and can stop the answer halfway through. The checks are not based on keywords. The system looks at meaning, intent, language, wording, and suspicious chains of requests. The bypass took around 20 hours. It required rare languages, academic framing, long build-ups, Unicode, breaking the task into parts, and working with the chain of thought. The author did not get a stable bypass for long tasks. According to him, regular search is faster and cheaper.
AI 资讯
Applied AI: Copilot's Kimi K2.7, AI Agent Workflow Barriers, Open-Source Life Planner
Applied AI: Copilot's Kimi K2.7, AI Agent Workflow Barriers, Open-Source Life Planner Today's Highlights This week's top AI news covers a significant upgrade to GitHub Copilot with the Kimi K2.7 Code model, enhancing developer productivity through advanced code generation. We also explore the practical challenges faced by AI agents in fully automating workflows due to "last mile" integration issues, alongside a hands-on look at a new open-source AI life planner that demonstrates real-world application of AI tools. Kimi K2.7 Code is generally available in GitHub Copilot (Hacker News) Source: https://github.blog/changelog/2026-07-01-kimi-k2-7-is-now-available-in-github-copilot/ GitHub Copilot has integrated the Kimi K2.7 Code model, making this advanced code generation capability generally available to its users. This update signifies a continuous improvement in the underlying AI models that power development tools, specifically in the domain of code generation and assistance. Kimi K2.7, presumably an internal or specialized model from GitHub's AI research, focuses on enhancing the quality, relevance, and efficiency of generated code suggestions, auto-completions, and code explanations within the Copilot environment. For developers, this means a more accurate and helpful programming assistant that can better understand context and intent. The deployment of Kimi K2.7 into a widely used production tool like GitHub Copilot demonstrates a key pattern in applied AI: iterating on foundation models and integrating improved versions directly into developer workflows. This enhancement aims to boost developer productivity by reducing the time spent on boilerplate code, debugging, and searching for solutions, allowing engineers to focus on higher-level architectural and design challenges. This release confirms the ongoing progress in AI's capability to augment the software development lifecycle. Comment: New model, better code generation – straightforward for Copilot users. This
AI 资讯
Architecting Non-Custodial Batch Transactions for Cross-Chain Wallet Consolidation
Maintaining a robust testing pipeline or managing automated node infrastructure often requires orchestrating dozens of isolated EVM wallets. Over time, these automated Python or JavaScript configurations inevitably hit a common wall: the accumulation of fragmented token dust across multiple layers (Ethereum, Arbitrum, Base, BSC, etc.). Trying to clear these micro-balances manually or writing one-off scripts to sweep individual assets scale operational costs rapidly. Each network requires separate RPC updates, custom middleware logic, and redundant gas overhead, turning standard infrastructure hygiene into an engineering bottleneck. The Problem with Traditional Asset Sweeping When handling larger developer setups or wallet clusters, custom scripts face three major friction points: Redundant Network Fees: Batching transfers without native contract-level optimization burns excessive gas when scaling to 50+ addresses. RPC Disruption: Constantly querying and broadcasting batch transfers via public or even shared private endpoints can trigger rate limits. Data Contamination: Manually routing funds from dense testing nodes increases the risk of cluster cross-contamination. To resolve this friction within our decentralized dev pipelines, we deployed a streamlined utility layer: CryptonEquity Terminal ( https://cryptonequity.com ). Building a Unified Utility Layer for Multi-Chain Workflows The terminal introduces a non-custodial Cross-Chain Dust Sweeper designed to eliminate fragmented operational friction. Instead of manually deploying individual sweeping scripts per account, the infrastructure automates multi-chain scanning and groups asset consolidation into a single transaction link. Simultaneous Layer Aggregation: Automatically detects micro-balances across dominant EVM networks at once. Gas Mitigation: Designed to structure transfer paths to limit redundant network fee overhead. Zero Onboarding Friction: Operating strictly on a non-custodial architecture, it requires n
AI 资讯
Gate the Statement, Not the Tool Name
The original safety gate on the Dolt-over-MCP plugin tried to keep a Claude Code agent harmless by excluding "history-affecting tools" from its MCP grant. It was the wrong granularity, and it did nothing. MCP exposes the entire database through one tool — query / exec — and that tool carries every SQL verb. SELECT rides it. So does CALL DOLT_PUSH , CALL DOLT_RESET('--hard') , DROP DATABASE , and CALL DOLT_BRANCH('-D', 'main') . Excluding "dangerous tools" from the grant accomplishes nothing, because the dangerous verbs live inside the one tool you already granted. The destructive operations were never separate tools to exclude. This is the reframe the whole Phase 0 hardening pass turned on: a tool-name allowlist is meaningless for any tool that carries a sub-language. SQL is a sub-language. So is the shell behind a Bash tool. So is anything behind an eval . If the tool can run arbitrary statements in some grammar, the only boundary that means anything is one that reads the statement. It is the move from tool-name allowlisting to capability-based security: the grant stops being "you may call the query tool" and becomes "you may run these statement classes inside it." Why not just allowlist the safe tools? Because there is exactly one tool, and it is not safe or unsafe — it is whatever statement you hand it. You cannot partition a single door into a safe door and a dangerous door by naming. The same logic kills the next-obvious fix: a denylist of dangerous verbs. Blacklist DOLT_PUSH , DOLT_RESET , DROP ... and miss DOLT_REBASE , or the proc Dolt ships next quarter, or a CALL whose name your regex didn't anticipate. A denylist is only as good as your imagination on the day you wrote it. The fix inverts that. You add safety by enumerating what is safe, not by blacklisting what is dangerous. Anything you cannot positively classify as safe is treated as the most dangerous thing it could be. Default-deny the unknown. It's least privilege applied to a grammar: the agent get
AI 资讯
Cloudflare will filter out web crawlers that serve AI companies
The hosting platform wants sites to have more control over how AI companies use their content.
AI 资讯
Jersey Mike’s IPO illustrates how bad the AI hype has become
Just for kicks, I took a look at Jersey Mike's IPO documents. Surely a sandwich shop would have no need to mention AI. But lo and behold.
AI 资讯
Meta quietly launches vibe-coded gaming app Pocket
Meta has quietly launched Pocket, an experimental AI app that lets users generate and share interactive mini games using text prompts.
AI 资讯
The Hugging Face Hub Is a Free JSON API: Rank Trending AI Models Without a Key
Everyone reads the Hugging Face trending page in a browser. Almost nobody knows the whole Hub sits behind a plain JSON API with no key, no login, and cursor pagination. If you want a weekly report of what the AI community is actually adopting, you can build it with fetch . The endpoints GET https://huggingface.co/api/models GET https://huggingface.co/api/datasets GET https://huggingface.co/api/spaces Useful parameters, same across all three: sort ranks results: trendingScore , downloads , likes , createdAt , lastModified direction=-1 for descending search matches names, author restricts to one org like meta-llama filter matches Hub tags: text-generation , license:mit , even arxiv:2606.23050 limit up to 100 per page So the top trending models right now: https://huggingface.co/api/models?sort=trendingScore&direction=-1&limit=100 trendingScore is the interesting one. Downloads and likes rank all time popularity, which is dominated by the same old models. Trending score is Hugging Face's own measure of current momentum, and it moves daily. Today it puts a four day old OCR model from Baidu at the top, which no downloads sort would surface for weeks. Slim payloads with expand By default the models endpoint returns a siblings array listing every file in the repo, which bloats a 100 item page. Ask for exactly the fields you want instead: const fields = [ ' downloads ' , ' likes ' , ' trendingScore ' , ' pipeline_tag ' , ' tags ' , ' createdAt ' ]; const params = new URLSearchParams ({ sort : ' trendingScore ' , direction : ' -1 ' , limit : ' 100 ' }); for ( const f of fields ) params . append ( ' expand[] ' , f ); const res = await fetch ( `https://huggingface.co/api/models? ${ params } ` ); const models = await res . json (); Pagination is a Link header There is no page parameter. Each response carries a Link header with a cursor for the next page, GitHub style: function nextUrl ( res ) { const m = ( res . headers . get ( ' link ' ) || '' ). match ( /< ([^ > ] + ) >; \s *r