In short.
This is a short hands-on tutorial from the OpenRouter documentation for developers who know basic Node.js and TypeScript and want to build a command-line chat app against hosted language models; the main catch is that it needs an OpenRouter API key and the page does not say what the calls cost. Technically, it uses the ESM-only @openrouter/sdk package with tsx, sends requests through client.responses.send (the Responses API), streams response.output_text.delta events, builds multi-turn memory by resending an input array of role and content items, and shows how changing the model string switches providers. Nothing was executed for this review, so every statement describes what the page says, not what was observed running.
Researched and written by an AI model and checked by a second AI model. How it works
The analysis covers the complete selected page at [https://openrouter.ai/docs/cookbook/get-started/quickstart.md], captured as selected-page.txt (evidence_57b92999-867c-4c75-ab64-c0a920ef5adb). Linked pages such as the Responses API reference, streaming reference, Models API, Stripe projects guide, coding-agent integration, Agent SDK overview and the llms.txt index are excluded and were not read. No licence, pricing, privacy or terms evidence was captured, so those areas are reported as unknown. The code samples were not run or tested, and the SDK, model identifiers and 600+ model claim were not verified.
The overview
What this resource is
The resource is a single documentation page titled Quickstart: Build a Chat App, published in the cookbook section of the OpenRouter docs at [https://openrouter.ai/docs/cookbook/get-started/quickstart.md]. It is a guided tutorial, not a software package, and it states its goal as learning the fundamentals of OpenRouter by building a TypeScript chat app that sends messages and streams responses.
The page states the intended outcome: a working multi-turn conversation loop that can talk to any of the 600+ models on the platform by changing a single string. The 600+ figure is the page's own claim and was not independently checked. The page is written for OpenRouter's own service and SDK (@openrouter/sdk), so it teaches that product's API rather than a vendor-neutral technique.
Overall assessment
On the evidence, this is a compact, well-structured tutorial with complete single-request, streaming and multi-turn samples, plus setup commands and model-switching snippets. It explains what output to expect and ends with a checklist. It builds up in a sensible order: one request, then streaming, then conversation history, then model switching. It is a useful starting point for anyone who wants to try OpenRouter from TypeScript.
The main limits are about what the page leaves out. It does not state pricing or credit requirements, data-handling terms, rate limits, or SDK version numbers. The examples check response shape and discard turns when a stream ends without completion, but do not catch request exceptions or implement retries or rate-limit handling. It is therefore a learning scaffold and not production code. None of the code was run for this review, so whether the samples work as written against the current SDK is not assessed.
Who it is for
The page suits developers who already have Node.js and can read TypeScript and want a first working call to hosted language models, especially people who want to compare or swap models from different vendors without rewriting code. Beginners to LLM APIs can follow it because each step is small and the expected output is described, though they need to be comfortable with a terminal, npm, and environment variables.
It is less suited to people who need a no-code tool, who work in a language other than TypeScript or JavaScript (no other language is covered on this page), or who need guidance on production concerns such as retries, rate limiting, or cost control. Those topics are not covered. The page demonstrates reading an API key from an environment variable to avoid hard-coding it, but does not cover broader credential management.
What you can learn to build
The tutorial covers five things. First, creating a Node.js project and installing the SDK. Second, sending a single non-streaming request through the Responses API and reading the text from the output_text part of the last message item in response.output, along with token usage in the camelCase fields inputTokens and outputTokens. Third, streaming: passing stream: true and iterating over events, printing each response.output_text.delta fragment as it arrives. Fourth, a multi-turn command-line loop using Node's readline module that appends each user and assistant turn to an input array and sends the whole history on every call. Fifth, swapping models by changing the model string; the page shows examples for openai/gpt-chat-latest, ~anthropic/claude-sonnet-latest, and openrouter/free, and points to the model list at [https://openrouter.ai/models] and a Models API.
The multi-turn example has one careful detail: it only saves an assistant turn to history if a response.completed event was seen. If the stream ends with a failed or incomplete response, the user turn is removed again and a message is printed. The page does not cover tool calling, structured output, images, or other features in the body of this tutorial; it only points to a coding-agent integration page and an Agent SDK overview as next steps.
Using it
Requirements
The page lists two prerequisites: Node.js 18 or newer, and an OpenRouter API key, which can be created at [https://openrouter.ai/settings/keys] or by setting up a new Stripe project (the page links to a Stripe projects guide, which was not part of the captured scope). The setup also installs @openrouter/sdk and, as a dev dependency, tsx for running TypeScript directly.
The page notes the SDK is ESM-only, so package.json must have type set to module, which the tutorial does with npm pkg set type=module. Network access to OpenRouter is implied. Operating system support, TypeScript version, SDK version, and account requirements such as whether credits or a payment method must be added before the first call are not stated.
How it works
The code creates an OpenRouter client with an API key read from the OPENROUTER_API_KEY environment variable, then calls client.responses.send with a responsesRequest object containing a model identifier and an input. Without stream: true the call returns a full response object; with stream: true it returns an event stream that the code iterates with for await. The page says the response shape follows OpenRouter's Responses API reference, and links to a streaming reference for the server-sent-event format.
The model is chosen purely by the model string, for example google/gemini-3.1-flash-lite in the main examples. Because the same call shape is used, the page's claim is that switching providers needs no other code change. The model does not remember earlier turns by itself: the tutorial states that memory comes from resending the full input array of role and content items on each request, so the history, and with it the request size, grows with every turn. How OpenRouter routes the request to an underlying provider is not explained on this page.
Setup steps
Step 1 creates a folder, runs npm init -y, sets the package type to module, installs @openrouter/sdk, and adds tsx as a dev dependency. Step 2 creates chat.ts with the single-request sample and runs it with the API key set inline, as in OPENROUTER_API_KEY=sk-or-v1-... npx tsx chat.ts. Steps 3 and 4 replace the contents of the file with the streaming and multi-turn samples; step 4 is interactive and ends when the user types exit.
A practical note from reading the page: putting a key inline in a shell command can leave it in shell history, so exporting it from a safer source may be preferable. The page itself only says the key is read from the environment so it is never hard-coded. The package is installed without a pinned version, so the install will pull whatever version is current at the time, and the page does not say which version its samples were written for. The page also mentions a prompt that can be copied into a coding agent for a faster start, but that prompt's text is not in the captured content.
Worked example
The streaming sample sends the input 'Explain how routers work in three sentences.' to google/gemini-3.1-flash-lite with stream: true. It first checks that the result is a stream, then loops over events and writes each response.output_text.delta fragment to standard output, so text appears incrementally and a final newline is printed at the end.
The multi-turn sample wraps this in a readline prompt labelled You:, pushes each line into the input array as a user message, streams the reply while collecting it into a string, and pushes it back as an assistant message only if a response.completed event arrived. The page's checks say a follow-up question that refers to an earlier answer should work, and that changing the model string should switch provider. These are the page's expected results; none were reproduced for this review.
Assessment & evidence
Limitations
The tutorial is intentionally minimal. Reading the multi-turn code, the readline callback is asynchronous and has no try/catch, so a network or API error would likely surface as an unhandled rejection and end the program; the guard that throws when a non-stream response is returned is in the same position. There is no system message or instructions field, no limit on history length, and no handling of rate limits or retries. These are observations from reading the code, not test results.
Scope limits: only TypeScript on Node.js is shown, model names such as google/gemini-3.1-flash-lite and aliases such as ~anthropic/claude-sonnet-latest may change or be retired, and the page does not document which models support streaming or the Responses API. Linked pages (Responses API reference, streaming reference, Models API, Agent SDK, coding-agent integration, Stripe projects) are outside the captured scope and were not read.
Reasoning behind this assessment
The assessment rests on the page's content alone: it provides complete, ordered instructions and code, states expected output after each key step, and ends with explicit checks. That makes it a specific and usable learning resource, and the code and commands in it are ordinary tutorial material with no sign of harmful behaviour.
Confidence is limited by the fact that nothing was run. Claims about correctness of the samples, the 600+ model count, model availability, and the claim that no other code change is needed when switching models are the page's statements and are reported as such. Cost, privacy, and licence questions are left as unknown because the page is silent on them.
Alternatives and related options
The page itself points to two follow-ups: connecting a coding agent to OpenRouter, and the Agent SDK for built-in multi-turn loops and tool execution. Those were not read, so their quality is not assessed.
Other routes to the same goal, such as calling a single model vendor's own SDK directly or using another multi-provider gateway or library, are not discussed on this page and were not compared in the evidence. The trade-off the page implies for OpenRouter is one API key and one call shape across many models, in exchange for depending on OpenRouter as an intermediary; how it compares on price, latency, or reliability is unknown.
Evidence base
The source is the OpenRouter quickstart page, containing six code or command blocks, prerequisites, expected results, a checklist and next-step links.
The page begins with a note pointing to a documentation index at [https://openrouter.ai/docs/llms.txt]; that index was not fetched and is not part of the evidence. No repository, release notes, licence file, pricing page, or SDK source was captured, and no code was executed.
Access & freshness
Costs
The page does not state any prices, credit requirements, free-tier terms, or rate limits, so the cost of following the tutorial is unknown from this evidence. It does show that non-streaming responses include a usage object with inputTokens and outputTokens, which is the information a developer would need to track consumption, and it shows openrouter/free as a model string described as a free model. What that free option includes, whether it has limits, and whether a funded account is needed for the other models are not stated.
Because the multi-turn sample resends the entire history on every request, the number of input tokens per call grows with conversation length. That follows from the code as described; the actual charges depend on the chosen model and OpenRouter's pricing, which this page does not cover.
Rights and terms
The captured page shows no licence, copyright notice, or terms of use for the documentation text or the code samples, so the permitted reuse of the samples is not established by this evidence. Terms of the OpenRouter service, the SDK's licence, and the terms of the underlying model providers are not part of the selected page and were not assessed.
The page also does not say how prompts and responses are handled by OpenRouter or the downstream model providers (storage, logging, training use). Anyone sending sensitive or personal data through the example should check those terms separately before doing so.
Freshness
The page was captured on 13 November 2026. It shows no publication or last-updated date and no SDK version. The model identifiers and latest-style aliases do not establish when the page was last maintained; its publication date, update date and compatibility with the current SDK remain unknown.
Model names, SDK method signatures, and the Responses API shape are the parts most likely to change; because the SDK install is unpinned, a later SDK release could differ from what the page describes.
Suggested next steps
If you want to try it, create an API key at [https://openrouter.ai/settings/keys], check the current pricing and any free-model limits on OpenRouter's own site before running many requests, and follow steps 1 to 3 first. Treat the key as a secret and avoid committing it or leaving it in shared shell history.
After the basic samples work, add try/catch handling around the stream, limit or trim the history so it does not grow without bound, pin the SDK version once you have a working setup, and read the linked Responses API and streaming references for details this page leaves out. Check the terms and data handling of OpenRouter and the chosen model provider before sending anything sensitive.
