All posts
LangChain + TokenBazaar — setup in 3 lines
Guides 4 min read· Aug 5, 2026· By Guides

LangChain + TokenBazaar — setup in 3 lines

How to point LangChain's ChatOpenAI class at TokenBazaar.

LangChain's ChatOpenAI takes a base_url. That's the whole setup.

python
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="openai/gpt-5.4-mini",
    api_key="sk-tb-...",
    base_url="https://tokenbazaar.in/api/public",
)
All LangChain chains, tools, and agents work unchanged — LangChain doesn't know or care about the endpoint.

Models in this article

Review current prices, specifications and source-linked benchmarks.

Ready to build?

Grab a key, keep your OpenAI SDK, and pay only for what you use.

Start free