DhivehiGPT PHP SDK
DhivehiGPT PHP SDK is a lightweight PHP / Laravel SDK for the DhivehiGPT API.
Key Features
- Framework agnostic: works in any PHP 8.0+ application, with or without Laravel.
- Laravel first-class support: a service provider, a
DhivehiGptfacade, and configuration viaconfig/services.php. - Minimal dependencies: built on Guzzle, the standard PHP HTTP client — already installed in most Laravel and modern PHP projects.
- Full API coverage: voices, text-to-speech, subscription balance, and tasks.
- No exception wrapping: API errors surface as Guzzle's own exceptions, so error handling is the same as any other Guzzle-based code.
Quick Example
use Javaabu\DhivehiGpt\DhivehiGpt;
$dhivehigpt = new DhivehiGpt('YOUR_API_KEY');
$audio = $dhivehigpt->tts()->generate('ދިވެހިޖީޕީޓީއަށް މަރުޙަބާ', 'hajja');
Next Steps
Ready to get started?
- Head over to the Installation & Setup guide to add the package to your project and generate an API key.
- Explore the Basic Usage section to understand the core resources.