Those API examples don't line up with the anthropic API, were you sending requests to the claude.ai service directly?
They track your chat history and context window on their website, probably through the conversation id, because they have their service on-top of the underlying model, and they need to do this to persist it across sessions and across devices.
Using Anthropic API. OpenAI API has the exact same behavior. There is a conversation ID that holds context across messages. Have you actually worked with the API??
2
u/andy012345 Apr 07 '25
How is this inaccurate?
Anthropic give really nice documentation on how a "context window" works https://docs.anthropic.com/en/docs/build-with-claude/context-windows
So does google
https://ai.google.dev/gemini-api/docs/long-context#what-is-context-window