---
title: "llm.js — Brad Jasper"
description: "One simple interface to many language models: OpenAI, Anthropic, Google, local models and more, with sensible defaults."
url: https://bradjasper.com/projects/llm-js/
---

[← Code](https://bradjasper.com/code/)

# llm.js

Archived · 2023–2025 · JavaScript · AI

Archived; today I use the AI SDK and OpenRouter.

One simple interface to many language models: OpenAI, Anthropic, Google, local models and more, with sensible defaults.

- [llmjs.themaximalist.com](https://llmjs.themaximalist.com/)
- [Source on GitHub](https://github.com/themaximalist/llm.js)

![llm.js logo](https://bradjasper.com/_astro/llmjs.t8G7M3MJ_1AVXOF.webp)

I released llm.js in April 2023, when each model provider had its own API. It put them all behind one function call:

```
await LLM("the color of the sky is"); // blue
```

From there it grew to cover chat history, streaming, tools, reasoning models, JSON and XML parsers, and token and cost tracking, with zero dependencies, in Node.js and the browser. It reached about 150 stars on GitHub and around a thousand downloads a week on npm.

Today that idea is table stakes. I use the AI SDK and OpenRouter in my own work, so llm.js is archived. It stays up as a record of what I was building in 2023.

Part of [ai.js](https://bradjasper.com/projects/ai-js/), which put my AI libraries behind one toolkit.
