Gen AI, APIs, and the Future of Development

Gen AI, APIs, and the Future of Development

Posted in

We’ve heard much hyperbole over artificial intelligence in recent years, with some claiming it will replace software developers wholly and others saying it’s just a fad. Whatever you believe to be true about it, there’s no denying that AI is everywhere right now. That was nowhere more apparent than at our 2024 Austin API Summit, where so many speakers presented on the topic that we were compelled to dedicate an entire track to it.

One of those speakers was Paul Dumas, a former Gartner analyst who opened day one of the Summit with a thought-provoking talk on the role of AI in the API space. Specifically, he prompted us to consider how and where humans will fit into API development as we rely more on AI. Below, we’ll examine the current state of AI and its relationship with API development, considering some great insights from Dumas’s talk and what we might reasonably expect the future to look like.

Watch Paul Dumas present at the 2024 Austin API Summit:

The Rise of AI-Generated Code

First, it’s worth highlighting that deploying AI-generated code is not some futuristic pipe dream. Not only is it already happening today, it’s happening a lot. But exactly how much AI-generated code is out there? That’s up for debate.

In his Austin talk, Dumas described the results of a recent Gartner study. 13% of the people Gartner talked to were already using gen AI in software development. Also, 36% were in the process of evaluating it, and 52% had plans to use it in the near future.

In 2023, some articles claimed that almost half of all new code was being written by AI… and a lot of software developers started to panic. In fact, that statistic was far from definitive. It seemed to come from a GitHub article promoting Copilot, and the “46% of code written” referred to a self-selected group of developers who were actively using that product.

Regardless, we already know that AI can write code and, in many cases, outperform humans. This means we should probably all resign right now and put all our eggs in this basket, right? Not exactly.

AI generated code quality

AI-generated code isn’t always what it’s cut out to be. Source.

​​As Armando Solar-Lezama, head of the computer-assisted programming group at MIT, says on Science: “Even if this kind of technology becomes super successful, you would want to treat it the same way you treat a programmer within an organization. You never want an organization where a single programmer could bring the whole organization down.”

AI-Generated Code Doesn’t (Always) Work

Commentators are keen to point out that code generated by AI tools often has many issues. Take AI’s tendency to hallucinate and inability to effectively debug, for example. This can create code that looks like it should work but may not actually do so.

Despite that, AI tools often seem very confident that the code they generate will work. When asked, “Are you sure?” they might cheerily reply that everything is correct…only for it to fail when implemented. That’s a big problem for developers who are (over)relying on that code.

Yet a reliance, to some degree or another, on AI-generated code is starting to feel like an inevitability. Reservations and concerns aside, the automation of the coding industry using AI has begun. Many developers have already integrated AI coding tools, which are getting “smarter” all the time, into their workflow.

In his talk, Dumas predicts that eventually, AI will produce the APIs for you and produce the code that consumes the APIs. “As a developer, you’re going to become more strategic and…more intuitive.” So what exactly does he mean by that?

A potential outcome of the rise of AI in the development space, predicts Dumas, is that developers will come to act as stewards of AI-generated content. In a way, that’s what many developers are already doing: they generate code using AI tools, test it out, and deploy it if it works. Interestingly, that isn’t so different from QCing the work of a more junior developer.

The idea here is that based on our past work — such as writing API descriptions and building APIs — API developers are uniquely qualified to assess the quality of AI output. In this vision of the future, we will be gatekeepers who hold the final keys of approval.

Does AI Even Need to Create Code?

When it comes to practices like prompt engineering, we’re in the early days. Many AI tools still operate in silos. For instance, they’re likely to be built on a large language model (LLM) and whatever data the tool has been trained on. This means that their scope is limited.

Currently, for example, a developer looking to solve a problem with an AI tool might issue a prompt like this: “Write code in X language that accomplishes Y function.” But that developer probably cares less about the first half of that prompt than they do the second. Accomplishing the “Y function” is the goal here, not necessarily code generation.

The emphasis on generating code may fade as AI tools become more connected and embedded within existing workflows. If AI can accomplish something by calling another tool, à la IFTTT or by using an API without outputting pages of code, then we should expect it to do so.

Of course, if we’re concerned about AI churning out bad code, perhaps we should be even more concerned about what it’s doing behind the scenes in a set of processes that we can’t even see. Once again, there’s a good chance it will all come back to stewardship.

AI tools might suggest solutions or auto-complete things for us, but we’ll surely continue to approve these manually…for now. But knowing exactly what the future will hold is difficult because this train is moving so quickly. Dumas jokes that “a couple of weeks ago, I thought what I was going to say was very provocative, and by the time I got off the plane yesterday… it wasn’t.”

He also predicts that “probably next year, or certainly the year after, at least 70% of any software product you touch will have an AI component to itself.” In other words, when it comes to getting on board with these developments, we may not have much of a choice.

Actionable Next Steps

“AI itself is going to become an API consumer,” says Dumas. “AI tools are going to be looking into APIs and executing them, and invoking them to get data and information to build their models with.” In a very real way, AI tools will likely become another user persona that we need to consider when building and documenting APIs.

On that basis, it’s well worth considering how AI can streamline API developer operations. We’ve previously written, for example, about how generative AI is evolving API management. Using AI tools to document APIs, for example, could help create documentation that’s more easily digestible when AIs analyze that information — written by AI for AI, as it were.

We need to be prepared for significant shifts in security and governance, too. Subjects like LLM security and using AI tools in a way that complies with privacy regulations and guidelines represent black holes in many organizations right now. The sooner we address them, the better.

We’ll have much more on the overlap between AI and APIs on the blog soon, but perhaps the most straightforward way to get your feet wet with all of this is by looking into some of the AI-first API management platforms that have been emerging. Or perhaps, given that 70% prediction made by Dumas above, just wait for the one you’re already using to unveil an AI component…