aisdk / revai
Official RevAi provider for the PHP AI SDK.
Fund package maintenance!
v0.8.1
2026-07-22 07:08 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 Rev AI provider for the PHP AI SDK. Uses Rev AI's native asynchronous speech-to-text API.
Installation
composer require aisdk/revai
Basic Usage
use AiSdk\Content; use AiSdk\Generate; use AiSdk\RevAi; RevAi::create(['apiKey' => $_ENV['REVAI_ACCESS_TOKEN']]); $result = Generate::transcription() ->model(RevAi::model('machine')) ->audio(Content::audio('https://example.com/audio.mp3')) ->run();
Configuration
| Variable | Description | Default |
|---|---|---|
REVAI_ACCESS_TOKEN |
Access token for authentication | Required |
REVAI_BASE_URL |
Base URL for API requests | https://api.rev.ai/speechtotext/v1 |
Supported Capabilities
| Capability | Support |
|---|---|
| Asynchronous transcription | Native /jobs API |
| Public audio URLs | Native |
| Local files | Not exposed by the package |
The package submits a job, polls its status, and retrieves the transcript. Use providerOptions('revai', [...]) for native job fields. Supply a public audio URL; local uploads are not currently exposed by this package.