You test a prompt in ChatGPT and it looks great. You take the exact same prompt to the API, and the response comes back short, generic, and clueless about today's date. In Claude Code, the model acts a third way.
The quick conclusion is usually "the API uses a worse model." In most cases, it doesn't. What changes is the layer around the model and, in some cases, its exact version.
A subscription is not an API key#
Many people assume that a Claude or ChatGPT subscription includes an API key. It does not. They are two separate contracts:
- Subscription (Pro, Max, Plus): pays for human usage in the app and, for Anthropic, Claude Code. A Pro or Max plan does not pay for a Claude feature running inside your own app. [source: laozhang]
- API key: bills per token and is used for software, automation, and integrations.
In Claude Code, both paths exist, and there is a trap. If the ANTHROPIC_API_KEY environment variable is set, Claude Code uses that key instead of the subscription and bills it as API usage. If an unexpected API charge appears, run /status before switching plans. [source: claude]
The payment method does not change the model. What changes the behavior is the access surface.
Layer 1: the system prompt you don't see#
Every conversation starts with instructions that come before your text. On claude.ai, you get Anthropic's default system prompt; in a third-party app, you get what the operator wrote; in the API, you get no default system prompt at all. [source: tactiq]
Anthropic itself states that app system prompt updates "do not apply to the Claude API." That is where the app passes data to the model, such as the current date, at the start of each conversation. [sources: claudearchitectcertification, claude]
That is why the API sometimes gets its own name or the date wrong. The model's identity is not stored in the weights: it comes from the app's system prompt.
The same thing happens in ChatGPT. The app includes an internal system prompt that guides tone, style, and safety, which the API does not expose.
Layer 2: tools and memory#
The web app is a furnished apartment; the API is a bare-concrete shell. The app comes pre-equipped with web search, code execution, file reading, conversation memory, and context management.
In the API, none of this exists until you build it. If the model doesn't know today's news, it's because the API doesn't browse the web by default. If it doesn't remember what you said earlier, it's because you didn't resend the history.
Claude Code is a third surface. It has its own system prompt and tools to read and edit files, run commands, and load project memory. It's the same model, prepared for a different job.
Layer 3: parameters chosen by you (or not)#
In the app, the product chooses the temperature, maximum response length, and reasoning effort—and some products even route the question to another model or reasoning tier. In the API, default values apply, which are usually different. [source: apiyi]
That is why so many people complain about short responses in the API: often the output token limit is set too low or formatting instructions are missing.
Layer 4: the exact model version#
This layer can indeed change the model. Even with the same name, the version running underneath can vary between the app and the API. The provider updates the app whenever they want, often without a changelog. In the API, an alias can swap versions, while a date-suffixed name stays fixed.
At least one analysis from 2026 claims that OpenAI actually served a different build in ChatGPT than the one in the API. Treat this as a third-party report, not official documentation. But the takeaway stands: if the comparison matters, pin the version in the API.
How to make the API behave like the app#
To reproduce the app's behavior in the API, rebuild what the app provides out of the box:
- Write a system prompt with identity, current date, tone, and formatting rules.
- Resend the conversation history with each call.
- Set the temperature and output token limit purposely, without relying on defaults.
- Enable the tools the task needs, such as search and code execution.
- Pin the model version with a date, without using the alias.
- Run the same test more than once before drawing conclusions.
The rule in one sentence
The subscription and the API key determine who pays; the surface (system prompt, tools, parameters, and version) determines how the model responds. When the same model responds differently, first ask yourself where you are, and only then which model you are using.
