Download the PHP package mohammed94/ai-ledger without Composer

On this page you can find all versions of the php package mohammed94/ai-ledger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-ledger

AI Ledger

The cost & observability meter for every AI/LLM call in your Laravel app — tokens, dollar cost, latency and budgets, across Prism, the official Laravel AI SDK, OpenAI and Anthropic.

Tests Latest Version

Most teams ship AI features blind: nobody knows which feature — or which user — is burning the OpenAI bill until it arrives. AI Ledger is the meter for your app's AI usage. One call records a trace; you get spend reports, per-user / per-feature attribution, and budget guards that can stop a request before it blows the budget.

Why it exists: Prism, the most popular Laravel AI package, ships no built-in observability. AI Ledger fills that gap and stays provider-agnostic.

Features

Installation

Usage

Record a call (any provider)

Record straight from a provider response

recordUsage() understands the usage payloads returned by Prism, the Laravel AI SDK and the OpenAI/Anthropic SDKs — no manual token counting:

Spend reports

Budget guards

Set ceilings in config (or via AI_LEDGER_BUDGET_MONTHLY), then gate expensive calls:

Configuration

The published config/ai-ledger.php holds the pricing table, budgets, store driver and PII switch:

Roadmap

Testing

License

The MIT License (MIT). See LICENSE.


All versions of ai-ledger with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mohammed94/ai-ledger contains the following files

Loading the files please wait ...