Official AssemblyAI provider for the PHP AI SDK. Uses AssemblyAI's native pre-recorded transcription API.
composer require aisdk/assemblyaiuse AiSdk\AssemblyAI;
use AiSdk\Content;
use AiSdk\Generate;
AssemblyAI::create(['apiKey' => $_ENV['ASSEMBLYAI_API_KEY']]);
$result = Generate::transcription()
->model(AssemblyAI::model('universal-3-pro'))
->audio(Content::audio('https://example.com/audio.mp3'))
->run();| Variable | Description | Default |
|---|---|---|
ASSEMBLYAI_API_KEY |
API key for authentication | Required |
ASSEMBLYAI_BASE_URL |
Base URL for API requests | https://api.assemblyai.com |
| Capability | Support |
|---|---|
| Pre-recorded transcription | Native |
| Remote audio URLs | Native |
| Local audio files | Uploaded before transcription |
The package submits /v2/transcript jobs and polls until they complete. Use providerOptions('assemblyai', ['raw' => [...]]) for AssemblyAI transcription fields such as language_detection, speaker_labels, or keyterms_prompt.