BlazeInferDocs
Integrations

LangChain

Use BlazeInfer through LangChain's OpenAI-compatible chat model.

SupportedTested with: langchain-openai 1.7.3 · Last verified: 2026-11-02

LangChain's ChatOpenAI class accepts a custom base URL, so it points at BlazeInfer directly.

pip install langchain-openai
export BLAZE_API_KEY="blz_..."
import os
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="google/gemma-4-31b-it",
    base_url="https://blaze.e2enetworks.net/v1",
    api_key=os.environ["BLAZE_API_KEY"],
)

print(llm.invoke("Say hello in one sentence.").content)

ChatOpenAI does not return the model's reasoning text.