9.6 AI APIs and Online Platforms
APIs let you use powerful AI models in your own apps without training anything yourself.
Chapter 9: Tools and Technologies for AI
Training a big model costs a fortune. Good news: you don't have to. Companies offer APIs - you send a request over the internet and get the AI's answer back.
Examples: language model APIs from Anthropic, OpenAI and Google; vision and speech APIs from cloud providers; and Hugging Face, a huge hub of open models and datasets you can download or try in the browser.
Typical flow: get an API key, send a request with your prompt or data, receive the result, use it in your app. Keep your API key secret - it's basically a password linked to your bill.
Safety first
Never paste an API key into public code or a screenshot. Treat it like a password.
Key takeaways
APIs = use powerful models without training them
Hugging Face = hub of open models
Keep API keys secret