liveBook · Manning

OpenAI-compatible API

As explained in Spring AI in Action

An OpenAI-compatible API is an API that follows enough of the OpenAI API's interface conventions to support clients designed for OpenAI.

An OpenAI-compatible API follows enough of OpenAI’s interface conventions for clients built for OpenAI to use it. Spring AI’s OpenAI starter can integrate with these APIs much like it integrates with OpenAI’s REST API. section 1.2

Compatible endpoints appear across several kinds of providers and tools:

  • Groq and Google Gemini offer OpenAI-compatible APIs alongside or instead of proprietary APIs. section 1.2
  • vLLM and LiteLLM provide tools with mostly OpenAI-compatible APIs. section 1.2
  • Ollama offers an OpenAI-compatible option for locally running open-source models. section 1.2

How Spring AI in Action covers it

How deep it goes
Defines interface compatibility and names implementations, but stops short of endpoint-level configuration or request examples.
Examples
Names Groq, Google Gemini, vLLM, LiteLLM, and Ollama as compatible providers or tools.
What it assumes
Assumes a Spring AI application with the OpenAI starter selected.
What you can do after
Apply it via Spring AI’s OpenAI starter to integrate compatible APIs similarly to OpenAI.
How it connects
Connects OpenAI-compatible APIs with Spring AI, REST APIs, AI service providers, and language models.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.