APIs and AI Models
How APIs work with AI models
For weather data:
- the API usually reads information from a database
- the data comes from weather stations
For an AI model:
- the API sends data (for example, an image or text)
- the computer runs a calculation using the AI model
- the API returns the result
Example response from an AI model: "Dog" after you send an image along in your API.
The data is sent using JSON format.
Most AI model APIs require an API key to track usage and manage costs.