langchain-haryai
LangChain chat model for HaryAI, which sells DeepSeek and MiniMax chat models at up to 55% off their official prices. You pay per token from one balance, and the model ids are the vendors' own.
Install
pip install -U langchain-haryai
Get a key
Sign up at haryai.com, then copy a key from your account page and set it:
export HARYAI_API_KEY="your-api-key"
Use
from langchain_haryai import ChatHaryAI
model = ChatHaryAI(model="deepseek-flash")
print(model.invoke("Explain prompt caching in one sentence.").text)
for chunk in model.stream("Write a haiku about rain."):
print(chunk.text, end="")
Tool calling and structured output work as with ChatOpenAI:
from pydantic import BaseModel
class Weather(BaseModel):
"""Get the current weather for a city."""
city: str
model = ChatHaryAI(model="deepseek-v4-pro").bind_tools([Weather])
print(model.invoke("What's the weather in Tokyo?").tool_calls)
The models think before they answer. The reasoning text is in message.additional_kwargs["reasoning_content"], and ChatHaryAI sends it back with assistant messages, so a tool calling loop keeps working. max_tokens counts reasoning and answer together.
Models
Prices in US dollars as of 2026-12-05. DeepSeek's official price shown is its peak price; HaryAI charges the same price at every hour. The current list and prices are at haryai.com/models.json and on the pricing page.
| Model id | Model | Context | Images in | Input, per 1M tokens | Output, per 1M tokens | Off the official price |
|---|---|---|---|---|---|---|
deepseek-flash |
DeepSeek V4.1 Flash | 1M | yes | $0.135 (official $0.3) | $0.54 (official $1.2) | 55% |
deepseek-v4-pro |
DeepSeek V4 Pro | 1M | no | $0.594 (official $1.32) | $1.782 (official $3.96) | 55% |
MiniMax-M4 |
MiniMax M4 | 1M | yes | $0.704 (official $0.8) | $2.728 (official $3.1) | 12% |
langchain_haryai.MODELS has the same ids, as of the installed release.
Settings
| Argument | Env variable | Default |
|---|---|---|
api_key |
HARYAI_API_KEY |
none |
base_url |
HARYAI_API_BASE |
https://api.haryai.com/v1 |
model |
deepseek-flash |
Other arguments (temperature, max_tokens, reasoning_effort, timeout, max_retries) are the same as in ChatOpenAI. Requests go to /v1/chat/completions.
Links
MIT License. Made by JustOG, Inc., which runs HaryAI.
Metadata
Release files for langchain-haryai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_haryai-0.1.0.tar.gz | 7.5 kB | Without provenance | Details for langchain_haryai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_haryai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_haryai-0.1.0-py3-none-any.whl |
Total release size: 15.0 kB
Release files / langchain_haryai-0.1.0.tar.gz
| Download URL | langchain_haryai-0.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c39ac423c6a4ba8b8c15819b7fff0915ff64078813b5aa106180d412dd5beb17
|
|
BLAKE2b-256 checksum How to use checksums |
11546c1f1f3fd664a896f5b841df1d602ac89f0c72952c26e501a4890ed1e2c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / langchain_haryai-0.1.0-py3-none-any.whl
| Download URL | langchain_haryai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dbe1710f34b75a74fe0f151f8128f3a6df72d7e13bc204fe959c31a91b882a8
|
|
BLAKE2b-256 checksum How to use checksums |
08db67e627a7da013db2bc346ec1290fa1ed42266cc4ecc4d10d2f7ad87815dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for langchain-haryai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.