aisdk / luma
Official Luma provider for the PHP AI SDK.
Fund package maintenance!
v0.8.3
2026-07-22 06:44 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.8.0
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^4.0
- phpstan/phpstan: ^2.0
README
Official Luma provider for the PHP AI SDK. Uses Luma Dream Machine's native video-generation API.
Installation
composer require aisdk/luma
Basic Usage
use AiSdk\Generate; use AiSdk\Luma; Luma::create(['apiKey' => $_ENV['LUMA_API_KEY']]); $video = Generate::video('A cinematic product reveal') ->model(Luma::model('ray-2')) ->aspectRatio('16:9') ->duration(5) ->run(timeout: 600);
Configuration
| Variable | Description | Default |
|---|---|---|
LUMA_API_KEY |
API key for authentication | Required |
LUMA_BASE_URL |
Base URL for API requests | https://api.lumalabs.ai/dream-machine/v1 |
Supported Capabilities
| Capability | Support |
|---|---|
| Text-to-video generation | Native |
| Async job polling | Native |
| Image-to-video and other Dream Machine fields | Via raw provider options |
The package creates a /generations/video job and polls /generations/{id} until the video is available. Use providerOptions('luma', ['keyframes' => [...], 'resolution' => '720p']) for supported native Luma request fields.