That's interesting because I always thought of an API as a thing that let you write code in something that normal people just use normally, like Excel to run numbers, but niche geeks like I was (a computerized metal cutting tool geek) wanted to use to make weird shit nobody though of, like a thing for transforming a machine tool program created by a machinist using a conversational application so that it would include the highly specialized G-code drilling cycle I'd written and loaded into the machine tool itself. The conversational application could not write it directly because it didn't exist anywhere except in the memory of the machine tool I'd written it to, if that makes any sense.
https://en.m.wikipedia.org/wiki/G-code