<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LaoWuuu</title>
    <description>The latest articles on DEV Community by LaoWuuu (@laowuuu_dev).</description>
    <link>https://dev.to/laowuuu_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3953156%2F22d61904-158b-4bf0-8e98-8c6910e58cea.png</url>
      <title>DEV Community: LaoWuuu</title>
      <link>https://dev.to/laowuuu_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laowuuu_dev"/>
    <language>en</language>
    <item>
      <title>401 Unauthorized: The API Error That's Easier to Fix Than You Think</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Sat, 20 Jun 2026 05:33:59 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/401-unauthorized-the-api-error-thats-easier-to-fix-than-you-think-3o4h</link>
      <guid>https://dev.to/laowuuu_dev/401-unauthorized-the-api-error-thats-easier-to-fix-than-you-think-3o4h</guid>
      <description>&lt;p&gt;If you've ever stared at a 401 error wondering what went wrong, you're not alone. It's one of the most common API errors, and unlike 429 rate limits (which I covered last time), 401 is almost always your fault. That's actually good news because it means you can fix it.&lt;/p&gt;

&lt;p&gt;A 401 error means the server doesn't recognize your credentials. It's not saying "go away" like a 403 Forbidden. It's saying "I don't know who you are." The difference matters. With 403, you're authenticated but not authorized. With 401, you're not authenticated at all.&lt;/p&gt;

&lt;p&gt;The most common cause is a typo in your API key. I've seen developers spend hours debugging their code only to find a trailing space in their key. Copy-paste is your enemy here. Some terminals add invisible characters when you copy. Always trim your keys and check for whitespace.&lt;/p&gt;

&lt;p&gt;Another frequent culprit is expired keys. Most providers don't send you a friendly reminder when your key expires. They just start returning 401. If your code worked yesterday and fails today, check the key's expiration date first.&lt;/p&gt;

&lt;p&gt;Environment variables are another trap. You set up your key in .env, restart your terminal, and forget that the old session is still running with the old environment. This is especially common in Docker containers where environment variables are baked in at build time.&lt;/p&gt;

&lt;p&gt;The sneakiest 401 error comes from incorrect headers. Some APIs expect "Authorization: Bearer sk-..." while others want just "Authorization: sk-..." or even a custom header like "X-API-Key". Read the documentation carefully. I once spent two hours debugging a 401 only to discover I was using the wrong header format for that particular provider.&lt;/p&gt;

&lt;p&gt;If you're using a gateway or proxy, the 401 might not be from the final API but from the gateway itself. Check both layers. The gateway might have its own authentication that's separate from the upstream API.&lt;/p&gt;

&lt;p&gt;Here's my debugging checklist when I hit a 401: First, print the exact key being sent (redacted, of course). Second, verify the key hasn't expired. Third, check the header format. Fourth, test the key directly with curl outside your code. Fifth, check if you're behind a proxy that's stripping or modifying headers.&lt;/p&gt;

&lt;p&gt;The fix is usually simple once you find the cause. Regenerate the key if it's expired. Trim whitespace. Use the correct header format. Update your environment variables. The hard part is finding which of these it is.&lt;/p&gt;

&lt;p&gt;Unlike 429 errors where you need to implement backoff and rate limiting, 401 errors are binary. Either your credentials work or they don't. There's no retry strategy that will fix a 401. You need to fix the credentials themselves.&lt;/p&gt;

</description>
      <category>api</category>
      <category>debugging</category>
      <category>webdev</category>
    </item>
    <item>
      <title>429 rate limit errors: why they happen and what to do about them</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Sun, 14 Jun 2026 15:58:58 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/429-rate-limit-errors-why-they-happen-and-what-to-do-about-them-p72</link>
      <guid>https://dev.to/laowuuu_dev/429-rate-limit-errors-why-they-happen-and-what-to-do-about-them-p72</guid>
      <description>&lt;p&gt;You're running a batch job, hitting the API in a loop, and suddenly everything stops. No error message in your app, just silence. Or maybe you see a 429 status code and have no idea what it means or how long to wait.&lt;/p&gt;

&lt;p&gt;429 means "Too Many Requests." The server is telling you to slow down. Every API provider has rate limits — OpenAI, Anthropic, DeepSeek, all of them. The limits vary by plan, by model, and sometimes by time of day when the service is under heavy load.&lt;/p&gt;

&lt;p&gt;There are two types of limits most providers enforce. Requests per minute (RPM) controls how many API calls you can make in a 60-second window. Tokens per minute (TPM) controls how much text you can process in that same window. You might hit either one depending on your usage pattern. A loop that sends 100 small requests fast will hit RPM. A single request with a huge prompt might hit TPM.&lt;/p&gt;

&lt;p&gt;When you get a 429, the response usually includes a Retry-After header. This tells you how many seconds to wait before trying again. If the header isn't there, a safe default is to wait 60 seconds. Don't immediately retry — that makes the problem worse. The server already told you to back off, and hammering it again just extends your penalty.&lt;/p&gt;

&lt;p&gt;If you're building an application that calls the API, implement retry logic with exponential backoff. Wait 1 second, then 2, then 4, then 8. Most HTTP libraries have this built in or as a plugin. Don't just wrap the call in a while loop with no delay — that's how you turn a temporary rate limit into a permanent ban.&lt;/p&gt;

&lt;p&gt;For teams or projects that need higher limits, there are a few options. Upgrade your plan — most providers offer higher tiers with more generous limits. Spread requests across multiple keys if the provider allows it. Use a gateway that can distribute load across multiple upstream keys automatically.&lt;/p&gt;

&lt;p&gt;One thing that trips people up: rate limits are usually per-key, not per-account. If you have 3 keys on the same account, each one has its own limit. But some providers also have account-level limits that are lower than the sum of your individual keys. Check the docs.&lt;/p&gt;

&lt;p&gt;Another gotcha: some providers count failed requests against your rate limit. If your request is malformed and returns a 400, that still counts as a request. Fix your request format before retrying, or you'll burn through your limit on errors.&lt;/p&gt;

&lt;p&gt;If you're hitting rate limits consistently, it's worth checking if your usage pattern can be optimized. Batch multiple messages into one request instead of sending them individually. Use streaming to get partial results faster instead of waiting for the full response. Cache results where possible — if you're asking the same question multiple times, store the answer.&lt;/p&gt;

&lt;p&gt;Rate limits are annoying but they exist for a reason. Without them, a single bad actor could monopolize the service and everyone else suffers. The key is building your application to handle them gracefully instead of treating them as unexpected errors.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Your API key might already be leaked. Here's how to check.</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Sat, 13 Jun 2026 15:59:14 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/your-api-key-might-already-be-leaked-heres-how-to-check-3f61</link>
      <guid>https://dev.to/laowuuu_dev/your-api-key-might-already-be-leaked-heres-how-to-check-3f61</guid>
      <description>&lt;p&gt;Most developers don't think about API key security until something goes wrong. A surprise bill, a rate limit you didn't trigger, or worse — someone using your key to run inference on models you never touched.&lt;/p&gt;

&lt;p&gt;Here's the uncomfortable truth: if you've ever committed a .env file to a public repo, pasted a key in a Slack channel, or shared it in a support ticket, your key is probably out there. GitHub scans for secrets, but it doesn't catch everything. And once a key is in a public commit history, even if you delete the repo, it's already been scraped.&lt;/p&gt;

&lt;p&gt;The first thing to do is check if your key has been exposed. Search your GitHub repos for your key prefix. Most API providers use a prefix that identifies the service — OpenAI keys start with "sk-", Anthropic with "sk-ant-", DeepSeek with "sk-". Run a search across all your repos, including forks and gists.&lt;/p&gt;

&lt;p&gt;If you find a match, rotate the key immediately. Don't just delete the file — the commit history still has it. Generate a new key and delete the old one from the provider's dashboard.&lt;/p&gt;

&lt;p&gt;Beyond checking for leaks, here are some habits that help. Never hardcode keys in source code. Use environment variables or a secrets manager. If you're in a team, use a shared vault instead of passing keys around in chat. Set spending limits on your API accounts so a leaked key can't rack up a huge bill before you notice.&lt;/p&gt;

&lt;p&gt;For teams managing multiple keys across multiple models, a gateway adds another layer of control. Instead of distributing individual provider keys to every developer, you give them one gateway key. If someone leaves the team or a key gets compromised, you only need to rotate one key instead of tracking down every place a provider key was used.&lt;/p&gt;

&lt;p&gt;The worst feeling is finding out your key was leaked because of an unexpected bill. Check your repos today — takes five minutes and could save you a lot of trouble.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Stop Sharing One API Key Across All Your AI Tools</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Wed, 10 Jun 2026 15:37:11 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/stop-sharing-one-api-key-across-all-your-ai-tools-4klc</link>
      <guid>https://dev.to/laowuuu_dev/stop-sharing-one-api-key-across-all-your-ai-tools-4klc</guid>
      <description>&lt;p&gt;A mistake I keep seeing with AI tools is simple:&lt;/p&gt;

&lt;p&gt;One developer creates one API key, then uses it everywhere.&lt;/p&gt;

&lt;p&gt;Cursor.&lt;/p&gt;

&lt;p&gt;Open WebUI.&lt;/p&gt;

&lt;p&gt;Cherry Studio.&lt;/p&gt;

&lt;p&gt;A local script.&lt;/p&gt;

&lt;p&gt;A prototype SaaS app.&lt;/p&gt;

&lt;p&gt;Maybe even a teammate's machine.&lt;/p&gt;

&lt;p&gt;At first, this feels convenient. One key, one balance, one endpoint. Done.&lt;/p&gt;

&lt;p&gt;But once usage grows, this becomes one of the fastest ways to lose control of your AI costs.&lt;/p&gt;

&lt;p&gt;One Key Means No Visibility&lt;br&gt;
If everything uses the same key, your logs become noisy.&lt;/p&gt;

&lt;p&gt;You may know that your balance dropped, but you do not know why.&lt;/p&gt;

&lt;p&gt;Was it Cursor doing long codebase edits?&lt;/p&gt;

&lt;p&gt;Was it Open WebUI running long conversations?&lt;/p&gt;

&lt;p&gt;Was it a test script stuck in a loop?&lt;/p&gt;

&lt;p&gt;Was it a teammate experimenting with a larger model?&lt;/p&gt;

&lt;p&gt;Was the key leaked somewhere?&lt;/p&gt;

&lt;p&gt;With one shared key, all of these look like the same user.&lt;/p&gt;

&lt;p&gt;That is fine for a five-minute test. It is terrible for anything you plan to keep using.&lt;/p&gt;

&lt;p&gt;Cost Control Starts With Separation&lt;br&gt;
The simplest rule is:&lt;/p&gt;

&lt;p&gt;Create one API key per tool or project.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;cursor-dev&lt;br&gt;
open-webui-team&lt;br&gt;
cherry-studio-personal&lt;br&gt;
backend-staging&lt;br&gt;
backend-production&lt;br&gt;
Then set a limit for each key.&lt;/p&gt;

&lt;p&gt;Cursor should not be able to burn the same balance as your production backend.&lt;/p&gt;

&lt;p&gt;A local experiment should not share the same key as your customer-facing app.&lt;/p&gt;

&lt;p&gt;A teammate's client should not be able to affect your main service.&lt;/p&gt;

&lt;p&gt;This is not overengineering. It is basic cost isolation.&lt;/p&gt;

&lt;p&gt;The Real Problem Is Not The Model&lt;br&gt;
When developers talk about AI API cost, they often focus on model pricing.&lt;/p&gt;

&lt;p&gt;That matters, but it is only part of the story.&lt;/p&gt;

&lt;p&gt;Your bill is also affected by:&lt;/p&gt;

&lt;p&gt;long context windows&lt;br&gt;
repeated retries&lt;br&gt;
verbose outputs&lt;br&gt;
background agents&lt;br&gt;
accidental loops&lt;br&gt;
expensive models used for simple tasks&lt;br&gt;
multiple tools sharing the same key&lt;br&gt;
no daily or monthly spending limit&lt;br&gt;
A cheap model can still become expensive if a tool sends too much context too often.&lt;/p&gt;

&lt;p&gt;A powerful model can be reasonable if you only use it for the right tasks.&lt;/p&gt;

&lt;p&gt;The key is not "always use the cheapest model."&lt;/p&gt;

&lt;p&gt;The key is "know which tool is spending what."&lt;/p&gt;

&lt;p&gt;Debugging Also Gets Easier&lt;br&gt;
Separate keys are useful even when money is not the issue.&lt;/p&gt;

&lt;p&gt;If a request fails with 401, 404, 429, or timeout errors, you can narrow the problem faster.&lt;/p&gt;

&lt;p&gt;With separate keys, you can ask:&lt;/p&gt;

&lt;p&gt;Is this only happening in Cursor?&lt;br&gt;
Is Open WebUI using the wrong model name?&lt;br&gt;
Did this specific key hit a quota limit?&lt;br&gt;
Is one tool sending requests too frequently?&lt;br&gt;
Did I accidentally disable the wrong key?&lt;br&gt;
Is production healthy while staging is failing?&lt;br&gt;
Without separation, you are guessing.&lt;/p&gt;

&lt;p&gt;Key Leaks Become Less Dangerous&lt;br&gt;
API keys leak more often than people admit.&lt;/p&gt;

&lt;p&gt;They end up in:&lt;/p&gt;

&lt;p&gt;frontend code&lt;br&gt;
GitHub commits&lt;br&gt;
screenshots&lt;br&gt;
shared config files&lt;br&gt;
browser extensions&lt;br&gt;
team chats&lt;br&gt;
old local projects&lt;br&gt;
If one shared key leaks, everything is exposed.&lt;/p&gt;

&lt;p&gt;If a limited tool-specific key leaks, you can disable it quickly and limit the damage.&lt;/p&gt;

&lt;p&gt;That is why I prefer API keys with:&lt;/p&gt;

&lt;p&gt;clear names&lt;br&gt;
spending limits&lt;br&gt;
usage logs&lt;br&gt;
expiration dates when possible&lt;br&gt;
separate keys for each environment&lt;br&gt;
separate keys for each client or tool&lt;br&gt;
A Practical Setup&lt;br&gt;
For small teams or solo developers, I would start with this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One key per AI client&lt;/li&gt;
&lt;li&gt;One key per backend environment&lt;/li&gt;
&lt;li&gt;Low limits for experiments&lt;/li&gt;
&lt;li&gt;Higher limits only for production&lt;/li&gt;
&lt;li&gt;Check logs before increasing limits&lt;/li&gt;
&lt;li&gt;Disable unused keys
If you are using an OpenAI-compatible gateway, make this your default workflow.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A custom endpoint might look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://your-domain/v1" rel="noopener noreferrer"&gt;https://your-domain/v1&lt;/a&gt;&lt;br&gt;
For my own testing, I use AI OpenCloud as an OpenAI-compatible multi-model gateway:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aiopencloud.xyz/v1" rel="noopener noreferrer"&gt;https://aiopencloud.xyz/v1&lt;/a&gt;&lt;br&gt;
The important part is not the endpoint itself.&lt;br&gt;
The important part is having key-level visibility and limits.&lt;br&gt;
Final Thought&lt;br&gt;
AI tools are becoming more powerful, but also easier to overuse.&lt;/p&gt;

&lt;p&gt;A year ago, the main question was:&lt;/p&gt;

&lt;p&gt;"Which model should I use?"&lt;/p&gt;

&lt;p&gt;Now the better question is:&lt;/p&gt;

&lt;p&gt;"Which tool is spending money, and can I stop it quickly if something goes wrong?"&lt;/p&gt;

&lt;p&gt;If you cannot answer that, your API key setup is too loose.&lt;br&gt;
Start by splitting your keys.&lt;br&gt;
It is one of the simplest changes you can make, and it pays off the first time something misbehaves.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>api</category>
    </item>
    <item>
      <title>What I see running an AI API gateway (and why the rsync/Claude debate misses the point)</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Tue, 09 Jun 2026 14:58:40 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/what-i-see-running-an-ai-api-gateway-and-why-the-rsyncclaude-debate-misses-the-point-2cp3</link>
      <guid>https://dev.to/laowuuu_dev/what-i-see-running-an-ai-api-gateway-and-why-the-rsyncclaude-debate-misses-the-point-2cp3</guid>
      <description>&lt;p&gt;There's a post on HN right now asking whether Claude introduced bugs into rsync. 475 comments, mostly arguing about whether AI code is trustworthy. It got me thinking about what I see from the other side of the API gateway.&lt;/p&gt;

&lt;p&gt;My last post was about troubleshooting model-list-works-but-chat-fails. That's the infrastructure side. Today I want to talk about what people are actually sending through.&lt;/p&gt;

&lt;p&gt;I run AIOpenCloud, a small API gateway. Not huge traffic, but enough to see patterns.&lt;/p&gt;

&lt;p&gt;About 60% of requests are coding-related. The rest is writing, analysis, random stuff. But the interesting part isn't the volume. It's how differently people use the same models.&lt;/p&gt;

&lt;p&gt;Some users have built entire review workflows around their AI coding setup. They'll send a prompt, get the response, then immediately send a second request that says "review the above code for bugs." Two API calls per task. Their code probably has fewer bugs than most human-written code, because they've automated the paranoia.&lt;/p&gt;

&lt;p&gt;Other users paste directly. No review, no second pass. Copy, paste, ship. I know this because I can see the request patterns. One request, long pause, done.&lt;/p&gt;

&lt;p&gt;The rsync analysis everyone's debating on HN is interesting, but it's looking at one specific case: AI contributing to a 20-year-old C codebase with strict correctness requirements. That's the hardest possible scenario. Most people aren't writing rsync. They're writing a script to parse CSV files, or a CRUD endpoint, or a test suite.&lt;/p&gt;

&lt;p&gt;For those tasks, AI code with human review beats human code with no review. And that's what I see in the usage data. The users who spend more (meaning they're using it heavily) tend to have review patterns built in. The drop-in-and-out users don't.&lt;/p&gt;

&lt;p&gt;I'm not saying AI code is safe. I'm saying the risk is mostly in the workflow, not the model. The rsync case is a cautionary tale about dropping AI suggestions into code you don't fully understand. But for most developers writing most code, the question isn't "is AI code perfect." It's "is my review process good enough."&lt;/p&gt;

&lt;p&gt;The models keep getting better. The review habits don't automatically improve with them.&lt;/p&gt;




&lt;p&gt;Last post: &lt;a href="https://dev.to/laowuuu_dev/api-gateway-troubleshooting-model-list-works-but-chat-requests-fail-4fil"&gt;troubleshooting why chat requests fail when model lists work&lt;/a&gt;. Next up: what actually happens when you switch models mid-conversation (hint: it's messier than you'd think).&lt;/p&gt;

&lt;p&gt;What's your review process for AI-generated code? Do you do a second pass, or trust and ship?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Running your own AI gateway? &lt;a href="https://aiopencloud.xyz?utm_source=devto" rel="noopener noreferrer"&gt;Try AIOpenCloud&lt;/a&gt; — $8.88 free, no credit card.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>API gateway troubleshooting: model list works but chat requests fail</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Mon, 08 Jun 2026 16:09:11 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/api-gateway-troubleshooting-model-list-works-but-chat-requests-fail-4fil</link>
      <guid>https://dev.to/laowuuu_dev/api-gateway-troubleshooting-model-list-works-but-chat-requests-fail-4fil</guid>
      <description>&lt;p&gt;Got a weird one that keeps coming up. You set up your API client — Cursor, Open WebUI, Cherry Studio, whatever — point it at your gateway, hit test connection, and it passes. Model list loads fine. Then you actually try to chat and... timeout. Or 400. Or just silence.&lt;/p&gt;

&lt;p&gt;The model list working means the URL and key are correct. So what breaks between "can list models" and "can actually generate text"?&lt;/p&gt;

&lt;p&gt;Here are the five things I keep seeing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model name mismatch.&lt;/strong&gt; The /models endpoint returns what the gateway registered, which might not match what the upstream actually expects. Your gateway calls it "gpt4", upstream wants "gpt-4o". Request goes through, upstream says "I don't know this model", you get a 400 or 404. Quick test: curl the chat endpoint directly with the exact model name you're using. If it fails, check what the upstream actually expects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Streaming breaks things.&lt;/strong&gt; Most clients default to stream:true. Some gateways handle streaming poorly — buffers don't flush, SSE format gets mangled, chunks arrive incomplete. The client chokes and either hangs or drops the connection. Test: turn off streaming in the client settings. If it suddenly works, that's your problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timeout too short.&lt;/strong&gt; LLM inference takes time. Long prompts, large models, high server load — all push response times up. If your client or gateway times out at 10 seconds, longer requests will fail even though the server is still working on them. The tell: requests fail at a consistent time boundary (10s, 30s, 60s). Fix: find the timeout setting and bump it to 60s or more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request body incompatibility.&lt;/strong&gt; OpenAI's API format is the de facto standard, but details vary. tool_choice, response_format, function calling — some upstreams don't support all fields. Your client auto-includes these params, upstream rejects the whole request with a 400. Debug: grab the actual JSON your client sends and strip fields one by one until it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limiting hidden from the UI.&lt;/strong&gt; 429 errors sometimes get swallowed by the client. No error shown, just empty responses or infinite retries. Shared keys, free tier accounts, and low-tier API plans hit concurrency limits fast. Check: curl the same request manually and look at the HTTP status code. If it's 429, check the Retry-After header.&lt;/p&gt;

&lt;p&gt;The universal debugging step: bypass the client and curl the upstream directly. If curl works, the problem is in your client or gateway config. If curl fails, it's upstream or the key itself. This step is non-negotiable — saves hours of guessing.&lt;/p&gt;

&lt;p&gt;What other weird failures have you hit with API gateways? Curious what edge cases people have run into.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>"Fine-tuning an LLM to write docs" made me realize why I need a gateway</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Fri, 05 Jun 2026 14:33:44 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/fine-tuning-an-llm-to-write-docs-made-me-realize-why-i-need-a-gateway-3p61</link>
      <guid>https://dev.to/laowuuu_dev/fine-tuning-an-llm-to-write-docs-made-me-realize-why-i-need-a-gateway-3p61</guid>
      <description>&lt;p&gt;Saw a post on HN today about fine-tuning an LLM to write documentation like it's 1995. The idea is neat — train a model on your old docs, get new ones in the same style. But it got me thinking about the infrastructure side of things.&lt;/p&gt;

&lt;p&gt;If you're fine-tuning, you're probably touching at least three different APIs. OpenAI for GPT-4 base, maybe Claude for comparison runs, DeepSeek for the cheap bulk processing. Each one has its own billing cycle, its own key management, its own rate limits.&lt;/p&gt;

&lt;p&gt;I used to keep a spreadsheet. Seriously. Five API keys, five dashboards, five invoices at the end of the month. The worst part wasn't even the money — it was the context switching. You're in the middle of debugging a prompt, and suddenly you hit a rate limit on one provider. Now you're scrambling to switch keys mid-thought.&lt;/p&gt;

&lt;p&gt;That's what pushed me to build AIOpenCloud. One key, one bill, models behind it just work. DeepSeek v4 for the heavy lifting, GPT-4 when I need it, Claude for the nuanced stuff. The routing happens at the gateway level — I don't think about it anymore.&lt;/p&gt;

&lt;p&gt;The fine-tuning post also reminded me: when you're experimenting with multiple models, the cost adds up fast. Having a single gateway with transparent pricing means I can actually track what's happening. No surprise bills on the 1st.&lt;/p&gt;

&lt;p&gt;If you're running multi-model workflows, how do you manage the keys? Still got that spreadsheet?&lt;/p&gt;

&lt;p&gt;→ aiopencloud.xyz&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5-minute setup</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Wed, 03 Jun 2026 10:02:26 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/5-minute-setup-1601</link>
      <guid>https://dev.to/laowuuu_dev/5-minute-setup-1601</guid>
      <description>&lt;p&gt;Wrote about why I picked New API — got asked "ok but how do I actually use it?" Fair. Here's the 5-min setup. One key, all models.&lt;/p&gt;

&lt;p&gt;→ aiopencloud.xyz?utm_source=devto&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5 minutes to your first API call with AIOpenCloud</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Wed, 03 Jun 2026 10:02:03 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/5-minutes-to-your-first-api-call-with-aiopencloud-1hpe</link>
      <guid>https://dev.to/laowuuu_dev/5-minutes-to-your-first-api-call-with-aiopencloud-1hpe</guid>
      <description>&lt;p&gt;A couple weeks ago I wrote about why I chose New API as my gateway backend. Since then the most common question has been: "ok, how do I actually use it?" So here's the 5-minute setup.&lt;/p&gt;

&lt;p&gt;If you're managing multiple API keys for different AI models, you know the pain. One key for OpenAI, another for Claude, a third for DeepSeek. Different billing dashboards, different SDKs, different endpoints.&lt;/p&gt;

&lt;p&gt;AIOpenCloud wraps them all behind one endpoint. Here's how to start using it in 5 minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Get your key&lt;/strong&gt;&lt;br&gt;
Sign up at aiopencloud.xyz. You get $8.88 free credit — no credit card needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Install the client (optional)&lt;/strong&gt;&lt;br&gt;
You don't actually need a client. Any OpenAI-compatible SDK works. But for a quick test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;openai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Make your first call&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://aiopencloud.xyz/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-key-here&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deepseek-v4-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, what models do you support?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. One endpoint. One key. All models.&lt;/p&gt;

&lt;p&gt;What you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DeepSeek, GPT, Claude, Gemini, Qwen — all through the same API&lt;/li&gt;
&lt;li&gt;One dashboard for usage and billing&lt;/li&gt;
&lt;li&gt;No lock-in — your key works with any OpenAI SDK&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input (per 1M tokens)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4 Flash&lt;/td&gt;
&lt;td&gt;$0.16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5&lt;/td&gt;
&lt;td&gt;$6.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 4&lt;/td&gt;
&lt;td&gt;$3.60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Flash&lt;/td&gt;
&lt;td&gt;$0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Full pricing comparison coming soon at aiopencloud.xyz/pricing-vs&lt;/p&gt;

&lt;p&gt;What's your setup for managing multiple AI models? Still juggling separate keys, or found a workflow that works? I'd love to hear what others are doing — drop a comment.&lt;/p&gt;

&lt;p&gt;Next up: a breakdown of what models people actually use vs what they think they need. Follow if you want the real numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aiopencloud.xyz?utm_source=devto" rel="noopener noreferrer"&gt;https://aiopencloud.xyz?utm_source=devto&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>api</category>
      <category>ai</category>
    </item>
    <item>
      <title>one week</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Tue, 02 Jun 2026 10:28:12 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/one-week-1hj3</link>
      <guid>https://dev.to/laowuuu_dev/one-week-1hj3</guid>
      <description>&lt;p&gt;Everyone's split on whether the stockmarket can swallow Anthropic and OpenAI. Meanwhile I'm running a one-man AI gateway. 12 users, a Cloudflare-happy monitoring alarm, and zero revenue. People are using it though. That counts.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>One week of running my own AI gateway</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Tue, 02 Jun 2026 10:27:49 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/one-week-of-running-my-own-ai-gateway-1n9k</link>
      <guid>https://dev.to/laowuuu_dev/one-week-of-running-my-own-ai-gateway-1n9k</guid>
      <description>&lt;p&gt;There's a thread on HN today asking whether the stockmarket can swallow Anthropic, SpaceX, and OpenAI. Big money circling big names. Meanwhile I hit one week running a side-project AI gateway, and the contrast is something.&lt;/p&gt;

&lt;p&gt;The first 48 hours were silent. I kept refreshing the dashboard. Nobody. Around 3am on day two a user registered and immediately tested Claude. Complained about latency. I switched upstreams and it worked. That was when it started to feel real.&lt;/p&gt;

&lt;p&gt;My monitoring setup was the biggest headache. Fired 17 times in one night. Every alert was a Cloudflare hiccup, not an actual outage. Took a few rounds of retries and a cooldown before I could trust it.&lt;/p&gt;

&lt;p&gt;Seven days in, twelve users. DeepSeek is the most requested model by miles. Nobody asked for GPT-4. Enough to rethink the whole model lineup.&lt;/p&gt;

&lt;p&gt;Zero revenue. Working software that people chose. I'll take that for week one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aiopencloud.xyz?utm_source=devto" rel="noopener noreferrer"&gt;https://aiopencloud.xyz?utm_source=devto&lt;/a&gt;&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>devops</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Why I chose New API over the alternatives for my AI gateway</title>
      <dc:creator>LaoWuuu</dc:creator>
      <pubDate>Sun, 31 May 2026 10:05:05 +0000</pubDate>
      <link>https://dev.to/laowuuu_dev/why-i-chose-new-api-over-the-alternatives-for-my-ai-gateway-2o3n</link>
      <guid>https://dev.to/laowuuu_dev/why-i-chose-new-api-over-the-alternatives-for-my-ai-gateway-2o3n</guid>
      <description>&lt;p&gt;A couple weeks ago I wrote about building a unified API gateway and the monitoring headaches that followed. Some people asked why I picked New API as the backend in the first place.&lt;/p&gt;

&lt;p&gt;The requirements were straightforward: support multiple upstream providers, manage API keys, track usage, and not break the bank.&lt;/p&gt;

&lt;p&gt;I tried a custom proxy first. It worked but every time I needed rate limiting, user management, or logging, I had to build it from scratch. That got old fast.&lt;/p&gt;

&lt;p&gt;Then I found New API. It's open source and does most of what I needed out of the box: multi-model routing, key management, usage tracking, and a dashboard. Setup took about a weekend. Been running it for a month and it's held up fine.&lt;/p&gt;

&lt;p&gt;The main tradeoff is you're tied to its data model and API conventions. But for a small operation like mine, that's worth it. I'd rather spend time on the service than reinventing user management.&lt;/p&gt;

&lt;p&gt;Next up: how I handle pricing and free tiers without losing money.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
