Choosing a Provider
Before you write your first model call, you'll need to pick a provider path that gives you actual API access. This is one of the most common stumbling blocks if you're new to AI Engineering. People (yours truly) who have used ChatGPT, Gemini, or Claude in the browser assume they already have what they need to build from code. Usually they don't, and the distinction isn't obvious until you hit it.
This guide lays out the product boundaries clearly. The curriculum supports multiple paths: direct provider APIs (OpenAI, Gemini, Anthropic), hosted inference platforms (Hugging Face, Ollama Cloud, GitHub Models), and local runtimes (Ollama on your machine). You don't need them all. You don't need to marry one forever. You can start with one and add or switch to another later.
Using a cloud platform like AWS Bedrock or Google Vertex AI? Those are valid paths to the same models. The curriculum concepts apply unchanged; only the API surface differs. See Cloud Provider Surfaces for setup, translation tables, and how to map lesson examples to your platform.
What you'll decide
- Which provider you'll use first for Module 1 exercises
- Which site gives you API keys and billing access for that provider
- Whether you want one provider or more than one configured
- When it makes sense to mix providers by capability
Concepts
The following terms come up throughout this guide and the rest of the learning path. If you're already familiar with these, skip ahead to the provider comparison table.
- Provider: the company or service that hosts a model API you call from code.
- Developer platform: the provider's API, billing, API-key, and developer-docs surface. This is what you'll need for this learning path.
- Consumer chat app: the browser or desktop product meant for human conversation. ChatGPT, Claude.ai, and HuggingChat are examples. Useful for experimentation, but not the same thing as API access.
- Developer/agent tools: tools like Claude Code, Codex CLI, OpenCode, and GitHub Copilot SDK are a different category. They're developer tools or agent runtimes that use APIs under the hood, not consumer chat apps. You may use them while learning (see Choose Your Track), but they're not the same as the provider platforms where you get API keys and billing.
- Hosted API: the provider runs the model for you and you call it over HTTP.
- Routing platform: a developer platform that can route your request to multiple underlying model providers through one account and one token. Hugging Face Inference Providers can work this way.
- Hosted inference platform: a platform layer that exposes multiple publishers' models behind one account or auth surface. GitHub Models fits here. It's real and useful, but it's a different layer from "the direct provider API for a specific model family."
- Local inference: you run the model on your own machine. Ollama supports this directly. Some of our lessons later in the path discuss when this matters.
Supported starting paths
Each of these paths is supported throughout the learning path. The table below shows where to go for developer access, what not to confuse it with, and when each one is a good first choice.
| Provider / platform path | Developer surface to use | Do not confuse it with | Primary auth env var | Best first if... |
|---|---|---|---|---|
| OpenAI | platform.openai.com + developers.openai.com | chatgpt.com | OPENAI_API_KEY | You want a widely documented direct API surface with a large surrounding ecosystem of examples and SDK integrations |
| Gemini API | aistudio.google.com + ai.google.dev | gemini.google.com | GEMINI_API_KEY | You want Google's direct API surface, native structured outputs, and a clean path to Vertex AI later |
| Anthropic | platform.claude.com + platform.claude.com/docs | claude.ai | ANTHROPIC_API_KEY | You want Claude as your main model path and strong prompt/tool-use docs |
| Hugging Face | https://huggingface.co/settings/tokens + https://huggingface.co/docs/inference-providers/index | huggingface.co/chat | HF_TOKEN | You want one developer account that can access many open models/providers and later expand into datasets, Spaces, and dedicated endpoints |
| GitHub Models | https://github.com/marketplace/models + https://docs.github.com/en/rest/models/inference | GitHub Copilot SDK | GITHUB_TOKEN | You want a hosted inference path behind your GitHub account and like using publisher/model IDs through one API surface |
| Ollama (Local) | ollama.com/download + local API at http://localhost:11434 | Ollama Cloud at https://ollama.com/api | none | You want privacy, offline development, predictable cost, or the strongest beginner path for local structured-output experiments |
| Ollama Cloud | https://ollama.com/api + docs.ollama.com | local Ollama at http://localhost:11434 | OLLAMA_API_KEY | You want a hosted Ollama path for chat/generation today and the flexibility to learn local Ollama later |
Curious where GitHub fits? GitHub Copilot SDK is an agent-platform/runtime layer. GitHub Models is a hosted inference and routing layer. Both are valid ecosystem surfaces, but this curriculum teaches direct provider APIs first so you learn the underlying contracts before adding a higher-level platform layer. See Excluded Topics and Clarified Terms for the canonical taxonomy.
The product-platform distinctives
Most providers have both a consumer product and a separate developer platform, and the line between them isn't always obvious. Here's what to watch for with each provider.
OpenAI: ChatGPT is not the API Platform
If you want to build from code, the places that matter are platform.openai.com for keys and billing and developers.openai.com for the current API docs, not chatgpt.com.
chatgpt.comis the consumer product for using ChatGPT directly.platform.openai.comis the developer platform for API keys and API billing.developers.openai.comis where OpenAI's current API docs and integration guides live.- OpenAI's own help center explicitly says ChatGPT and the API platform are two separate platforms, and billing does not automatically carry over between them.
Practical rule:
- If a lesson tells you to set
OPENAI_API_KEY, you need the OpenAI API platform. - A ChatGPT Plus/Pro/Business subscription does not automatically give you API access.
Anthropic: Claude app is not the developer platform
If you want to build from code, the place that matters is Anthropic's developer platform at platform.claude.com and the canonical API docs at platform.claude.com/docs, not claude.ai.
claude.aiis the consumer chat product.platform.claude.comandplatform.claude.com/docsare the developer surfaces for API keys, billing, Workbench, and programmatic access.- Anthropic's own help center says paid Claude plans and the Claude Console are separate products, and a paid Claude subscription does not include API or Console access.
Practical rule:
- If a lesson tells you to set
ANTHROPIC_API_KEY, you need Anthropic's developer platform access. - If you are setting Anthropic up now, go to
https://platform.claude.com/first, then usehttps://platform.claude.com/docs/for the API walkthroughs. - A Claude Pro/Max/Team/Enterprise subscription does not automatically give you API access.
Gemini: the Gemini app is not the Gemini API
If you want to build from code, the places that matter are aistudio.google.com for API-key management and ai.google.dev for the Gemini API docs, not gemini.google.com.
gemini.google.comis the consumer Gemini appaistudio.google.comis the developer surface for Gemini API keys and quickstart workflowsai.google.devis where Google's Gemini API docs and SDK guides live
Practical rule:
- If a lesson tells you to set
GEMINI_API_KEY, go to Google AI Studio and Gemini API docs, not the consumer Gemini app. - If you later decide to use Gemini through Vertex AI instead of the direct Gemini API, the model concepts stay the same and only the platform surface changes. See Cloud Provider Surfaces.
Ollama: local Ollama is not Ollama Cloud
Ollama supports both local and cloud usage, and the names are similar enough to confuse you if you don't know what to look for.
- local Ollama runs on your machine and serves an API by default at
http://localhost:11434/api - Ollama Cloud exposes a hosted API at
https://ollama.com/api - The official docs present the same API shape locally and in the cloud, but this curriculum only relies on direct Ollama Cloud for chat/generation. Embedding-heavy lessons use local Ollama or an explicit hybrid path.
Practical rule:
- If you are using local Ollama, no API key is required for
http://localhost:11434 - If you are using Ollama Cloud directly, you need an API key and
OLLAMA_API_KEY - In this curriculum, when a lesson says
Ollama Cloud, it means the hosted API onollama.com, not the local runtime - In embedding and vector-retrieval lessons,
Ollama (Hybrid)means local Ollama for embeddings plus Ollama Cloud for generation
Hugging Face: HuggingChat is not Inference Providers
Hugging Face is broader than a single model API. For this learning path, the hosted-inference surfaces that matter are your Hugging Face account, your user access token, Inference Providers, and sometimes Inference Endpoints. That is different from huggingface.co/chat.
huggingface.co/chatis HuggingChat, the consumer chat apphttps://huggingface.co/settings/tokensis where you create theHF_TOKENyou'll use from code. Important: create afine-grainedtoken and enable theMake calls to Inference Providerspermission. A default token without this permission won't work for the lessons that call hosted models.https://huggingface.co/docs/inference-providers/indexis the easiest hosted API path for this curriculum- Inference Endpoints is the dedicated-infrastructure option you may care about later
Practical rules:
- If a lesson tells you to set
HF_TOKEN, go tohttps://huggingface.co/settings/tokensand create a fine-grained token withMake calls to Inference Providersenabled - If you want the simplest hosted path, start at
https://huggingface.co/docs/inference-providers/index - If you already have another provider account, Hugging Face can also route requests using a custom provider key while keeping the same client surface
- In this curriculum, "Hugging Face" usually means Hub account + token + Inference Providers unless the lesson explicitly says Endpoints, datasets, or Spaces
GitHub Models: hosted inference is not GitHub Copilot SDK
GitHub Models is a hosted inference surface behind GitHub authentication. In this curriculum, it matters as a way to call models through GitHub's API layer. That is different from GitHub Copilot SDK, which is an agent runtime layer.
- GitHub Models uses your GitHub auth/token and publisher/model IDs such as
openai/gpt-4.1 - GitHub Copilot SDK is a higher-level runtime with sessions, tools, and control flow
- In this curriculum, when a lesson says
GitHub Models, it means the hosted inference API surface atmodels.github.ai/inference
Practical rules:
- If a lesson tells you to set
GITHUB_TOKEN, you need a GitHub token that can call GitHub Models - If you are using GitHub Models, keep the distinction clear: hosted inference surface here, Copilot SDK elsewhere
- Do not assume every publisher in the broader AI ecosystem is available through your GitHub Models catalog. On the token I validated on April 1, 2026, the visible publishers were OpenAI, AI21 Labs, Cohere, DeepSeek, Meta, Microsoft, Mistral AI, and xAI. Anthropic and Google were not visible on that token.
- Because of that catalog reality, the GitHub Models lesson variants in this curriculum are currently validated against OpenAI-published models on GitHub Models, not as a generic "Claude or Gemini through GitHub" path
Pricing and budget notes
Pricing changes frequently, so be sure to check the official provider pricing pages before committing. Here's what was current as of this writing:
- OpenAI API pricing lives on the OpenAI API pricing page
- Gemini Developer API pricing lives on the Gemini Developer API pricing page
- Anthropic API pricing lives on Anthropic's pricing docs / pricing page
- As of March 24, 2026, Hugging Face's official pricing pages say:
PRO:$9 / moTeam:$20 / user / moEnterprise: starting at$50 / user / mo- Inference Providers pricing docs also say free users get
$0.10monthly credits and PRO users get$2.00monthly credits for routed requests, with pay-as-you-go after that
- As of March 24, 2026, Ollama's official pricing page lists:
FreePro:$20 / moor$200 / yrbilled annuallyMax:$100 / mo
If budget is your main concern, Ollama Cloud and Hugging Face are both solid hosted options worth considering. If you want a widely documented direct API surface, OpenAI is still a reasonable place to start. If Claude is the ecosystem you already use daily, Anthropic is a great first-class path. If you like the Ollama ecosystem but do not have local hardware yet, Ollama Cloud is a reasonable place to start.
You can have more than one provider
You don't have to pick one provider for the entire curriculum.
Normal mixed-provider setups include:
- OpenAI for early hands-on examples, Anthropic for later comparison
- Gemini for direct API work, Vertex AI later when cloud-platform controls matter
- Anthropic for generation, another provider for embeddings
- Hugging Face as a single token for many open models, with direct-provider keys added later only if needed
- GitHub Models for hosted inference behind GitHub auth, with direct-provider keys added later if you want the native publisher surface
- Ollama Cloud for hosted chat calls now, local Ollama later
Provider choice is often per capability, not just per company.
One important example: Anthropic's own embeddings guide says Anthropic does not offer its own embedding model and points learners to separate embeddings providers. So "I use Anthropic" doesn't have to mean "I only use Anthropic for every component."
How to choose your first provider
Here's how I'd think about it:
- Choose OpenAI Platform first if you want a widely documented direct API surface with broad SDK and community example coverage.
- Choose Gemini API first if you want Google's direct API surface and you like the native structured-output, function-calling, and embeddings path exposed through
google-genai. - Choose Anthropic's developer platform first if you want Claude as your main runtime and you are comfortable translating a few SDK/API surface differences.
- Choose Hugging Face first if you want one developer account that can expose many open models/providers, and you like the idea of one token working across chat, embeddings, and later dedicated endpoints.
- Choose GitHub Models first if you already live in GitHub, want a hosted inference path behind one GitHub auth surface, and are comfortable using publisher/model IDs like
openai/gpt-4.1. - Choose Ollama (Local) first if you want to stay local from day one, keep your code on your machine, and learn the same chat/embedding patterns without a hosted API bill.
- Choose Ollama Cloud first if you want a hosted API now and the option to move toward local Ollama later. In my smoke tests, it was a good fit for chat-first and summarization-heavy examples. For strict schema-constrained extraction, local Ollama or another provider was more reliable.
- Keep a second provider configured if you can afford it. Cross-provider comparison builds better engineering judgment than single-provider habits.
Module 1 provider details
These are the first places where provider choice matters.
LLM Mental Models
Pick one of these seven quickstart variants for your first model call.
Use platform.openai.com, not chatgpt.com.
mkdir llm-experiments && cd llm-experiments
python -m venv .venv && source .venv/bin/activate
pip install openai
export OPENAI_API_KEY="sk-..."from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is a token in the context of LLMs?"},
],
temperature=0,
)
print(response.choices[0].message.content)
print(response.usage.total_tokens)Prompt Engineering Fundamentals
Use the same provider you chose for llm-mental-models.
- OpenAI variant: keep using the
openaiclient inprompt_lab.py - Gemini variant: use
google-genaiwithGenerateContentConfig(system_instruction=...)and keep the same prompt-contract experiments - Anthropic variant: swap the client and call shape, but keep the same prompt-contract experiments
- Hugging Face variant: keep the
openaiclient but setbase_url="https://router.huggingface.co/v1"and useHF_TOKEN - GitHub Models variant: keep the
openaiclient, point it athttps://models.github.ai/inference, add the GitHub headers, and useGITHUB_TOKEN - Ollama (Local) variant: use the Ollama client against
http://localhost:11434and keep the same prompt variants - Ollama Cloud variant: use the Ollama client or API with the same prompt variants; the lesson concept does not depend on one provider
The important thing here isn't so much which SDK you use, but that it's running the same prompt variants through the same provider so you can compare the outputs cleanly.
Build with APIs, Not Chat Apps
This lesson is where provider surface differences become most visible.
- OpenAI: use the OpenAI SDK surface for messages, structured outputs, embeddings, and tool calls with a large surrounding ecosystem of examples
- Gemini: use the native Gemini API surface with
google-genaiand native structured outputs - Anthropic: use the cross-provider comparison exercise already in the lesson to see the equivalent message/tool surface
- Hugging Face: use the OpenAI-compatible router or the Hugging Face client surface; model IDs and routed providers become part of the learning
- GitHub Models: use the GitHub-hosted inference surface with GitHub auth, publisher/model IDs, and the same chat/structured-output/tool-call concepts
- Ollama (Local): map the same concepts to the local Ollama API and keep model pulls explicit as part of setup
- Ollama Cloud: map the same concepts to Ollama's chat API, structured output support, and tool-calling support
When reading this lesson, separate:
- portable concept: messages, structured outputs, tool calls, conversation state
- provider surface: SDK names, parameter names, response shapes, auth headers
It's worth keeping in mind: "the lesson is written with one SDK" doesn't mean "the concept only exists on one provider." There's a lot of overlap in provider implementations, and they're evolving at an astonishing pace. Master the concepts and you'll be able to adopt any provider's SDK.
Retrieval Fundamentals
Retrieval is where mixed-provider thinking becomes normal.
- OpenAI path: the current starter lab uses OpenAI embeddings directly
- Gemini path: Gemini exposes a direct embeddings surface, so generation and embeddings can live on the same provider if you want them to
- Anthropic path: Anthropic's own embeddings guide points learners to a separate embeddings provider, so mixed-provider retrieval is expected
- Hugging Face path: Hugging Face supports feature extraction / embeddings through Inference Providers, so it can be your retrieval path even when your generation model lives elsewhere
- Ollama path: Ollama supports embeddings and exposes an
/api/embedendpoint for them
The right beginner mental model is:
- generation provider and embedding provider can be the same
- generation provider and embedding provider can also be different
- that's not a hack; it's normal AI engineering
What's next
Choose Your Track. Once you know which provider account will get you through Module 1, decide whether you're starting cloud-first, local-first, or balanced.
If you want the curriculum's operating principles before you begin building, read Hard Rules.
References
Start here
- OpenAI help: Billing settings in ChatGPT vs Platform — explicit statement that
chatgpt.comandplatform.openai.comare separate platforms - Gemini API quickstart — direct starting point for Gemini API keys, SDK setup, and first requests
- Anthropic get started — the clearest official starting point for Claude API access through the developer platform
- Hugging Face Inference Providers — the main hosted inference entry point for Hugging Face in this curriculum
- GitHub Models inference API — the main hosted inference entry point for GitHub Models in this curriculum
- Ollama Cloud docs — official guide to Ollama's cloud-hosted API path
Build with this
- OpenAI API docs — API docs and integration guidance for OpenAI
- OpenAI API pricing — official API pricing page
- Gemini API docs — the main Gemini API docs hub
- Gemini Developer API pricing — official Gemini Developer API pricing page
- Anthropic get started — API basics, authentication, and Console-based access
- Anthropic pricing — official Claude API pricing docs
- Anthropic help: paid Claude plan vs Console/API — explicit statement that
claude.aiplans and API/Console access are separate - Hugging Face pricing — Hub subscription pricing and plan tiers
- Hugging Face Inference Providers pricing and billing — routed billing, credits, and custom provider key options
- Hugging Face user access tokens — how
HF_TOKENworks for API access - GitHub Models inference API — API contract, auth shape, and publisher/model IDs for GitHub Models
- Ollama authentication docs — how
OLLAMA_API_KEYworks for Ollama Cloud - Ollama pricing — official Ollama pricing tiers
Deep dive
- Gemini models overview — current stable vs preview Gemini model IDs and capabilities
- Gemini structured output — JSON schema support and typed parsing on the direct Gemini API
- Anthropic embeddings guide — important because it makes mixed-provider embeddings explicit
- Hugging Face chat completion task docs — official chat-completion surface, including OpenAI-compatible usage patterns
- Hugging Face feature extraction task docs — official embeddings / feature-extraction path for retrieval work
- Hugging Face function calling — hosted tool-calling/function-calling guide
- Ollama API introduction — explains local vs cloud base URLs
- Ollama structured outputs — shows that Ollama also supports structured response constraints
- Ollama tool calling — provider-specific tool-calling docs for the same concept you'll learn later in the path