TLDR AI · MISCELLANEOUS
HOW STREAMING LLM APIS WORK
Summary from the TLDR AI newsletter
A review of HTTP streaming APIs from various LLM providers revealed common patterns. OpenAI, Anthropic, and Google Gemini all use POST requests, but their implementations differ slightly in response structure and token usage. This article includes examples and code for consuming these streams with tools like curl, Python's HTTPX, and JavaScript Fetch.