NeuForge Pay for LlamaIndex (neuforge-llamaindex)
A LlamaIndex Token Counter that enforces the x402 Bounded Overshoot Protocol natively.
⚠️ 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_llamaindex import NeuForgeTokenCounter
from llama_index.core import Settings
from llama_index.core.callbacks import CallbackManager
# Initialize with your API Key
meter = NeuForgeTokenCounter(api_key="nf_live_your_api_key_here")
Settings.callback_manager = CallbackManager([meter])
# Indexing and querying will sync with NeuForge Cloud.
# Hits HTTP 402 if budget is exceeded.
index = VectorStoreIndex.from_documents(docs)
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 neuforge_llamaindex-1.0.1.tar.gz.
File metadata
- Download URL: neuforge_llamaindex-1.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d75efc70d343b73b1247cdf4d6b0ef11bb8e14c21829f646beb5d790c4ee041
|
|
| MD5 |
9eacab48b43eaecec1b6d53360a9c1a3
|
|
| BLAKE2b-256 |
ed769fac376edebf9e32bde1ad9e925460149039445e3ee7fd9d0e48124139fa
|
File details
Details for the file neuforge_llamaindex-1.0.1-py3-none-any.whl.
File metadata
- Download URL: neuforge_llamaindex-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
972e2a4ec7742508287c8b950c1b0ce13eba5e50af5aaa8fbb932f3c1a28ec2d
|
|
| MD5 |
4d2fec200d75f968e10663f4bab4dfe2
|
|
| BLAKE2b-256 |
48ac365da85ed2cc70ecdb93d19e4ee81484a9e58143f7c86cd5491623526b93
|