Skip to content

Lesson 4 ยท Getting Started

ChatGPT and Claude: App, Model and API

See how ChatGPT and Claude put generative AI to work, how the app, the model and the API differ, and what that changes when you read advice or build software.

ChatGPT, from OpenAI, and Claude, from Anthropic, are two widely known ways to use a large language model. People often talk about them as if each were a single thing. In practice each name covers several layers: an app you chat with, a family of models behind it, and a developer platform that lets your own program call those models.

Knowing which layer you are using explains many surprises, such as why the app remembers something that your script does not. This tutorial is independent. It is not affiliated with or endorsed by OpenAI or Anthropic.

Three layers behind one name

Three layers

App Chat screen, tools, memory
Model Predicts the next tokens
API Your code calls a model
1 / 2

The model is the trained network. It receives tokens and produces tokens, as you saw in How LLMs Are Trained. Chatting with it does not by itself change its weights or store your conversation inside it.

The app wraps the model. It sends additional context along with your message, keeps your chat history, and may add search, file reading, code execution, memory and connections to other services. Which of these you get depends on your plan, your settings, your region and, at work, your administrator.

The API is the developer door. You send a request that names a model and contains your input. You decide what instructions, history and tools go with it. Developer API usage is billed separately from chat subscriptions, so check the billing terms for each product you use.

Model families, not one model

Each vendor offers several models that trade capability against speed and price. As of December 2026, OpenAI's API model page lists GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra and GPT-6 Luna as its flagship models. Anthropic's current API models include Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5 and Claude Haiku 5.5.

The apps may offer a different set of choices from the API, with names such as speed or thinking modes. Do not assume that a mode in an app equals one API model ID. The model landscape lesson explains how to think about families in general. Names change often, so treat every list as a snapshot.

Question Where to check
Which models can my app account use? The model picker and the vendor's help center
Which model IDs can my code call? The vendor's API model page
What does a request cost? The vendor's API pricing page
What happens to my data? The terms and data settings for your exact plan

The same question through each API

The two APIs are similar in idea but not identical in shape. This read-only code uses the official Python SDKs (openai and anthropic). It needs an API key and a network connection, so it does not run on this site.

Python
# Read-only: needs the openai package and an API key
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-6.2-sol",
    instructions="Answer in two sentences.",
    input="What is a token?",
)
print(response.output_text)
Python
# Read-only: needs the anthropic package and an API key
import anthropic

client = anthropic.Anthropic()
message = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=2000,
    system="Answer in two sentences.",
    messages=[{"role": "user", "content": "What is a token?"}],
)
for block in message.content:
    if block.type == "text":
        print(block.text)

Notice three differences. The instruction field has a different name (instructions here, system for Claude). Claude's Messages API requires max_tokens. Claude returns a list of content blocks, so you check each block's type. The next lesson, Calling an LLM API, covers the general pattern.

Why the layer matters

The stand-in below shows the core idea: an app can assemble a bigger request than the one you type. The strings and the logic are invented. It does not show how either company builds its app.

Python Stand-in: what an app might add to your message

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The app version knows that the cat is old. The bare request does not, because nobody sent that fact. When your program needs context, your program must supply it, or use a platform feature that stores conversation state for you.

Statements such as "ChatGPT can read my files" or "Claude cannot browse" are only meaningful with a layer, a plan and a date. Check what your own account or API request actually has enabled.

Common mistakes

  • Testing in the app, shipping on the API. The app's added instructions and tools are not part of your request unless you add equivalents. Test the exact request your code sends.
  • Treating one plan as all plans. Personal and business accounts can differ in features and data handling.
  • Pasting private data without checking. Read the data terms and your organization's rules first.
  • Asking the model which model it is and trusting the answer. Read the model field in the API response or the app's model picker.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. A chat app remembers your preference but your API script does not. What is the likeliest reason?

    The app assembles extra context. A request from your code contains what your code, or a platform state feature you chose, provides.
  2. 2. Which source should you check for the model IDs your code can call?

    Model IDs change, and the official API model page is the current list.
  3. 3. In Claude's Messages API, how is the reply returned?

    Content is a list. Text is in blocks of type text; other block types can appear.

Summary

  • ChatGPT and Claude each name an app, a set of models and a developer platform around them.
  • Chatting does not store your conversation in the weights; the app or your code supplies context.
  • Features and limits depend on layer, plan, settings and date.
  • The two APIs share ideas but use different field names and response shapes.

Next: Calling an LLM API

Your progress is saved in this browser. No account needed.