Download the PHP package deus-global/deus-ai-token-fee-guru without Composer

On this page you can find all versions of the php package deus-global/deus-ai-token-fee-guru. 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 deus-ai-token-fee-guru

Deus AI Token Fee Guru

Packagist Version PHP Version License

A comprehensive PHP package for calculating Large Language Model (LLM) token usage costs with support for cached tokens, multiple users, conversation rounds, and model comparison.

Features

Installation

Via Composer (Recommended)

Quick Start

CLI Usage

After installing via Composer, the CLI tool is available in your vendor/bin directory:

PHP API Usage

Configuration

The client accepts configuration options during instantiation:

Advanced Usage

Enterprise-scale calculations

Model comparison

Using utility functions

Composer Scripts

After installation, you can use these convenient scripts:

Pricing Data Format

The system uses CSV files for pricing data. Default format:

All prices are per 1 million tokens (as per PRD requirements).

Adding Custom Models

You can easily extend support to additional LLM models by adding their pricing data to data/ai_token_pricing_table.csv:

CSV Column Specification:

Example: Adding Claude 3.5 Sonnet

Usage with Custom Models:

CLI Usage with Custom Models:

Using External Pricing Files:

💡 Tip: Keep your CSV file updated with the latest pricing from model providers to ensure accurate cost calculations.

📖 For detailed model extension guide: See docs/EXTENDING_MODELS.md for comprehensive instructions and examples.

CLI Parameters

Core Parameters

Output Options

Advanced Features

Complete CLI Examples

Basic Usage Examples

Simple Single Model Calculation

Multi-User Scenarios

Information & Discovery

List Available Models

Show Pricing Information

Help and Usage

Model Comparison Examples

Compare All GPT-5 Models

Enterprise Model Comparison

Output Format Examples

Plain Text Output (Default)

JSON Output

Markdown Output

File Output Examples

Save to Files

Interactive Mode Examples

Interactive CLI Session

Custom Pricing Table Examples

Using Custom Pricing Data

Real-World Scenario Examples

Chatbot Cost Estimation (High Cache Hit Rate)

API Service Cost Planning

Content Generation Service

Cost Optimization Analysis

Advanced Parameter Combinations

All Parameters Example

Batch Analysis Scripts

Language-Specific Examples

Traditional Chinese Interface

English Interface (Default)

Testing

The package includes comprehensive test examples that you can run after installation:

Key Features Explained

Cache-Aware Pricing

The system understands that cached tokens (prompt cache hits) are typically priced at 90% savings compared to regular input tokens. Cache hit rate only applies to input tokens, not output tokens.

Multi-User Scaling

Perfect for enterprise scenarios where you need to calculate costs across:

Flexible Output Formats

Multi-Language Support

Full internationalization with comprehensive translations for English and Traditional Chinese interfaces.

Requirements

Architecture

The Token Fee Guru follows modern PHP practices and design patterns:

Core Components

Design Principles

Extension Points

The library is designed to be extensible:

License

This project follows the Deus AI development standards and conventions.


For comprehensive model extension guide, see: docs/EXTENDING_MODELS.md


All versions of deus-ai-token-fee-guru with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5 || ^8.0
ext-json Version *
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 deus-global/deus-ai-token-fee-guru contains the following files

Loading the files please wait ...