Prompt Engineering and API Integration · Lesson 1
Foundations & Overview of GenAI Platforms
Generative AI models create new content — text, images, audio, code — by learning patterns from huge datasets. Large Language Models (LLMs) are the text branch: given a sequence of tokens, they predict the next token, again and again, until an answer is formed.
Today you reach these models through platforms. Closed providers (Anthropic, OpenAI, Google) expose models through hosted APIs and chat apps. Open-weight models (Llama, Mistral, Qwen, Gemma) can be downloaded and run on your own hardware or through hosts like Hugging Face, Together or Groq.
Choosing a platform is a trade-off between quality, cost per token, latency, context window size, data privacy and whether you need to fine-tune or self-host.
Key points
- An LLM predicts the next token; everything else is built on that
- Tokens are word pieces — roughly 4 characters of English each
- Context window = how many tokens the model can see at once
- Closed APIs are easy to start with; open weights give control and privacy