<?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: Fernando Flores</title>
    <description>The latest articles on DEV Community by Fernando Flores (@selver).</description>
    <link>https://dev.to/selver</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3703385%2Fe367736f-d663-4432-a3ae-dae85d6daab5.jpeg</url>
      <title>DEV Community: Fernando Flores</title>
      <link>https://dev.to/selver</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/selver"/>
    <language>en</language>
    <item>
      <title>Using leaked OpenAI API keys: it seemed like a good idea… until it wasn’t</title>
      <dc:creator>Fernando Flores</dc:creator>
      <pubDate>Fri, 16 Jan 2026 05:21:50 +0000</pubDate>
      <link>https://dev.to/selver/using-leaked-openai-api-keys-it-seemed-like-a-good-idea-until-it-wasnt-3537</link>
      <guid>https://dev.to/selver/using-leaked-openai-api-keys-it-seemed-like-a-good-idea-until-it-wasnt-3537</guid>
      <description>&lt;p&gt;I had one week to deliver a project: a voice-based virtual assistant for desktop with artificial intelligence.&lt;/p&gt;

&lt;p&gt;Tigh deadine, high expectations, and important detail: &lt;strong&gt;zero budget&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Building an AI from scratch in a week wasn't realistic, so I took the obvious route: using the OpenAI API. It worked greate... until I checked the pricing. For a school project, paying didn't sound very appealing.&lt;/p&gt;

&lt;p&gt;So I did what many students under pressure would do: I started looking for alternatives.&lt;/p&gt;

&lt;h3&gt;
  
  
  The "creative" solution I found on Github
&lt;/h3&gt;

&lt;p&gt;While digging through Github, I came across a repository called "&lt;strong&gt;ChatGPT-API-Scanner&lt;/strong&gt;". really liked the name, i found my solution...&lt;/p&gt;

&lt;p&gt;The repository contained a Python script that performs web scraping across GitHub, specifically scanning &lt;code&gt;.env&lt;/code&gt; files to find publicly exposed API kets. In other words, it looks for repositories where someone accidentally committed their key.&lt;/p&gt;

&lt;p&gt;It sounds bad. Technically, it is, but that's where the uncomfortable question show up: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If someone expose their API key publicly, is using it still stealing?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm not justifying it, but when you're on a deadline, the line doesn't feel as clear as it should.&lt;/p&gt;

&lt;h3&gt;
  
  
  The reality behind "free" API keys
&lt;/h3&gt;

&lt;p&gt;Running the script isn't fast. Each execution takes around &lt;strong&gt;1 to 2hrs&lt;/strong&gt;. On average, it finds about 10 API keys, but only around 4% of them actually work.&lt;/p&gt;

&lt;p&gt;In plain terms, each run gives you 0.4 usable keys.&lt;/p&gt;

&lt;p&gt;On paper, it sounds acceptable. After a few runs, something should work. And yes... sometimes it does.&lt;/p&gt;

&lt;p&gt;The first key I found worked for &lt;strong&gt;five days&lt;/strong&gt;. The project was going well, the assistant responded correctly, testing was smooth. It felt like I had hack the system&lt;/p&gt;

&lt;h3&gt;
  
  
  When everythinh breaks
&lt;/h3&gt;

&lt;p&gt;One day before the deadline, the API key stopped working, &lt;strong&gt;Expired&lt;/strong&gt;. No warning. No mercy.&lt;/p&gt;

&lt;p&gt;I panicked, ran the script again, waited another eternity, and found a new key. This one worked... &lt;strong&gt;for four hours&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The project was due that same day. There was no backup plan.&lt;/p&gt;

&lt;p&gt;I ended up buying an official OpenAI API key at the last possible moment.&lt;/p&gt;

&lt;h3&gt;
  
  
  So... was it worth it?
&lt;/h3&gt;

&lt;p&gt;On paper, using leaked API keys looks like a smart move: not cost, "it works", no one notices&lt;/p&gt;

&lt;p&gt;In reality, you lose a lot of hours, it's unrealiable, your project depends on something that can die at any moment, and the stress isn't worth it.&lt;/p&gt;

&lt;p&gt;Beyond ethics, there's one key lesson I learned the hard way "Free becomes expensive when you depend on it"&lt;/p&gt;

&lt;p&gt;I didn't pay for the API because it was the right thing to do. I paid because &lt;strong&gt;it was the only reliable option&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  It was ok?
&lt;/h3&gt;

&lt;p&gt;Is it ethical to use publicly exposed API keys?&lt;br&gt;
Is the fault on the person who leaked it, or the one who uses it?&lt;br&gt;
Is saving a few dollars worth risking your entire project?&lt;/p&gt;

&lt;p&gt;I don’t have a definitive answer.&lt;br&gt;
But after going through this, one thing is clear to me: if your project matters, don’t build it on something you don’t control.&lt;/p&gt;

&lt;p&gt;Sometimes paying isn’t a luxury.&lt;br&gt;
It’s simply the least painful option.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
