langchain-openzoo
LangChain integration for OpenZoo — an OpenAI-compatible inference endpoint with no signup: any API key value works and billing happens per call via x402 or card.
Installation
pip install -U langchain-openzoo
No API key is required. Optionally:
export OPENZOO_API_KEY=sk-openzoo # any value works; useful for tagging calls
export OPENZOO_BASE_URL=http://localhost:8402/v1 # route through a local `npx openzoo` gateway
Chat model
ChatOpenZoo is a thin subclass of ChatOpenAI pointed at https://api.openzoo.fun/v1. Everything ChatOpenAI supports (streaming, tool calling, structured output, async) works the same way.
from langchain_openzoo import ChatOpenZoo
llm = ChatOpenZoo(model="z-ai/glm-5.3-flash")
llm.invoke("Sing about zebras") # note: billed per call
With parameters:
llm = ChatOpenZoo(
model="z-ai/glm-5.3-flash",
temperature=0.2,
max_tokens=512,
# api_key="sk-anything", # optional
# base_url="http://localhost:8402/v1", # optional local gateway
)
Browse the free model catalog at https://api.openzoo.fun/v1/models — model ids look like z-ai/glm-5.3-flash.
Development
python -m venv venv && source venv/bin/activate
pip install -e . pytest
pytest
The tests only cover instantiation and configuration — no network calls are made.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_openzoo-0.1.0.tar.gz.
File metadata
- Download URL: langchain_openzoo-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98e7a7eaf48d6f9fd33fca2e495449f5b88941ff134ffa1218236ca6af5ee2fd
|
|
| MD5 |
e43801a2e9fa266ea98c99512b4816cf
|
|
| BLAKE2b-256 |
c253baeeb6f9190dfa2e312edbfb7f9a2a871ba1822ef1038b5e6da267b58eb5
|
File details
Details for the file langchain_openzoo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_openzoo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91fc7ce480ec6fe2e2fce285f3d4fd1ce723494d693f8dd251ea78e28112e08a
|
|
| MD5 |
6a657993d70bd2afd4d02034875b0825
|
|
| BLAKE2b-256 |
f08247d57da2278833586120649e8f6c441c4b6b25548ff2d1cf1f4b6959b54d
|