# llm-sdk > llm-sdk (npm: llm-sdk-js) is an open-source TypeScript router for LLM calls. It runs in your own process — your API keys, direct HTTP calls to providers, zero runtime dependencies, no proxy service in the middle. Given a primary model and a list of fallbacks, it retries and fails over automatically and returns which provider answered, what the call cost, and every attempt on the way. It supports OpenAI, Anthropic, Groq, and local/self-hosted OpenAI-compatible endpoints, plus named routes, response caching, cost tracking, structured output extraction, and tool calling. ## Start here - [Getting started](https://www.llm-sdk.dev/guide/getting-started): install, first call, project layout. - [GitHub repository](https://github.com/ALPHACOD3RS/llm-sdk): source, issues, releases. - [npm package](https://www.npmjs.com/package/llm-sdk-js): `npm install llm-sdk-js`. - [Full documentation, concatenated](https://www.llm-sdk.dev/llms-full.txt): every guide and API page in one file, for models that read a single document. ## Guide - [Getting started](https://www.llm-sdk.dev/guide/getting-started): A router for LLM calls — one primary model, a list of fallbacks, and a response that - [Caching & cost](https://www.llm-sdk.dev/guide/caching-cost): Deterministic cache keys, TTLs, and cost estimated from usage against a price table. - [Configuration](https://www.llm-sdk.dev/guide/configuration): Every option, where it can be set, and how global, route, and per-call values resolve. - [Errors](https://www.llm-sdk.dev/guide/errors): The two errors you catch — BadRequest for your mistakes, AllProvidersFailed for - [Structured output](https://www.llm-sdk.dev/guide/extract): Typed JSON out of a model with a Zod schema, and what happens when it comes back - [Fallback & retry](https://www.llm-sdk.dev/guide/fallback): Which errors fail over, how backoff and Retry-After are handled, and what ends up in - [Named routes](https://www.llm-sdk.dev/guide/routes): Name your tradeoffs once — fast, smart, cheap — then call them by name instead of - [Testing](https://www.llm-sdk.dev/guide/testing): Exercise the fallback path with no network, no keys, and no clock skew. - [Tools](https://www.llm-sdk.dev/guide/tools): Declare tools, read the calls a model asks for, and stop short of an agent loop — this ## API reference - [createRouter](https://www.llm-sdk.dev/api/create-router): Reference for createRouter(config) and the router it hands back. - [Errors API](https://www.llm-sdk.dev/api/errors): Exported error classes and the fields they carry. - [Types](https://www.llm-sdk.dev/api/types): CompleteResult, CallOptions, RouterConfig, ModelRef, and the shapes around them.