Home · Agents · LangChain

Use LangChain with Manifest

/ 30 days
App AI SDK

LangChain's ChatOpenAI happily talks to any OpenAI-compatible endpoint. Point it at Manifest and every chain, agent, and tool call gets routed to the cheapest capable model, for free.

models routed through Manifest over the last 30 days.

Why use LangChain with Manifest

LangChain apps fan out into many model calls: query reformulation, retrieval, re-ranking, generation. Each one is a chance to pick a cheaper model. Manifest does that picking for you, request by request.

  • Three-line drop-in with ChatOpenAI
  • Cut LLM costs on multi-step chains by 50 to 70%
  • Works with chat, embeddings, and tool-calling agents
  • Switch routing rules without redeploying your LangChain app
  • Per-chain spend caps and per-model latency tracking
  • Self-hostable router, keep all traffic in your VPC

Setup in 60 seconds

Initialize ChatOpenAI with Manifest's base URL and API key. The rest of your LangChain code stays the same.

Install the LangChain OpenAI adapter and wire it up:

# pip install langchain-openai
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://api.manifest.build/v1",
    api_key="mnfst_YOUR_KEY",
    model="auto",
)

response = llm.invoke("Hello")
print(response.content)
base_url https://api.manifest.build/v1
api_key mnfst_YOUR_KEY
model auto

LangChain tokens processed on Manifest

Models in use

# Model
Auth type Tokens / last 30 days