|
This version is still in development and is not considered stable yet. For the latest stable version, please use Spring AI 2.1.0! |
Model APIs
Spring AI defines a portable interface for each type of AI model. Every provider integration implements these interfaces, so application code can change provider without changing the code that calls the model. Chat, transcription and text-to-speech models can also stream their output, and each implementation exposes its provider-specific options.
| Model type | Interface | Purpose |
|---|---|---|
|
Generates a response to a prompt made of messages. |
|
|
Turns text into vectors for similarity search. |
|
|
Generates images from text. |
|
|
Converts speech to text. |
|
|
Converts text to speech. |
|
|
Checks text for potentially harmful content. |
|
|
Answers yes/no, choice and score questions. |
All of them build on the Generic Model API.
Most applications talk to a chat model through the ChatClient instead of using ChatModel directly.
To see which provider implements which model type, go to Model Providers.