Dev.to
I built a $0.0005 screenshot cropper that saves AI agents 95% on vision LLM costs
If you're building AI agents that work with browser screenshots, you already know the pain. You take a full 1920×1080 screenshot, pass it to GPT-4o or Claude, and watch your token bill climb — while the model downscales the image anyway and blurs the exact text you needed it to read. There's a better way. The problem Vision LLMs are expensive for two reasons when you feed them full screenshots: Token cost — a full screenshot can cost 10–20x more tokens than a small crop Accuracy loss — models internally downscale large images, blurring fine text, labels, and UI elements But your agent already knows where to look. Browser automation tools like Playwright and Puppeteer give you getBoundingClientRect() — the exact pixel coordinates of any element on screen. So why are you sending the whole screenshot? The solution I built a stateless pay-per-use API that takes a screenshot and pixel coordinates, and returns just the cropped element as a lossless PNG — ready to pass directly to your vision LLM. POST /crop { "image" : "<base64 screenshot>" , "x" : 120 , "y" : 45 , "width" : 640 , "height" : 80 } Returns: { "success" : true , "data" : { "base64" : "iVBORw0KGgo..." , "mime" : "image/png" , "width" : 640 , "height" : 80 , "bytes" : 4821 } } A 4KB crop instead of a 2MB screenshot. Same information. 95% fewer tokens. How payment works Here's where it gets interesting. The API uses the x402 payment protocol — HTTP's long-dormant 402 Payment Required status code, finally put to use. There are no API keys. No accounts. No subscriptions. The agent pays $0.0005 USDC per crop on Base L2 automatically. The flow: 1. Agent POSTs to /crop (no payment header) ← 402 with payment instructions in headers 2. Agent transfers 0.0005 USDC to recipient wallet on Base (near-zero gas, ~2 second settlement) 3. Agent POSTs again with x-payment-tx-hash header ← 200 with cropped PNG The entire exchange happens inside the HTTP request cycle. No human intervention. No billing dashboard. The money lands
aaroncarlisle94
2026-06-25 05:20
👁 8
查看原文 →
Dev.to
Who Coined the Term Internet of Things?
The Internet of Things is now a phrase you see on product boxes, in boardroom slide decks, and across thesis titles in engineering departments everywhere. But it has a surprisingly precise origin. The term was coined in 1999 by a British technologist named Kevin Ashton, and it was not born in a research lab or an academic paper. It started its life as the title of a corporate sales presentation. A slide deck, not a laboratory In the late 1990s Ashton was a brand manager at Procter & Gamble, the consumer goods giant behind products you would find on any supermarket shelf. He was wrestling with a mundane but expensive problem: store shelves kept running out of a particular shade of lipstick, even though the warehouse had plenty in stock. The supply chain simply had no reliable way to know, in real time, what was where. Ashton's proposed fix was radio-frequency identification, or RFID: tiny tags that could be attached to products and read automatically by sensors, with no human scanning each item by hand. The vision was that physical objects could report their own location and status, feeding that data up into computer systems without anyone typing it in. To sell this idea to executives, he needed a title that would make supply-chain tagging sound as exciting as the technology dominating headlines at the time. So he linked his RFID proposal to the hottest topic of 1999 and called the presentation "Internet of Things." By his own account, years later in RFID Journal, the choice was deliberate. Tying tags and sensors to the red-hot word "internet" was the surest way to get senior people in the room to pay attention. The pitch worked well enough that the phrase stuck, and Ashton went on to help found the Auto-ID Center at MIT, a research group that did much of the early standards work that made networked RFID practical. Why the name was actually a good description It would be easy to dismiss the term as a marketing flourish, but it captured something real. Ashton's point
fluidwire
2026-06-25 05:16
👁 7
查看原文 →
Wired
The Best Roborock Deal This Prime Day (2026)
Shopping Roborock’s models can feel overwhelming. But there’s just one I recommend snagging during Prime Day.
Nena Farrell
2026-06-25 05:13
👁 7
查看原文 →
Dev.to
Building a Real-Time World Cup 2026 Bracket Predictor with Vanilla JS and GitHub Actions
Introduction With the World Cup 2026 group stage reaching its climax, football fans worldwide are speculating about who will make it to the finals. To make this experience interactive, I built a fully dynamic World Cup 2026 Bracket Simulator. Instead of just letting users click and choose winners, this app dynamically calculates ELO win probabilities and probabilistically generates realistic match scores (including extra time and penalties) based on team ratings. It also syncs with live match data in real-time. Live URL: https://worldcup-predict2026.github.io/champion/ Tech Stack: Vanilla JS, CSS3 (3D parallax), GitHub Actions, Python, football-data.org API Core Features & Technical Implementation ELO-Based Win Probability & Score Simulation Each team in the database is assigned an ELO-based strength rating. When a user runs the AI auto-prediction, the script calculates win probability and generates a realistic scoreline. Here is the goal roll algorithm (Poisson-like simulation) implemented in Vanilla JS: javascript function generateMatchScore(team1, team2, winner) { if (team1 === "TBD" || team2 === "TBD" || !winner) return null; const s1 = teamStrengths[team1] || 70; const s2 = teamStrengths[team2] || 70; const winnerIsTeam1 = (winner === team1); const strengthDiff = Math.abs(s1 - s2); const baseGoalExpected = 1.1; const bonusGoal = Math.min(1.8, strengthDiff / 12.0); // Goal weight based on ELO difference const rollGoals = (lambda) => { let L = Math.exp(-lambda); let k = 0; let p = 1.0; do { k++; p *= Math.random(); } while (p > L && k < 10); return k - 1; }; let gWin = 0; let gLose = 0; const r = Math.random(); if (r < 0.75) { // Regular time win (90 mins) gLose = rollGoals(baseGoalExpected); gWin = gLose + 1 + rollGoals(0.7 + bonusGoal); return winnerIsTeam1 ? ${gWin} - ${gLose} : ${gLose} - ${gWin} ; } else if (r < 0.92) { // Extra time win (AET) const normalGoals = rollGoals(baseGoalExpected); gLose = normalGoals; gWin = normalGoals + 1; return winnerIsTeam1 ?
Ryo Kurita
2026-06-25 05:06
👁 6
查看原文 →
Wired
A24 Knows You’re Mad About the Google AI Collab
Indie movie fans are upset about Google DeepMind’s $75 million investment in the studio, which comes as AI companies are deepening their influence in Hollywood.
John Semley
2026-06-25 05:05
👁 9
查看原文 →
Dev.to
How Be Recommended by Inithouse Scores AI Visibility 0 to 100 Across ChatGPT, Perplexity, Claude and Gemini
Your product might rank on page one of Google and still be invisible to AI. When someone asks ChatGPT "what's the best project management tool for small teams," does your product show up? For most SaaS companies under 50 employees, the answer is no. At Inithouse, we built Be Recommended to answer that question with a number: a single AI visibility score from 0 to 100 that tells you exactly where you stand across four major AI engines. Here is how the scoring works under the hood. What the score measures The Be Recommended score captures how often, how prominently, and how positively AI engines mention your product when users ask category-relevant questions. A score of 0 means no AI engine mentions you at all. A score of 100 means every tested prompt across all four engines names your product as a top recommendation. The four engines we test against: ChatGPT (OpenAI), Perplexity , Claude (Anthropic), and Gemini (Google). Step 1: Prompt generation We start by building a bank of 50+ real prompts that a potential customer would actually type into an AI assistant. These are not keyword-stuffed test queries. They mirror how real people ask for recommendations. For a CRM product, that looks like: "What CRM should a 10-person startup use?" "Best alternatives to Salesforce for small businesses" "Compare CRM tools with good API integration" "Which CRM has the best free tier in 2026?" We group prompts into three categories: direct (user names the product category), comparative (user asks for alternatives or comparisons), and situational (user describes a problem without naming a category). Each category tests a different signal: brand recognition, competitive positioning, and contextual relevance. Step 2: Multi-engine querying Each prompt gets sent to all four AI engines through their APIs. We capture the full response text, not just a yes/no for whether your product appeared. The raw responses go into a structured analysis pipeline. We run queries from neutral accounts with n
Jakub
2026-06-25 05:00
👁 8
查看原文 →
Dev.to
I Built a Messenger That Works Without the Internet — And It Changed How I Think About Privacy
A quiet experiment in Bluetooth, offline communication, and why we gave up too much when we handed our conversations to the cloud. The last time I was truly unreachable, I was in a place with no cell signal and no Wi-Fi. And I realized something strange: I had no way to send a message to the person sitting three feet away from me — because every app on my phone needed the internet to do it. That felt wrong. We've built the most sophisticated communication technology in human history, and somehow it all routes through a handful of servers in Northern Virginia before reaching someone in the same room. So I built Bluetoosh. The Premise: What If the Network Was Just… You and Me? Bluetoosh is a peer-to-peer messenger that runs entirely over Bluetooth. No internet. No servers. No accounts. No cloud storage. Just two devices, talking to each other the way devices were always capable of doing — directly. You open the app. You see who's nearby. You start a conversation. That's it. No phone number required. No email verification. No terms of service asking you to agree that your metadata might be used for advertising. The only network involved is the six feet of air between you and the other person. Why Bluetooth? Bluetooth is one of the most underrated communication protocols we carry around every day. Your phone already has it. Your laptop has it. Most people use it for headphones and nothing else. But Bluetooth is capable of much more. It can discover nearby devices, establish encrypted connections, and transfer data — all without touching the internet. The range is roughly 10–30 meters in open space. That covers a room, a floor, a campsite. Bluetoosh uses both BLE (Bluetooth Low Energy) and Classic Bluetooth, plus Google Nearby Connections for mesh-style discovery. In practice, this means you can find people around you, chat, share files, and even make voice calls — all completely offline. What It Actually Does Here's what surprised me most while building this: offline co
Farshid Mahmoudi
2026-06-25 04:59
👁 7
查看原文 →
Dev.to
How to Get Your First Tool Online
TL;DR - A finished app that only runs on one laptop is a private demo. Getting it online means connecting three things: a place to store the code (version control), a place to run it (a host), and an address people can type (a domain). The same AI tool that helped build the app can walk a beginner through all three, often without ever opening a terminal. An important step you don’t want to skip is the security check before going live, because the fastest way to ruin a launch is to ship with the database wide open. So you’ve done it. You built your first tool. And it works. The button does the thing. Now’s the moment. It’s time to get your tool online, but how? A project running on a laptop is real, but it lives in exactly one place, the machine it was built on. Nobody else can open it. Getting that project online is its own small skill, separate from building, and it trips up more beginners than the building did. A new coder can finish a working photo booth app in an afternoon and still have no idea how to hand it to a friend short of pulling up the GitHub link while sitting together over coffee. The good news is that the part that used to eat a whole weekend now takes a conversation. Three Things Every App Needs to Go Live Almost every deployment, whatever the tool, comes down to three things working together. Version control: This is a place to store the code and track every change made to it. For most people that means GitHub, which we’ve talked about before. The same way Google Docs keeps a version history, GitHub keeps one for a project. This piece does not re-explain it; the GitHub walkthrough covers the whole thing. A host: A host is really just a computer that stays powered on and connected to the internet with a public address of its own. When a visitor types in the app's address, their browser sends a request across the internet to that machine, the machine runs the code, and it sends the finished page back. A laptop was quietly doing both jobs during the
MLH Team
2026-06-25 04:58
👁 10
查看原文 →
The Verge AI
A new paper argues Microsoft exaggerated its quantum claims a year ago
A critique published in Nature Wednesday calls the basic technology behind Microsoft's "breakthrough" quantum computing chip the Majorana 1 into question. Microsoft unveiled the chip in February 2025 and said it featured a brand-new technology known as a topological qubit. Topological qubits, they said, would be the "building blocks" for their future quantum computer. Microsoft […]
Sophia Chen
2026-06-25 04:54
👁 7
查看原文 →
Ars Technica
Disney agreed to $50M settlement over claims it made live-TV streaming expensive
Lawsuit alleged Disney inflated market prices by making carriers include ESPN.
Scharon Harding
2026-06-25 04:22
👁 8
查看原文 →
Engadget
Jalapeño is the first AI chip from OpenAI and Broadcom
It's a spicy start for the AI company's collaboration with the chip maker.
staff@engadget.com (Anna Washenko)
2026-06-25 04:10
👁 4
查看原文 →
TechCrunch
Companies are scrambling to stop employees from maxing out AI budgets with small tasks
The tokenmaxxing era was brief. We now appear to be entering the era of token rationing.
Lucas Ropek
2026-06-25 04:09
👁 8
查看原文 →
Ars Technica
Experimental wine bottle tracks oxygen moving through the cork
The small bit of air in the bottle sees oxygen and other chemicals move in and out.
John Timmer
2026-06-25 04:04
👁 7
查看原文 →
Wired
Best Prime Day Deals I've Found on Window and Portable Air Conditioners (2026)
Window ACs and portable air conditioners are on great Prime Day deals. Get some, uh, cool prices.
Matthew Korfhage
2026-06-25 03:59
👁 4
查看原文 →
HackerNews
Anthropic says Alibaba illicitly extracted Claude AI model capabilities
htrp
2026-06-25 03:48
👁 3
查看原文 →
Ars Technica
FCC plans ID mandate that could block anonymous use of prepaid burner phones
Privacy advocates and domestic violence groups say ID mandate is a big mistake.
Jon Brodkin
2026-06-25 03:45
👁 7
查看原文 →
The Verge AI
Congresswoman denies staff used AI to write defense funding amendment
Rep. Anna Paulina Luna (R-FL) says her staff used AI for "spellcheck" in an amendment summary for a major defense bill, but denies it was used for the bill text itself and says "NO Legislation is ever drafted with AI." Luna issued the response after accounts on X began sharing screenshots of an amendment summary […]
Emma Roth
2026-06-25 03:36
👁 7
查看原文 →
HackerNews
An ECG biomarker for sudden cardiac death discovered with deep learning
brandonb
2026-06-25 03:21
👁 3
查看原文 →
HackerNews
Thomann takes legal action against Fender
Audiophilip
2026-06-25 03:08
👁 4
查看原文 →
Dev.to
You don't need NextJS: here's why
This is the public, sanitized version of an internal proposal I wrote to move our production app off Next.js. Next.js is the default answer to "I want to build a React app." It's a great framework. But default and necessary aren't the same word. The gap between them quietly cost us speed, debuggability, and a surprising amount of cross-team friction. We were building an authenticated, data-heavy product: dashboards, filters, charts. Almost every screen lived behind a login and updated in response to clicks. For that shape of app, server-side rendering wasn't buying us much, and it was charging us a lot. First, the only question that matters The right architecture depends on what you're building. Content-first: Marketing sites, blogs, storefronts, docs. Mostly public, SEO matters, lots of static content. SSR/SSG is a genuinely great fit. Use Next.js. Seriously. Application-first: Internal tools, dashboards, admin panels, SaaS consoles. Behind auth, highly interactive, bottlenecked by your API and DB — not by React rendering. Put an application-first product on a content-first framework and you pay for machinery you never use. That was us. What SSR actually cost us Production debugging got harder Server-rendered errors don't map cleanly to the components you wrote, so root-causing took longer every single time. Client-side, the error happens in the browser with a stack trace that points at your component. Boring and fast to fix. Server components fought our tests You can't cleanly unit test a server component that renders other server components. Tools like React Testing Library expect renderable elements, not the serialized output a server component produces. We ended up making design choices purely to stay testable. Tail wagging the dog. Authentication became a distributed-systems problem This was a big one. If you gate protected pages on the server, the server must read and validate the token on every request, then propagate auth state through hydration. That singl
Antonio Moruno Gracia
2026-06-25 02:47
👁 9
查看原文 →