Skip to main content

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 Required exception. 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

neuforge_llamaindex-1.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuforge_llamaindex-1.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

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

Hashes for neuforge_llamaindex-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6d75efc70d343b73b1247cdf4d6b0ef11bb8e14c21829f646beb5d790c4ee041
MD5 9eacab48b43eaecec1b6d53360a9c1a3
BLAKE2b-256 ed769fac376edebf9e32bde1ad9e925460149039445e3ee7fd9d0e48124139fa

See more details on using hashes here.

File details

Details for the file neuforge_llamaindex-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for neuforge_llamaindex-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 972e2a4ec7742508287c8b950c1b0ce13eba5e50af5aaa8fbb932f3c1a28ec2d
MD5 4d2fec200d75f968e10663f4bab4dfe2
BLAKE2b-256 48ac365da85ed2cc70ecdb93d19e4ee81484a9e58143f7c86cd5491623526b93

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page