Urgent.News

the world's headlines, one feed

Editions

Tech

I bootstrapped an API business on a single RTX 3060, from literally zero budget

Two weeks ago I had zero dollars, one gaming PC with an RTX 3060 Ti, and a stubborn idea: what if the cost of running a small, useful LLM-backed API could be close to zero, if you just... hosted the model yourself? Here's what I shipped, and the specific things that broke along the way — because the failures were more instructive than the plan. The idea A small API that turns plain English into…

Two weeks ago, the author had no money, just a gaming PC with an RTX 3060 Ti graphics card and a bold idea: could running a small, useful LLM-backed API be nearly free if the model was hosted locally? Here's what the project entailed and the issues encountered along the way.

The concept was simple: an API that converts plain English into functional code snippets, such as matching a Brazilian CEP to a regex, retrieving the top 10 customers from a transaction, generating a commit message for a code diff, or creating a JSON schema for an e-commerce product. The goal wasn't to create something groundbreaking, but to validate the economics of running the model oneself.

To achieve this, the author utilized Ollama running the Qwen2.5-coder:7b model locally on the Windows machine, which had sufficient VRAM for the task. FastAPI served as the wrapper, with a JSON-only system prompt and a forgiving parser to handle instances where the model didn't strictly adhere to returning JSON. Cloudflare Tunnel provided a free, quick tunneling service, eliminating the need for port forwarding or a static IP address.

RapidAPI handled the billing and marketplace aspects, offering a free tier as well as a paid option.

However, the project faced several challenges. Windows process persistence is not as straightforward as one might think. Any process launched directly from an SSH session, even with backgrounding, would terminate once the session closed because Windows ties it to a Job Object specific to that session. The solution was to wrap the command in a .bat file, register it as a Scheduled Task to run immediately upon login, and trigger it again using schtasks /run. This ensured the process survived disconnections.

Another issue arose with free static domains. While ngrok's free static domain provided a stable URL for browsing, it presented a mandatory interstitial warning page to any request that didn't include a specific header. This prevented the API from functioning correctly when called by external services. The author discovered this by testing the raw endpoint externally before trusting the implementation.

Furthermore, LLMs often fail to return valid JSON, even when explicitly instructed to do so. The workaround was a tolerant extractor that attempted JSON parsing on the raw text, then scanned for fenced code blocks, and finally resorted to a brace-matching regex if necessary. This approach transformed the model's occasional markdown-wrapped JSON output from a 502 error response into a seamless experience.

To encourage users to try the demo without a signup process, the author implemented a simple per-IP daily counter, limiting the landing page to five free attempts per day. This approach proved more effective at converting visitors into subscribers than a paywall.

In terms of economics, RapidAPI charges 25% of marketplace revenue, plus a small processing fee. This means that a $9.99/month plan would actually net the author closer to $7 rather than the expected $10. With the backend complete, the next challenge is distribution. The author is eager to hear from others who are building similar projects, whether in dev tools, LLM-backed APIs, or exploring the economics of self-hosted models.

The API listing can be found at [https://rapidapi.com/JoaoPauloNA/api/plain-english-to-code-api](https://rapidapi.com/JoaoPauloNA/api/plain-english-to-code-api), with a free tier available for testing.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech

Third macOS Golden Gate Public Beta Now Available

Third macOS Golden Gate Public Beta Now Available

Apple today released the third public beta of macOS Golden Gate , allowing non-developers to test the software ahead of its fall release. You can sign up to test the update on Apple's beta website , and then download it by going to System Settings > General > Software Update and toggling on the macOS 27 beta.