spectra-php/laravel-spectra
| Install | |
|---|---|
composer require spectra-php/laravel-spectra |
|
| Latest Version: | v2.2.0 |
| PHP: | ^8.2 |
| Laravel: | 12 · 13 |
| Older releases: | 11 |
| License: | MIT |
| Last Updated: | Oct 21, 2026 |
| Links: | GitHub · Packagist |
Spectra is a comprehensive Laravel package for AI observability. It helps you track AI requests, measure usage, calculate costs across different pricing units, enforce budgets, and inspect AI operations through a unified dashboard and API. This lets you focus on shipping reliable AI features without getting buried in provider-specific operational complexity.
Official Documentation
Official documentation can be found on spectraphp.com.
Upgrading to 2.0
Spectra 2.0 tracks streamed responses automatically, bills prompt-cache reads and writes and reasoning tokens for every provider, and updates every pricing catalog. Most apps only need to run one new migration. See the upgrade guide and the changelog.
Code of Conduct
While this project is not affiliated with Laravel, we follow the Laravel Code of Conduct. We expect all contributors to follow these guidelines.
Author
This library is created by Ahmad Mayahi with contributions from the Open Source Community.
License
The MIT License (MIT). Please see License File for more information.
Related Packages
AI task orchestrator for Laravel: routing, queue, audit, budget, webhooks
Give your Laravel app a brain, safely. Build AI Agents that can execute real act...
Provider-agnostic GenAI client for Laravel: Gemini, AWS Bedrock, and more
AI API cost monitoring and key management plugin for Filament v4 & v5
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v2.2.0 | ^8.2 | ^12.0|| | MIT | |
| v2.1.0 | ^8.2 | ^12.0|| | MIT | |
| v2.0.1 | ^8.2 | ^12.0|| | MIT | |
| v2.0.0 | ^8.2 | ^12.0|| | MIT | |
| v1.3.0 | ^8.2 | ^11.0|| | MIT | |
| v1.2.0 | ^8.2 | ^11.0|| | MIT | |
| v1.1.0 | ^8.2 | ^11.0|| | MIT | |
| v1.0.0 | ^8.2 | ^11.0|| | MIT |