Ollama JavaScript Library

The official JavaScript client for the Ollama API

Visit website

Overview

Talking to a local model from JavaScript shouldn't mean hand-writing fetch calls against a REST API and re-implementing streaming every time.

This is Ollama's official JavaScript library — a proper client for the Ollama API covering chat, generation, streaming responses, embeddings and model management, in Node and in the browser.

What it covers

  • Chat and text generation through the Ollama API
  • Streaming responses for token-by-token UIs
  • Embeddings for search and retrieval features
  • Model management without shelling out to the CLI

How it runs

A JavaScript client for Node and browser applications. It talks to your local Ollama instance — and can also reach Ollama's cloud models when a local GPU isn't enough.

Who it's for

JavaScript and TypeScript developers building on Ollama who want the supported client instead of a hand-rolled wrapper that breaks when the API moves.

  • Render Mermaid diagrams to SVG with a tiny, dependency-free library

    App Ui Sdks
  • Ad-free open-source home screen for Android TV and smart TVs

    App Ui Sdks
  • An Office SDK for embedding office apps in your own product

    App Ui Sdks