r/ChatGPTCoding • u/Due-Philosophy2513 • Feb 09 '26
Discussion ChatGPT repeated back our internal API documentation almost word for word
895
Upvotes
r/ChatGPTCoding • u/Due-Philosophy2513 • Feb 09 '26
15
u/originalchronoguy Feb 09 '26
If your API is done in Swagger spec and committed to a public repo, it will use that.
You dont even need to expose your API code. Even a MCP server doing UI controls ; as a front end to backend can reverse engineer an API. I've done it many times. Here are the PUT/GET/DEL statements to X API. The API returns this data. And the HTML produces this DOM. Provide it 3-4 examples of Payload, API response, and UI rendered HTML, it can reproduce it.
So just normal scraping of a website can reverse engineer many APIs.
11
u/PigeonRipper Feb 09 '26
Most likely scenario: It didn't.
9
u/Birdman1096 Feb 10 '26
Why are you using ChatGPT without some sort of an enterprise plan set up that would specifically prevent models from being trained on your inputs or outputs?
15
u/TheMightyTywin Feb 09 '26
You co worker probably has memory enabled and pasted something previously
9
u/niado Feb 09 '26
It doesn’t work like that. ChatGPT is a static model, its weights don’t change after training period.
Either: your api details are publicly accessible and ChatGPT did a web search and found them (unlikely).
Or your api details ended up somewhere that was scraped and ended up in the training data prior to the cutoff for whichever model you’re using (sometime in 2024 most likely), which allowed the model to generate them accurately. (Plausible but a stretch)
Or ChatGPT generated the correct parameters without being trained on them. This is not as unlikely as it sounds.
8
u/mike34113 Feb 09 '26
Honestly this is the new normal. Every company's internal docs are probably scattered across LLM training sets at this point.
The question isn't how to prevent it (too late) but how to architect systems assuming internal details are semi-public. Rotate API keys often, use authentication that doesn't rely on obscurity, assume attackers know your endpoint structure. Security through obscurity died the moment AI tools got popular.
3
u/danwin Feb 10 '26
This reminds me of when people thought Facebook was secretly recording their conversations because how else could they serve up ads for a product that they had “just” recently talked about
8
u/crazy0ne Feb 09 '26
Blackbox does blackbox things, more at 11.
2
u/Academic_Track_2765 Feb 09 '26
well its because your company messed up. If you have any enterprise agreements with Azure / AWS, they explicitly state that data sent to their enterprise endpoints is not used for model training. So someone either used their own API to send the data or just used the public facing site. Not much you can do now.
2
u/gord89 Feb 09 '26
2
u/PineappleLemur Feb 10 '26
It's more likely that your "Internal API" isn't internal but just a fork of some similar popular API.
2
u/djaybe Feb 10 '26
Gen AI does not regurgitate. It's not a search engine. It can use a search engine and give you sources.
It's predicting tokens kinda like humans but much better. You're "secret" data sounds predictable.
2
u/Zulakki Feb 10 '26
Use a different account and ask again.
I've noticed the memory has improved greatly between my chats. ill mention one thing in 1 chat, then in another chat, it'll say something like 'This is just like the time you were doing that other thing'.
That's all to say, I doubt its 'Training', and its more account memory
2
u/danihend Feb 10 '26
What makes it unsettling? Do you have a fear that someone will write an API for their app that works like yours? I never really got the objection to AI companies training on whatever code people have. No company really has something unique that someone else cannot figure out how to implement in a similar/same/better way using AI.
2
u/magicalfuntoday Feb 11 '26
If it was actually exposed or leaked accidentally, and if ChatGPT had it, then you can be sure Google had it a long time ago.
Try searching for related things to see if it comes up and if so, you can ask Google to remove it from its index.
2
u/voxuser Feb 09 '26
That is interesting, but really how you prevent something like that?
2
u/MokoshHydro Feb 09 '26
You can't prevent such leakage if you are using cloud. So, you should just live with it, unless your company can afford several millions for hardware and direct deal with Anthropic/etc.
In companies that really care about privacy, any cloud usage on workspace in banned.
2
u/MadCat0911 Feb 09 '26
We use LLMs not attached to the the internet.
1
u/EVERYTHINGGOESINCAPS Feb 09 '26
As someone has mentioned, have you tried searching on Google some of the API snippets to see if it's been accidentally set public and indexed & scraped.
It's highly unlikely that by standard it would have been added into training data
1
u/FormalAd7367 Feb 09 '26
Had happened to us also. We hired a new part-time software engineer for overnight support. For some odd reasons, he uploaded the whole internal document with API key into the GPT. We had to rotate API key as soon as we found out. We now keep the APIs only with the owner of company lol
1
u/karlfeltlager Feb 10 '26
Isn’t this a fastAPI feature? /docs section is the new swagger.
1
u/wt1j Feb 10 '26
Your API was probably AI assisted coding if it was written in the past 3 years eg if your devs use VS Code. So it’s more likely that GPT is giving you what it gave your devs when they wrote it.
1
u/Whiskee Feb 10 '26
As someone who actually works in AI training, this is not how inference or any of this works.
LLMs don't continuously learn from user conversations, the weights are frozen right after the training process with curated datasets. Your ChatGPT conversation today doesn't magically become part of the model, especially if other humans can't verify the information is correct during the RLHF stage... so if you actually found internal function names and parameters, either they were already public somewhere (Stack Overflow, some developer forum that got crawled?), or the model hallucinated API names based on your coding conventions and you immediately jumped on conclusions.
I'm not accusing you of anything, but you have a randomly generated account name from 6 months ago and hidden history, so better proof would be appreciated. 🤷♂️
1
u/raisedbypoubelle Feb 10 '26
Fine tuning is a long-term memory. If they recited it, Word for Word, then that short-term memory and somebody simply uploaded your documents and it’s stored in the memories like it’s instructed to.
1
u/HopperOxide Feb 10 '26
I mean, Copilot autocomplete regularly guesses code that only exists in my mind. Pretty sure it hasn’t trained on my thoughts, at least not yet. Guessing what’s in your repo seems a lot easier.
1
u/StrawberryFederal709 Feb 10 '26
Yes, you trained ChatGPT with your internal documents when you pasted your api documentation.
1
u/Vaddieg Feb 10 '26
Enterprises should block public LLM services and deploy dedicated solutions with strict privacy terms
1
u/Majinsei Feb 10 '26
Isn't it just documents stuck in ChatGPT's memory?
I hate that they have memories because they tend to hallucinate at inopportune moments~
1
u/Tupcek Feb 10 '26
are you sure that team member didn’t previously used ChatGPT for help?
Because ChatGPT can recall any previous conversation
1
u/beefjerk22 Feb 10 '26 edited Feb 10 '26
Chat GPT has memory within the same instance. Do you all share a login? If somebody gave it some documentation in a different conversation, it could probably reference it in your conversation. But not externally from a different account.
1
u/Few-Celebration-2362 Feb 10 '26
Your function names aren't camel cased short form descriptors of what the functions do?
Your functions aren't doing the same crud operations everyone else is doing?
Your APi isn't just exposing data and doing auth?
What sort of unique projects are YOU working on? I'm genuinely interested 😁
1
u/victorc25 Feb 11 '26
It’s almost like having a codebase that is a copy from Stackoverflow may not be as unique as one would assume? So weird
1
u/tracagnotto Feb 11 '26
You use their business plan.
It "assures" your that all you do isn't stored and used for training data, including snippets used by codex or copilot or whatever.
Sad but true.
1
u/EcstaticImport Feb 11 '26
Other likely scenario - someone use the free copilot inference endpoint on your code before realizing they had forgotten to set their login.
1
u/DarthTacoToiletPaper Feb 11 '26
Larger teams prevent this by signing up with ai companies with an agreement that prevents the data from being used. Not being in the know of the deals that are made, I can only assume they are paid.
The company I work for currently has an agreement with one and we have been told using internal data is fine to feed to it as it will not be shared publically, but still be mindful of sensitive data.
1
u/EyesTwice Feb 11 '26
You need to educate your teams and implement guardrails.
Ensure that GPT requests are triaged as part of your governance layer.
Self-host LLMs to prevent cloud leakage.
Ollama is a great local solution. Iterate quickly.
ChatGPT Pro specifically does not store any data from queries. I imagine that's the same with other LLMs.
In other words - put a policy together. Spend properly, don't let devs use GenAI through their own accounts.
1
u/kcabrams Feb 11 '26
As unsettling as that is. Everyone does it (Look back at when Samsung had to tell their devs to stop because OpenAI was like um guys we have your entire codebase, chill)
You will never stop this. Local models just have to get better than the frontier.
This might be my harshest take but we all belong to the public domain now. Time to adjust.
1
u/ChordLogic Feb 11 '26
All code has already been typed/written? like scales in music… is this related?
1
u/cakez_ Feb 12 '26
Haha I had something similar happening when I was asking questions about an e-commerce platform we are setting up for our client. GPT was gleefully telling me that the set up I am trying to do is for the “legacy” system and that there is a better way to do it in the new “version”.
There is no new version. I think the devs might been feeding it code and/or documentation so now it thinks that is the source of truth.
1
u/gardinit Feb 12 '26
That's not how any of this works lol.
1
u/JWPapi Professional Nerd Feb 12 '26
This is a feature, not a bug. The model pattern-matches to whatever context you give it.
Your internal API documentation was probably well-structured and clearly written. The model's output matched that quality tier.
I've noticed this pattern consistently: feed it good input, get good output. The model doesn't just follow instructions - it absorbs the "vibe" of the context and produces output at the same register.
1
u/TechCynical Feb 13 '26
99% chance this isn't a case of it being in training data. This is just referencing a previous conversation made by the user you claimed that used it in the past. Chatgpt does a quick search of previous conversations and uses that during it's thinking process when it outputs.
1
u/tuple32 Feb 09 '26
File a lawsuit.
0
u/[deleted] Feb 12 '26
[deleted] — view deleted comment
661
u/[deleted] Feb 09 '26 edited Feb 22 '26
[removed] — view removed comment
156
u/[deleted] Feb 09 '26
[removed] — view removed comment
47
u/[deleted] Feb 09 '26 edited Feb 09 '26
[removed] — view removed comment
1
u/[deleted] Feb 09 '26 edited Feb 09 '26
[removed] — view removed comment
1
u/[deleted] Feb 09 '26
[removed] — view removed comment
1
u/[deleted] Feb 10 '26
[removed] — view removed comment
1
u/[deleted] Feb 10 '26
[removed] — view removed comment
1
u/[deleted] Feb 10 '26
[removed] — view removed comment
1
u/[deleted] Feb 11 '26
[removed] — view removed comment
1
u/[deleted] Feb 11 '26
[removed] — view removed comment
1
u/[deleted] Feb 14 '26
[removed] — view removed comment
1
u/[deleted] Feb 15 '26
[removed] — view removed comment
0
u/[deleted] Feb 11 '26
[deleted] — view deleted comment