NeuForge Pay for LangChain (neuforge-langchain)
A LangChain callback handler that natively implements the Bounded Overshoot x402 token metering protocol.
⚠️ Pricing & Metering Disclosure This SDK requires an active API key from neuforge.app. It acts as a cloud-metered gateway that tracks your LLM token usage and synchronizes it synchronously with the NeuForge backend via HTTP.
Important: If your NeuForge account balance drops below zero or your budget is exceeded, this SDK will intentionally halt your execution by throwing an
HTTP 402 Payment Requiredexception. You must manage your billing on neuforge.app to ensure uninterrupted service.
Usage
from neuforge_langchain import NeuForgeCallbackHandler
from langchain_openai import ChatOpenAI
# Initialize with your API Key from neuforge.app
handler = NeuForgeCallbackHandler(api_key="nf_live_your_api_key_here")
llm = ChatOpenAI(callbacks=[handler])
# This generation will hit the NeuForge cloud backend to sync token usage.
# If your account runs out of budget, a PaymentRequiredException is thrown!
response = llm.invoke("Write a very long story.")
Metadata
Release files for neuforge-langchain 1.0.1
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 |
|---|---|---|---|---|
| neuforge_langchain-1.0.1.tar.gz | 3.0 kB | Without provenance | Details for neuforge_langchain-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuforge_langchain-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for neuforge_langchain-1.0.1-py3-none-any.whl |
Total release size: 6.4 kB
Release files / neuforge_langchain-1.0.1.tar.gz
| Download URL | neuforge_langchain-1.0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1668140f71cff44104dc252f89b611d1df2c0cd776e3368dab9a4546787a26d8
|
|
BLAKE2b-256 checksum How to use checksums |
163633624817ff2bfd912c2b25928dd67ef8f9cafcfcae3136471d8a348b6059
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / neuforge_langchain-1.0.1-py3-none-any.whl
| Download URL | neuforge_langchain-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4663143bad984b701386eac97b6d208e3ac7a51662e8913a95e1380dd0c5d507
|
|
BLAKE2b-256 checksum How to use checksums |
0a8fede91869d93b1b415bcdba08f1891cb17a94ffc3018bb8063309bf50995e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for neuforge-langchain 1.0.1
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.