aisdk / lmnt
Official LMNT provider for the PHP AI SDK.
Fund package maintenance!
v0.8.1
2026-07-22 07:05 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.8.0
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^3.0 || ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
README
Official LMNT provider for the PHP AI SDK. Uses LMNT's native text-to-speech API.
Installation
composer require aisdk/lmnt
Basic Usage
use AiSdk\Generate; use AiSdk\LMNT; LMNT::create(['apiKey' => $_ENV['LMNT_API_KEY']]); $result = Generate::speech('Hello from LMNT.') ->model(LMNT::model('default')) ->voice('your-lmnt-voice-id') ->run();
Configuration
| Variable | Description | Default |
|---|---|---|
LMNT_API_KEY |
API key for authentication | Required |
LMNT_BASE_URL |
Base URL for API requests | https://api.lmnt.com |
Supported Capabilities
| Capability | Support |
|---|---|
| Text-to-speech | Native POST /v1/ai/speech/bytes |
| LMNT voice ID | Portable ->voice() option |
Use providerOptions('lmnt', [...]) for native request fields, including language, sample rate, temperature, and top-p. LMNT Speech Sessions use a separate WebSocket API and are outside this package's current scope.